Update version numbers in preparation for new release.
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 cc4f838..c49946f 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 V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

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 ee4b655..700d84c 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 V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

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 be1fcb8..3f61799 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 V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

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 ab4c23c..4b93ab4 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 V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

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 414185b..b7805b5 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 V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

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 be24149..c00dd26 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 V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

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 516e91e..befd44a 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 V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

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 00ca23f..e88f408 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 V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

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 9f6b25b..fb11a5d 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 V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

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 00be0bf..b959591 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 V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

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 9e96323..33437c3 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 V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

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 2e6df92..9611fac 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 V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

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 efb0b5c..d176d42 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 V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

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 9aecac5..7d11974 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 V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

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 5b5f097..39dbf88 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 V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

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 edc1d1e..d538edf 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 V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

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 6bd3ec4..3585242 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 V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS-Plus/Demo/FreeRTOS_Plus_CyaSSL_Windows_Simulator/FreeRTOSConfig.h b/FreeRTOS-Plus/Demo/FreeRTOS_Plus_CyaSSL_Windows_Simulator/FreeRTOSConfig.h
index 41c9906..0627f21 100644
--- a/FreeRTOS-Plus/Demo/FreeRTOS_Plus_CyaSSL_Windows_Simulator/FreeRTOSConfig.h
+++ b/FreeRTOS-Plus/Demo/FreeRTOS_Plus_CyaSSL_Windows_Simulator/FreeRTOSConfig.h
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS-Plus/Demo/FreeRTOS_Plus_CyaSSL_Windows_Simulator/SecureTCPClientTask.c b/FreeRTOS-Plus/Demo/FreeRTOS_Plus_CyaSSL_Windows_Simulator/SecureTCPClientTask.c
index 3b2e235..01fcdf0 100644
--- a/FreeRTOS-Plus/Demo/FreeRTOS_Plus_CyaSSL_Windows_Simulator/SecureTCPClientTask.c
+++ b/FreeRTOS-Plus/Demo/FreeRTOS_Plus_CyaSSL_Windows_Simulator/SecureTCPClientTask.c
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS-Plus/Demo/FreeRTOS_Plus_CyaSSL_Windows_Simulator/SecureTCPServerTask.c b/FreeRTOS-Plus/Demo/FreeRTOS_Plus_CyaSSL_Windows_Simulator/SecureTCPServerTask.c
index f5afcd2..af97f02 100644
--- a/FreeRTOS-Plus/Demo/FreeRTOS_Plus_CyaSSL_Windows_Simulator/SecureTCPServerTask.c
+++ b/FreeRTOS-Plus/Demo/FreeRTOS_Plus_CyaSSL_Windows_Simulator/SecureTCPServerTask.c
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS-Plus/Demo/FreeRTOS_Plus_CyaSSL_Windows_Simulator/main.c b/FreeRTOS-Plus/Demo/FreeRTOS_Plus_CyaSSL_Windows_Simulator/main.c
index 8bc3cdd..db2bb1e 100644
--- a/FreeRTOS-Plus/Demo/FreeRTOS_Plus_CyaSSL_Windows_Simulator/main.c
+++ b/FreeRTOS-Plus/Demo/FreeRTOS_Plus_CyaSSL_Windows_Simulator/main.c
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS-Plus/Demo/FreeRTOS_Plus_FAT_SL_and_CLI_Windows_Simulator/ConfigurationFiles/FreeRTOSConfig.h b/FreeRTOS-Plus/Demo/FreeRTOS_Plus_FAT_SL_and_CLI_Windows_Simulator/ConfigurationFiles/FreeRTOSConfig.h
index 1d269cc..13641a0 100644
--- a/FreeRTOS-Plus/Demo/FreeRTOS_Plus_FAT_SL_and_CLI_Windows_Simulator/ConfigurationFiles/FreeRTOSConfig.h
+++ b/FreeRTOS-Plus/Demo/FreeRTOS_Plus_FAT_SL_and_CLI_Windows_Simulator/ConfigurationFiles/FreeRTOSConfig.h
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS-Plus/Demo/FreeRTOS_Plus_FAT_SL_and_CLI_Windows_Simulator/File-Releated-CLI-commands.c b/FreeRTOS-Plus/Demo/FreeRTOS_Plus_FAT_SL_and_CLI_Windows_Simulator/File-Releated-CLI-commands.c
index 558889d..5ee64f7 100644
--- a/FreeRTOS-Plus/Demo/FreeRTOS_Plus_FAT_SL_and_CLI_Windows_Simulator/File-Releated-CLI-commands.c
+++ b/FreeRTOS-Plus/Demo/FreeRTOS_Plus_FAT_SL_and_CLI_Windows_Simulator/File-Releated-CLI-commands.c
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS-Plus/Demo/FreeRTOS_Plus_FAT_SL_and_CLI_Windows_Simulator/File-system-demo.c b/FreeRTOS-Plus/Demo/FreeRTOS_Plus_FAT_SL_and_CLI_Windows_Simulator/File-system-demo.c
index eb58374..a72a789 100644
--- a/FreeRTOS-Plus/Demo/FreeRTOS_Plus_FAT_SL_and_CLI_Windows_Simulator/File-system-demo.c
+++ b/FreeRTOS-Plus/Demo/FreeRTOS_Plus_FAT_SL_and_CLI_Windows_Simulator/File-system-demo.c
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS-Plus/Demo/FreeRTOS_Plus_FAT_SL_and_CLI_Windows_Simulator/Run-time-stats-utils.c b/FreeRTOS-Plus/Demo/FreeRTOS_Plus_FAT_SL_and_CLI_Windows_Simulator/Run-time-stats-utils.c
index f92389e..bcd843a 100644
--- a/FreeRTOS-Plus/Demo/FreeRTOS_Plus_FAT_SL_and_CLI_Windows_Simulator/Run-time-stats-utils.c
+++ b/FreeRTOS-Plus/Demo/FreeRTOS_Plus_FAT_SL_and_CLI_Windows_Simulator/Run-time-stats-utils.c
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS-Plus/Demo/FreeRTOS_Plus_FAT_SL_and_CLI_Windows_Simulator/Sample-CLI-commands.c b/FreeRTOS-Plus/Demo/FreeRTOS_Plus_FAT_SL_and_CLI_Windows_Simulator/Sample-CLI-commands.c
index 6369a52..7d6139b 100644
--- a/FreeRTOS-Plus/Demo/FreeRTOS_Plus_FAT_SL_and_CLI_Windows_Simulator/Sample-CLI-commands.c
+++ b/FreeRTOS-Plus/Demo/FreeRTOS_Plus_FAT_SL_and_CLI_Windows_Simulator/Sample-CLI-commands.c
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS-Plus/Demo/FreeRTOS_Plus_FAT_SL_and_CLI_Windows_Simulator/UDPCommandServer.c b/FreeRTOS-Plus/Demo/FreeRTOS_Plus_FAT_SL_and_CLI_Windows_Simulator/UDPCommandServer.c
index bc5260b..b6aa59f 100644
--- a/FreeRTOS-Plus/Demo/FreeRTOS_Plus_FAT_SL_and_CLI_Windows_Simulator/UDPCommandServer.c
+++ b/FreeRTOS-Plus/Demo/FreeRTOS_Plus_FAT_SL_and_CLI_Windows_Simulator/UDPCommandServer.c
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS-Plus/Demo/FreeRTOS_Plus_FAT_SL_and_CLI_Windows_Simulator/main.c b/FreeRTOS-Plus/Demo/FreeRTOS_Plus_FAT_SL_and_CLI_Windows_Simulator/main.c
index 364c33d..5d6fe2a 100644
--- a/FreeRTOS-Plus/Demo/FreeRTOS_Plus_FAT_SL_and_CLI_Windows_Simulator/main.c
+++ b/FreeRTOS-Plus/Demo/FreeRTOS_Plus_FAT_SL_and_CLI_Windows_Simulator/main.c
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

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
new file mode 100644
index 0000000..12ebf0c
--- /dev/null
+++ b/FreeRTOS-Plus/Demo/FreeRTOS_Plus_Reliance_Edge_and_CLI_Windows_Simulator/ConfigurationFiles/FreeRTOSConfig.h
@@ -0,0 +1,173 @@
+/*

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

+    All rights reserved

+

+    VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

+

+    This file is part of the FreeRTOS distribution.

+

+    FreeRTOS is free software; you can redistribute it and/or modify it under

+    the terms of the GNU General Public License (version 2) as published by the

+    Free Software Foundation >>!AND MODIFIED BY!<< the FreeRTOS exception.

+

+    ***************************************************************************

+    >>!   NOTE: The modification to the GPL is included to allow you to     !<<

+    >>!   distribute a combined work that includes FreeRTOS without being   !<<

+    >>!   obliged to provide the source code for proprietary components     !<<

+    >>!   outside of the FreeRTOS kernel.                                   !<<

+    ***************************************************************************

+

+    FreeRTOS is distributed in the hope that it will be useful, but WITHOUT ANY

+    WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS

+    FOR A PARTICULAR PURPOSE.  Full license text is available on the following

+    link: http://www.freertos.org/a00114.html

+

+    ***************************************************************************

+     *                                                                       *

+     *    FreeRTOS provides completely free yet professionally developed,    *

+     *    robust, strictly quality controlled, supported, and cross          *

+     *    platform software that is more than just the market leader, it     *

+     *    is the industry's de facto standard.                               *

+     *                                                                       *

+     *    Help yourself get started quickly while simultaneously helping     *

+     *    to support the FreeRTOS project by purchasing a FreeRTOS           *

+     *    tutorial book, reference manual, or both:                          *

+     *    http://www.FreeRTOS.org/Documentation                              *

+     *                                                                       *

+    ***************************************************************************

+

+    http://www.FreeRTOS.org/FAQHelp.html - Having a problem?  Start by reading

+    the FAQ page "My application does not run, what could be wrong?".  Have you

+    defined configASSERT()?

+

+    http://www.FreeRTOS.org/support - In return for receiving this top quality

+    embedded software for free we request you assist our global community by

+    participating in the support forum.

+

+    http://www.FreeRTOS.org/training - Investing in training allows your team to

+    be as productive as possible as early as possible.  Now you can receive

+    FreeRTOS training directly from Richard Barry, CEO of Real Time Engineers

+    Ltd, and the world's leading authority on the world's leading RTOS.

+

+    http://www.FreeRTOS.org/plus - A selection of FreeRTOS ecosystem products,

+    including FreeRTOS+Trace - an indispensable productivity tool, a DOS

+    compatible FAT file system, and our tiny thread aware UDP/IP stack.

+

+    http://www.FreeRTOS.org/labs - Where new FreeRTOS products go to incubate.

+    Come and try FreeRTOS+TCP, our new open source TCP/IP stack for FreeRTOS.

+

+    http://www.OpenRTOS.com - Real Time Engineers ltd. license FreeRTOS to High

+    Integrity Systems ltd. to sell under the OpenRTOS brand.  Low cost OpenRTOS

+    licenses offer ticketed support, indemnification and commercial middleware.

+

+    http://www.SafeRTOS.com - High Integrity Systems also provide a safety

+    engineered and independently SIL3 certified version for use in safety and

+    mission critical applications that require provable dependability.

+

+    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+UDP itself (rather than

+ * the demo) are contained in FreeRTOSIPConfig.h.

+ *----------------------------------------------------------*/

+

+#define configUSE_PREEMPTION			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 ) ( 32U * 1024U ) )

+#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 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

+

+/* Hook function related definitions. */

+#define configUSE_TICK_HOOK				0

+#define configUSE_IDLE_HOOK				1

+#define configUSE_MALLOC_FAILED_HOOK	1

+#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 )

+

+/* Run time stats gathering definitions. */

+unsigned long ulGetRunTimeCounterValue( void );

+void vConfigureTimerForRunTimeStats( void );

+#define configGENERATE_RUN_TIME_STATS	1

+#define portCONFIGURE_TIMER_FOR_RUN_TIME_STATS() vConfigureTimerForRunTimeStats()

+#define portGET_RUN_TIME_COUNTER_VALUE() ulGetRunTimeCounterValue()

+

+/* 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_xTaskGetCurrentTaskHandle	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. */

+#define configUSE_STATS_FORMATTING_FUNCTIONS	1

+

+/* Assert call defined for debug builds. */

+#ifdef _DEBUG

+	extern void vAssertCalled( const char *pcFile, unsigned long ulLine );

+	#define configASSERT( x ) if( ( x ) == 0 ) vAssertCalled( __FILE__, __LINE__ )

+#endif /* _DEBUG */

+

+

+

+/* Application specific definitions follow. **********************************/

+

+/* The UDP port to use for incoming command inputs.  The outgoing port is

+set to ( configUDP_CLI_PORT_NUMBER + 1 ). */

+#define configUDP_CLI_PORT_NUMBER	5001

+

+/* 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-Plus/Demo/FreeRTOS_Plus_Reliance_Edge_and_CLI_Windows_Simulator/ConfigurationFiles/redconf.c b/FreeRTOS-Plus/Demo/FreeRTOS_Plus_Reliance_Edge_and_CLI_Windows_Simulator/ConfigurationFiles/redconf.c
new file mode 100644
index 0000000..1a6a6e1
--- /dev/null
+++ b/FreeRTOS-Plus/Demo/FreeRTOS_Plus_Reliance_Edge_and_CLI_Windows_Simulator/ConfigurationFiles/redconf.c
@@ -0,0 +1,15 @@
+/*  THIS FILE WAS GENERATED BY THE DATALIGHT RELIANCE EDGE CONFIGURATION

+    UTILITY.  DO NOT MODIFY.

+*/

+/** @file

+*/

+#include <redconf.h>

+#include <redtypes.h>

+#include <redmacs.h>

+#include <redvolume.h>

+

+

+const VOLCONF gaRedVolConf[REDCONF_VOLUME_COUNT] =

+{

+    { 512U, 65536U, false, 256U, "" }

+};

diff --git a/FreeRTOS-Plus/Demo/FreeRTOS_Plus_Reliance_Edge_and_CLI_Windows_Simulator/ConfigurationFiles/redconf.h b/FreeRTOS-Plus/Demo/FreeRTOS_Plus_Reliance_Edge_and_CLI_Windows_Simulator/ConfigurationFiles/redconf.h
new file mode 100644
index 0000000..0805a6c
--- /dev/null
+++ b/FreeRTOS-Plus/Demo/FreeRTOS_Plus_Reliance_Edge_and_CLI_Windows_Simulator/ConfigurationFiles/redconf.h
@@ -0,0 +1,104 @@
+/*  THIS FILE WAS GENERATED BY THE DATALIGHT RELIANCE EDGE CONFIGURATION

+    UTILITY.  DO NOT MODIFY.

+*/

+/** @file

+*/

+#ifndef REDCONF_H

+#define REDCONF_H

+

+

+#include <string.h>

+

+#define REDCONF_READ_ONLY 0

+

+#define REDCONF_API_POSIX 1

+

+#define REDCONF_API_FSE 0

+

+#define REDCONF_API_POSIX_FORMAT 1

+

+#define REDCONF_API_POSIX_LINK 1

+

+#define REDCONF_API_POSIX_UNLINK 1

+

+#define REDCONF_API_POSIX_MKDIR 1

+

+#define REDCONF_API_POSIX_RMDIR 1

+

+#define REDCONF_API_POSIX_RENAME 1

+

+#define REDCONF_RENAME_ATOMIC 1

+

+#define REDCONF_API_POSIX_FTRUNCATE 1

+

+#define REDCONF_API_POSIX_READDIR 1

+

+#define REDCONF_NAME_MAX 28U

+

+#define REDCONF_PATH_SEPARATOR '/'

+

+#define REDCONF_TASK_COUNT 10U

+

+#define REDCONF_HANDLE_COUNT 10U

+

+#define REDCONF_API_FSE_FORMAT 0

+

+#define REDCONF_API_FSE_TRUNCATE 0

+

+#define REDCONF_API_FSE_TRANSMASKGET 0

+

+#define REDCONF_API_FSE_TRANSMASKSET 0

+

+#define REDCONF_OUTPUT 1

+

+#define REDCONF_ASSERTS 1

+

+#define REDCONF_BLOCK_SIZE 512U

+

+#define REDCONF_VOLUME_COUNT 1U

+

+#define REDCONF_ENDIAN_BIG 0

+

+#define REDCONF_ALIGNMENT_SIZE 4U

+

+#define REDCONF_CRC_ALGORITHM CRC_SLICEBY8

+

+#define REDCONF_INODE_BLOCKS 1

+

+#define REDCONF_INODE_TIMESTAMPS 1

+

+#define REDCONF_ATIME 0

+

+#define REDCONF_DIRECT_POINTERS 4U

+

+#define REDCONF_INDIRECT_POINTERS 32U

+

+#define REDCONF_BUFFER_COUNT 12U

+

+#define RedMemCpyUnchecked memcpy

+

+#define RedMemMoveUnchecked memmove

+

+#define RedMemSetUnchecked memset

+

+#define RedMemCmpUnchecked memcmp

+

+#define RedStrLenUnchecked strlen

+

+#define RedStrCmpUnchecked strcmp

+

+#define RedStrNCmpUnchecked strncmp

+

+#define RedStrNCpyUnchecked strncpy

+

+#define REDCONF_TRANSACT_DEFAULT (( RED_TRANSACT_CREAT | RED_TRANSACT_MKDIR | RED_TRANSACT_RENAME | RED_TRANSACT_LINK | RED_TRANSACT_UNLINK | RED_TRANSACT_FSYNC | RED_TRANSACT_CLOSE | RED_TRANSACT_VOLFULL | RED_TRANSACT_UMOUNT ) & RED_TRANSACT_MASK)

+

+#define REDCONF_IMAP_INLINE 0

+

+#define REDCONF_IMAP_EXTERNAL 1

+

+#define REDCONF_IMAGE_BUILDER 0

+

+#define REDCONF_CHECKER 0

+

+#endif

diff --git a/FreeRTOS-Plus/Demo/FreeRTOS_Plus_Reliance_Edge_and_CLI_Windows_Simulator/ConfigurationFiles/redtypes.h b/FreeRTOS-Plus/Demo/FreeRTOS_Plus_Reliance_Edge_and_CLI_Windows_Simulator/ConfigurationFiles/redtypes.h
new file mode 100644
index 0000000..8c896db
--- /dev/null
+++ b/FreeRTOS-Plus/Demo/FreeRTOS_Plus_Reliance_Edge_and_CLI_Windows_Simulator/ConfigurationFiles/redtypes.h
@@ -0,0 +1,110 @@
+/*             ----> DO NOT REMOVE THE FOLLOWING NOTICE <----

+

+                   Copyright (c) 2014-2015 Datalight, Inc.

+                       All Rights Reserved Worldwide.

+

+    This program is free software; you can redistribute it and/or modify

+    it under the terms of the GNU General Public License as published by

+    the Free Software Foundation; use version 2 of the License.

+

+    This program is distributed in the hope that it will be useful,

+    but "AS-IS," WITHOUT ANY WARRANTY; without even the implied warranty

+    of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the

+    GNU General Public License for more details.

+

+    You should have received a copy of the GNU General Public License along

+    with this program; if not, write to the Free Software Foundation, Inc.,

+    51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.

+*/

+/*  Businesses and individuals that for commercial or other reasons cannot

+    comply with the terms of the GPLv2 license may obtain a commercial license

+    before incorporating Reliance Edge into proprietary software for

+    distribution in any form.  Visit http://www.datalight.com/reliance-edge for

+    more information.

+*/

+/** @file

+    @brief Defines basic types used by Reliance Edge.

+

+    The following types *must* be defined by this header, either directly (using

+    typedef) or indirectly (by including other headers, such as the C99 headers

+    stdint.h and stdbool.h):

+

+    - bool: Boolean type, capable of storing true (1) or false (0)

+    - uint8_t: Unsigned 8-bit integer

+    - int8_t: Signed 8-bit integer

+    - uint16_t: Unsigned 16-bit integer

+    - int16_t: Signed 16-bit integer

+    - uint32_t: Unsigned 32-bit integer

+    - int32_t: Signed 32-bit integer

+    - uint64_t: Unsigned 64-bit integer

+    - int64_t: Signed 64-bit integer

+    - uintptr_t: Unsigned integer capable of storing a pointer, preferably the

+      same size as pointers themselves.

+

+    These types deliberately use the same names as the standard C99 types, so

+    that if the C99 headers stdint.h and stdbool.h are available, they may be

+    included here.

+

+    If the user application defines similar types, those may be reused.  For

+    example, suppose there is an application header apptypes.h which defines

+    types with a similar purpose but different names.  That header could be

+    reused to define the types Reliance Edge needs:

+

+    ~~~{.c}

+    #include <apptypes.h>

+

+    typedef BOOL bool;

+    typedef BYTE uint8_t;

+    typedef INT8 int8_t;

+    // And so on...

+    ~~~

+

+    If there are neither C99 headers nor suitable types in application headers,

+    this header should be populated with typedefs that define the required types

+    in terms of the standard C types.  This requires knowledge of the size of

+    the C types on the target hardware (e.g., how big is an "int" or a pointer).

+    Below is an example which assumes the target has 8-bit chars, 16-bit shorts,

+    32-bit ints, 32-bit pointers, and 64-bit long longs:

+

+    ~~~{.c}

+    typedef int bool;

+    typedef unsigned char uint8_t;

+    typedef signed char int8_t;

+    typedef unsigned short uint16_t;

+    typedef short int16_t;

+    typedef unsigned int uint32_t;

+    typedef int int32_t;

+    typedef unsigned long long uint64_t;

+    typedef long long int64_t;

+    typedef uint32_t uintptr_t;

+    ~~~

+*/

+#ifndef REDTYPES_H

+#define REDTYPES_H

+

+

+typedef int bool;                   /**< @brief Boolean type; either true or false. */

+

+typedef unsigned __int8 uint8_t;    /**< @brief Unsigned 8-bit integer. */

+typedef          __int8 int8_t;     /**< @brief Signed 8-bit integer. */

+

+typedef unsigned __int16 uint16_t;  /**< @brief Unsigned 16-bit integer. */

+typedef          __int16 int16_t;   /**< @brief Signed 16-bit integer. */

+

+typedef unsigned __int32 uint32_t;  /**< @brief Unsigned 32-bit integer. */

+typedef          __int32 int32_t;   /**< @brief Signed 32-bit integer. */

+

+typedef unsigned __int64 uint64_t;  /**< @brief Unsigned 64-bit integer. */

+typedef          __int64 int64_t;   /**< @brief Signed 64-bit integer. */

+

+/** @brief Unsigned integer capable of storing a pointer.

+*/

+#ifdef _WIN64

+typedef uint64_t uintptr_t;

+#else

+typedef uint32_t uintptr_t;

+#endif

+

+

+#endif

+

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
new file mode 100644
index 0000000..419224c
--- /dev/null
+++ b/FreeRTOS-Plus/Demo/FreeRTOS_Plus_Reliance_Edge_and_CLI_Windows_Simulator/File-Related-CLI-commands.c
@@ -0,0 +1,1567 @@
+/*

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

+    All rights reserved

+

+    VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

+

+    This file is part of the FreeRTOS distribution.

+

+    FreeRTOS is free software; you can redistribute it and/or modify it under

+    the terms of the GNU General Public License (version 2) as published by the

+    Free Software Foundation >>!AND MODIFIED BY!<< the FreeRTOS exception.

+

+    ***************************************************************************

+    >>!   NOTE: The modification to the GPL is included to allow you to     !<<

+    >>!   distribute a combined work that includes FreeRTOS without being   !<<

+    >>!   obliged to provide the source code for proprietary components     !<<

+    >>!   outside of the FreeRTOS kernel.                                   !<<

+    ***************************************************************************

+

+    FreeRTOS is distributed in the hope that it will be useful, but WITHOUT ANY

+    WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS

+    FOR A PARTICULAR PURPOSE.  Full license text is available on the following

+    link: http://www.freertos.org/a00114.html

+

+    ***************************************************************************

+     *                                                                       *

+     *    FreeRTOS provides completely free yet professionally developed,    *

+     *    robust, strictly quality controlled, supported, and cross          *

+     *    platform software that is more than just the market leader, it     *

+     *    is the industry's de facto standard.                               *

+     *                                                                       *

+     *    Help yourself get started quickly while simultaneously helping     *

+     *    to support the FreeRTOS project by purchasing a FreeRTOS           *

+     *    tutorial book, reference manual, or both:                          *

+     *    http://www.FreeRTOS.org/Documentation                              *

+     *                                                                       *

+    ***************************************************************************

+

+    http://www.FreeRTOS.org/FAQHelp.html - Having a problem?  Start by reading

+    the FAQ page "My application does not run, what could be wrong?".  Have you

+    defined configASSERT()?

+

+    http://www.FreeRTOS.org/support - In return for receiving this top quality

+    embedded software for free we request you assist our global community by

+    participating in the support forum.

+

+    http://www.FreeRTOS.org/training - Investing in training allows your team to

+    be as productive as possible as early as possible.  Now you can receive

+    FreeRTOS training directly from Richard Barry, CEO of Real Time Engineers

+    Ltd, and the world's leading authority on the world's leading RTOS.

+

+    http://www.FreeRTOS.org/plus - A selection of FreeRTOS ecosystem products,

+    including FreeRTOS+Trace - an indispensable productivity tool, a DOS

+    compatible FAT file system, and our tiny thread aware UDP/IP stack.

+

+    http://www.FreeRTOS.org/labs - Where new FreeRTOS products go to incubate.

+    Come and try FreeRTOS+TCP, our new open source TCP/IP stack for FreeRTOS.

+

+    http://www.OpenRTOS.com - Real Time Engineers ltd. license FreeRTOS to High

+    Integrity Systems ltd. to sell under the OpenRTOS brand.  Low cost OpenRTOS

+    licenses offer ticketed support, indemnification and commercial middleware.

+

+    http://www.SafeRTOS.com - High Integrity Systems also provide a safety

+    engineered and independently SIL3 certified version for use in safety and

+    mission critical applications that require provable dependability.

+

+    1 tab == 4 spaces!

+*/

+

+/* FreeRTOS includes. */

+#include "FreeRTOS.h"

+#include "task.h"

+

+/* Standard includes. */

+#include <stdint.h>

+#include <stdio.h>

+#include <stdlib.h>

+

+/* FreeRTOS+CLI includes. */

+#include "FreeRTOS_CLI.h"

+

+/* File system includes. */

+#include <redposix.h>

+#include <redtests.h>

+

+#ifdef _WINDOWS_

+	#define snprintf _snprintf

+#endif

+

+#define cliNEW_LINE		"\r\n"

+

+/*******************************************************************************

+ * See the URL in the comments within main.c for the location of the online

+ * documentation.

+ ******************************************************************************/

+

+/*

+ * Print out information on a single file.

+ */

+static void prvCreateFileInfoString( char *pcBuffer, REDDIRENT *pxDirent );

+

+/*

+ * Copies an existing file into a newly created file.

+ */

+static BaseType_t prvPerformCopy( int32_t lSourceFildes,

+							int32_t lDestinationFiledes,

+							char *pxWriteBuffer,

+							size_t xWriteBufferLen );

+

+/*

+ * Implements the DIR command.

+ */

+static BaseType_t prvDIRCommand( char *pcWriteBuffer, size_t xWriteBufferLen, const char *pcCommandString );

+

+/*

+ * Implements the DEL command.

+ */

+static BaseType_t prvDELCommand( char *pcWriteBuffer, size_t xWriteBufferLen, const char *pcCommandString );

+

+/*

+ * Implements the TYPE command.

+ */

+static BaseType_t prvTYPECommand( char *pcWriteBuffer, size_t xWriteBufferLen, const char *pcCommandString );

+

+/*

+ * Implements the APPEND command.

+ */

+static BaseType_t prvAPPENDCommand( char *pcWriteBuffer, size_t xWriteBufferLen, const char *pcCommandString );

+

+/*

+ * Implements the COPY command.

+ */

+static BaseType_t prvCOPYCommand( char *pcWriteBuffer, size_t xWriteBufferLen, const char *pcCommandString );

+

+/*

+ * Implements the CREATE command.

+ */

+static BaseType_t prvCREATECommand( char *pcWriteBuffer, size_t xWriteBufferLen, const char *pcCommandString );

+

+/*

+ * Implements the MKDIR command.

+ */

+static BaseType_t prvMKDIRCommand( char *pcWriteBuffer, size_t xWriteBufferLen, const char *pcCommandString );

+

+/*

+ * Implements the RENAME command.

+ */

+static BaseType_t prvRENAMECommand( char *pcWriteBuffer, size_t xWriteBufferLen, const char *pcCommandString );

+

+/*

+ * Implements the LINK command.

+ */

+static BaseType_t prvLINKCommand( char *pcWriteBuffer, size_t xWriteBufferLen, const char *pcCommandString );

+

+/*

+ * Implements the STAT command.

+ */

+static BaseType_t prvSTATCommand( char *pcWriteBuffer, size_t xWriteBufferLen, const char *pcCommandString );

+

+/*

+ * Implements the STATFS command.

+ */

+static BaseType_t prvSTATFSCommand( char *pcWriteBuffer, size_t xWriteBufferLen, const char *pcCommandString );

+

+/*

+ * Implements the FORMAT command.

+ */

+static BaseType_t prvFORMATCommand( char *pcWriteBuffer, size_t xWriteBufferLen, const char *pcCommandString );

+

+/*

+ * Implements the TRANSACT command.

+ */

+static BaseType_t prvTRANSACTCommand( char *pcWriteBuffer, size_t xWriteBufferLen, const char *pcCommandString );

+

+/*

+ * Implements the TRANSMASKGET command.

+ */

+static BaseType_t prvTRANSMASKGETCommand( char *pcWriteBuffer, size_t xWriteBufferLen, const char *pcCommandString );

+

+/*

+ * Implements the TRANSMASKSET command.

+ */

+static BaseType_t prvTRANSMASKSETCommand( char *pcWriteBuffer, size_t xWriteBufferLen, const char *pcCommandString );

+

+/*

+ * Implements the ABORT command.

+ */

+static BaseType_t prvABORTCommand( char *pcWriteBuffer, size_t xWriteBufferLen, const char *pcCommandString );

+

+/*

+ * Implements the TEST command.

+ */

+static BaseType_t prvTESTFSCommand( char *pcWriteBuffer, size_t xWriteBufferLen, const char *pcCommandString );

+

+

+/* Structure that defines the DIR command line command, which lists all the

+files in the current directory. */

+static const CLI_Command_Definition_t xDIR =

+{

+	"dir", /* The command string to type. */

+	"\r\ndir <filename>:\r\n Lists the files in the named directory\r\n",

+	prvDIRCommand, /* The function to run. */

+	1 /* One parameter is expected. */

+};

+

+/* Structure that defines the TYPE command line command, which prints the

+contents of a file to the console. */

+static const CLI_Command_Definition_t xTYPE =

+{

+	"type", /* The command string to type. */

+	"\r\ntype <filename>:\r\n Prints file contents to the terminal\r\n",

+	prvTYPECommand, /* The function to run. */

+	1 /* One parameter is expected. */

+};

+

+/* Structure that defines the APPEND command line command, which appends data

+to a file. */

+static const CLI_Command_Definition_t xAPPEND =

+{

+	"append", /* The command string to type. */

+	"\r\nappend <filename> <character> <length>:\r\n Appends data to a file (created if it does not exist)\r\n",

+	prvAPPENDCommand, /* The function to run. */

+	3 /* Three parameters are expected. */

+};

+

+/* Structure that defines the DEL command line command, which deletes a file. */

+static const CLI_Command_Definition_t xDEL =

+{

+	"del", /* The command string to type. */

+	"\r\ndel <filename>:\r\n deletes a file or directory\r\n",

+	prvDELCommand, /* The function to run. */

+	1 /* One parameter is expected. */

+};

+

+/* Structure that defines the COPY command line command, which copies a file. */

+static const CLI_Command_Definition_t xCOPY =

+{

+	"copy", /* The command string to type. */

+	"\r\ncopy <source file> <dest file>:\r\n Copies <source file> to <dest file>\r\n",

+	prvCOPYCommand, /* The function to run. */

+	2 /* Two parameters are expected. */

+};

+

+/* Structure that defines the CREATE command line command, which creates an

+empty file. */

+static const CLI_Command_Definition_t xCREATE =

+{

+	"create", /* The command string to type. */

+	"\r\ncreate <filename>:\r\n Creates an empty file\r\n",

+	prvCREATECommand, /* The function to run. */

+	1 /* One parameter is expected. */

+};

+

+/* Structure that defines the MKDIR command line command, which creates an

+empty directory. */

+static const CLI_Command_Definition_t xMKDIR =

+{

+	"mkdir", /* The command string to type. */

+	"\r\nmkdir <filename>:\r\n Creates an empty directory\r\n",

+	prvMKDIRCommand, /* The function to run. */

+	1 /* One parameter is expected. */

+};

+

+/* Structure that defines the RENAME command line command, which renames a file. */

+static const CLI_Command_Definition_t xRENAME =

+{

+	"rename", /* The command string to type. */

+	"\r\nrename <source file> <dest file>:\r\n Rename <source file> to <dest file>\r\n",

+	prvRENAMECommand, /* The function to run. */

+	2 /* Two parameters are expected. */

+};

+

+/* Structure that defines the LINK command line command, which creates a hard

+link. */

+static const CLI_Command_Definition_t xLINK =

+{

+	"link", /* The command string to type. */

+	"\r\nlink <source file> <dest file>:\r\n Create hard link <dest file> pointing at <source file>\r\n",

+	prvLINKCommand, /* The function to run. */

+	2 /* Two parameters are expected. */

+};

+

+/* Structure that defines the STAT command line command, which shows various

+information about a file. */

+static const CLI_Command_Definition_t xSTAT =

+{

+	"stat", /* The command string to type. */

+	"\r\nstat <filename>:\r\n Show file information\r\n",

+	prvSTATCommand, /* The function to run. */

+	1 /* One parameter is expected. */

+};

+

+/* Structure that defines the STATFS command line command, which shows various

+file system information. */

+static const CLI_Command_Definition_t xSTATFS =

+{

+	"statfs", /* The command string to type. */

+	"\r\nstatfs:\r\n Show file system information.\r\n",

+	prvSTATFSCommand, /* The function to run. */

+	0 /* No parameters are expected. */

+};

+

+/* Structure that defines the FORMAT command line command, which re-formats the

+file system. */

+static const CLI_Command_Definition_t xFORMAT =

+{

+	"format", /* The command string to type. */

+	"\r\nformat:\r\n Re-formats the file system volume.  ALL FILES WILL BE DELETED!\r\n",

+	prvFORMATCommand, /* The function to run. */

+	0 /* No parameters are expected. */

+};

+

+/* Structure that defines the TRANSACT command line command, which commits a

+transaction point. */

+static const CLI_Command_Definition_t xTRANSACT =

+{

+	"transact", /* The command string to type. */

+	"\r\ntransact:\r\n Commit a Reliance Edge transaction point\r\n",

+	prvTRANSACTCommand, /* The function to run. */

+	0 /* No parameters are expected. */

+};

+

+/* Structure that defines the TRANSMASKGET command line command, which retrieves

+the current automatic transaction event mask. */

+static const CLI_Command_Definition_t xTRANSMASKGET =

+{

+	"transmaskget", /* The command string to type. */

+	"\r\ntransmaskget:\r\n Retrieve the Reliance Edge automatic transaction mask\r\n",

+	prvTRANSMASKGETCommand, /* The function to run. */

+	0 /* No parameters are expected. */

+};

+

+/* Structure that defines the TRANSMASKSET command line command, which sets the

+automatic transaction event mask. */

+static const CLI_Command_Definition_t xTRANSMASKSET =

+{

+	"transmaskset", /* The command string to type. */

+	"\r\ntransmaskset <hex mask>:\r\n Set the Reliance Edge automatic transaction mask\r\n",

+	prvTRANSMASKSETCommand, /* The function to run. */

+	1 /* One parameter is expected. */

+};

+

+/* Structure that defines the ABORT command line command, which rolls back

+changes which have not been transacted. */

+static const CLI_Command_Definition_t xABORT =

+{

+	"abort", /* The command string to type. */

+	"\r\nabort:\r\n Roll back all changes not part of the last transaction point\r\n",

+	prvABORTCommand, /* The function to run. */

+	0 /* No parameters are expected. */

+};

+

+/* Structure that defines the TEST-FS command line command, which executes some

+file system driver tests. */

+static const CLI_Command_Definition_t xTEST_FS =

+{

+	"test-fs", /* The command string to type. */

+	"\r\ntest-fs:\r\n Executes file system tests.  ALL FILES WILL BE DELETED!\r\n",

+	prvTESTFSCommand, /* The function to run. */

+	0 /* No parameters are expected. */

+};

+

+/*-----------------------------------------------------------*/

+

+void vRegisterFileSystemCLICommands( void )

+{

+	/* Register all the command line commands defined immediately above. */

+	FreeRTOS_CLIRegisterCommand( &xDIR );

+	FreeRTOS_CLIRegisterCommand( &xTYPE );

+	FreeRTOS_CLIRegisterCommand( &xAPPEND );

+	FreeRTOS_CLIRegisterCommand( &xDEL );

+	FreeRTOS_CLIRegisterCommand( &xCOPY );

+	FreeRTOS_CLIRegisterCommand( &xCREATE );

+	FreeRTOS_CLIRegisterCommand( &xMKDIR );

+	FreeRTOS_CLIRegisterCommand( &xRENAME );

+	FreeRTOS_CLIRegisterCommand( &xLINK );

+	FreeRTOS_CLIRegisterCommand( &xSTAT );

+	FreeRTOS_CLIRegisterCommand( &xSTATFS );

+	FreeRTOS_CLIRegisterCommand( &xFORMAT );

+	FreeRTOS_CLIRegisterCommand( &xTRANSACT );

+	FreeRTOS_CLIRegisterCommand( &xTRANSMASKGET );

+	FreeRTOS_CLIRegisterCommand( &xTRANSMASKSET );

+	FreeRTOS_CLIRegisterCommand( &xABORT );

+	FreeRTOS_CLIRegisterCommand( &xTEST_FS );

+}

+/*-----------------------------------------------------------*/

+

+static BaseType_t prvDIRCommand( char *pcWriteBuffer, size_t xWriteBufferLen, const char *pcCommandString )

+{

+static REDDIR *pxDir = NULL;

+REDDIRENT *pxDirent;

+const char *pcParameter;

+BaseType_t xParameterStringLength, xReturn = pdFALSE;

+

+	/* This assumes pcWriteBuffer is long enough. */

+	( void ) pcCommandString;

+

+	/* Ensure the buffer leaves space for the \r\n. */

+	configASSERT( xWriteBufferLen > ( strlen( cliNEW_LINE ) * 2 ) );

+	xWriteBufferLen -= strlen( cliNEW_LINE );

+

+	if( pxDir == NULL )

+	{

+		/* Retrieve the directory to DIR. */

+		pcParameter = FreeRTOS_CLIGetParameter

+						(

+							pcCommandString,		/* The command string itself. */

+							1,						/* Return the first parameter. */

+							&xParameterStringLength	/* Store the parameter string length. */

+						);

+

+		/* Sanity check something was returned. */

+		configASSERT( pcParameter );

+

+		/* This is the first time this function has been executed since the Dir

+		command was run.  Open the directory. */

+		pxDir = red_opendir( pcParameter );

+	}

+

+	if( pxDir )

+	{

+		/* red_readdir() returns NULL either on error or upon reaching the

+		end of the directory.  Clear errno so these conditions can be

+		distinguished. */

+		red_errno = 0;

+		pxDirent = red_readdir( pxDir );

+

+		if( pxDirent )

+		{

+			prvCreateFileInfoString( pcWriteBuffer, pxDirent );

+			xReturn = pdPASS;

+		}

+		else if( red_errno == 0 )

+		{

+			/* There are no more files.  Close the directory. */

+			red_closedir( pxDir );

+			pxDir = NULL;

+

+			/* No string to return. */

+			pcWriteBuffer[ 0 ] = 0x00;

+		}

+		else

+		{

+			snprintf( pcWriteBuffer, xWriteBufferLen, "Error %d reading directory.", ( int ) red_errno );

+		}

+	}

+	else

+	{

+		/* User-friendly messages for common errors. */

+		switch( red_errno )

+		{

+			case RED_ENOENT :

+				snprintf( pcWriteBuffer, xWriteBufferLen, "Directory not found." );

+				break;

+

+			case RED_ENOTDIR :

+				snprintf( pcWriteBuffer, xWriteBufferLen, "Directory not found or not a directory." );

+				break;

+

+			default :

+				snprintf( pcWriteBuffer, xWriteBufferLen, "Error %d opening directory.", ( int ) red_errno );

+				break;

+		}

+	}

+

+	strcat( pcWriteBuffer, cliNEW_LINE );

+

+	return xReturn;

+}

+/*-----------------------------------------------------------*/

+

+static BaseType_t prvTYPECommand( char *pcWriteBuffer, size_t xWriteBufferLen, const char *pcCommandString )

+{

+const char *pcParameter;

+BaseType_t xParameterStringLength, xReturn = pdTRUE;

+static int32_t lFildes = -1;

+REDSTAT finfo;

+int32_t lStatus, lBytesRead;

+size_t xColumns = 50U;

+

+	/* Ensure there is always a null terminator after each character written. */

+	memset( pcWriteBuffer, 0x00, xWriteBufferLen );

+

+	/* Ensure the buffer leaves space for the \r\n. */

+	configASSERT( xWriteBufferLen > ( strlen( cliNEW_LINE ) * 2 ) );

+	xWriteBufferLen -= strlen( cliNEW_LINE );

+

+	if( xWriteBufferLen < xColumns )

+	{

+		/* Ensure the loop that uses xColumns as an end condition does not

+		write off the end of the buffer. */

+		xColumns = xWriteBufferLen;

+	}

+

+	if( lFildes == -1 )

+	{

+		/* The file has not been opened yet.  Find the file name. */

+		pcParameter = FreeRTOS_CLIGetParameter

+						(

+							pcCommandString,		/* The command string itself. */

+							1,						/* Return the first parameter. */

+							&xParameterStringLength	/* Store the parameter string length. */

+						);

+

+		/* Sanity check something was returned. */

+		configASSERT( pcParameter );

+

+		/* Attempt to open the requested file. */

+		lFildes = red_open( pcParameter, RED_O_RDONLY );

+		if( lFildes == -1 )

+		{

+			/* User-friendly messages for common errors. */

+			switch( red_errno )

+			{

+				case RED_ENOENT :

+				case RED_ENOTDIR :

+					snprintf( pcWriteBuffer, xWriteBufferLen, "File not found." );

+					break;

+

+				default :

+					snprintf( pcWriteBuffer, xWriteBufferLen, "Error %d opening file.", ( int ) red_errno );

+					break;

+			}

+		}

+		else

+		{

+			/* Make sure this is a file, not a directory. */

+			lStatus = red_fstat( lFildes, &finfo );

+			if( lStatus == 0 )

+			{

+				if( RED_S_ISDIR( finfo.st_mode ) )

+				{

+					snprintf( pcWriteBuffer, xWriteBufferLen, "Cannot TYPE a directory." );

+					red_close( lFildes );

+					lFildes = -1;

+				}

+			}

+			else

+			{

+				snprintf( pcWriteBuffer, xWriteBufferLen, "Error %d querying file.", ( int ) red_errno );

+				red_close( lFildes );

+				lFildes = -1;

+			}

+		}

+	}

+

+	if( lFildes != -1 )

+	{

+		/* Read the next chunk of data from the file. */

+		lBytesRead = red_read( lFildes, pcWriteBuffer, xColumns );

+

+		if( lBytesRead < ( int32_t ) xColumns )

+		{

+			/* Error or no more characters to return. */

+			red_close( lFildes );

+			lFildes = -1;

+		}

+	}

+

+	if( lFildes == -1 )

+	{

+		/* Either the file was not opened, or all the data from the file has

+		been returned and the file is now closed. */

+		xReturn = pdFALSE;

+	}

+

+	strcat( pcWriteBuffer, cliNEW_LINE );

+

+	return xReturn;

+}

+/*-----------------------------------------------------------*/

+

+static BaseType_t prvAPPENDCommand( char *pcWriteBuffer, size_t xWriteBufferLen, const char *pcCommandString )

+{

+char *pcFileName = NULL;

+const char *pcCharacter = NULL, *pcLength;

+BaseType_t xParameterStringLength, xGoodParameters = pdTRUE;

+int32_t lFildes, lAppendLength = -1, lThisWrite, lTotalWritten, lBytesWritten;

+

+	/* This function assumes xWriteBufferLen is large enough! */

+	( void ) xWriteBufferLen;

+

+	/* Find the length to write. */

+	pcLength = FreeRTOS_CLIGetParameter

+					(

+						pcCommandString,		/* The command string itself. */

+						3,						/* Return the third parameter. */

+						&xParameterStringLength	/* Store the parameter string length. */

+					);

+	configASSERT( pcLength );

+

+	/* Convert the string into a number. */

+	lAppendLength = RedAtoI( pcLength );

+	if( lAppendLength < 0 )

+	{

+		strcpy( pcWriteBuffer, "Third parameter cannot be a negative number." );

+		xGoodParameters = pdFALSE;

+	}

+

+	if( xGoodParameters )

+	{

+		/* Find the character to write. */

+		pcCharacter = FreeRTOS_CLIGetParameter

+						(

+							pcCommandString,		/* The command string itself. */

+							2,						/* Return the second parameter. */

+							&xParameterStringLength	/* Store the parameter string length. */

+						);

+		configASSERT( pcCharacter );

+

+		if( xParameterStringLength != 1 )

+		{

+			strcpy( pcWriteBuffer, "Second parameter must be a single character." );

+			xGoodParameters = pdFALSE;

+		}

+	}

+

+	if( xGoodParameters )

+	{

+		/* Find the file name. */

+		pcFileName = ( char * ) FreeRTOS_CLIGetParameter

+								(

+									pcCommandString,		/* The command string itself. */

+									1,						/* Return the first parameter. */

+									&xParameterStringLength	/* Store the parameter string length. */

+								);

+		configASSERT( pcFileName );

+

+		/* Terminate the string. */

+		pcFileName[ xParameterStringLength ] = 0x00;

+	}

+

+	if( xGoodParameters )

+	{

+		/* Attempt to open the requested file. */

+		lFildes = red_open( pcFileName, RED_O_WRONLY|RED_O_APPEND|RED_O_CREAT );

+

+		if( lFildes == -1 )

+		{

+			/* User-friendly messages for common errors. */

+			switch( red_errno )

+			{

+				case RED_ENOENT :

+				case RED_ENOTDIR :

+					strcpy( pcWriteBuffer, "Bad file path." );

+					break;

+

+				case RED_EISDIR :

+					strcpy( pcWriteBuffer, "Cannot append to a directory." );

+					break;

+

+				default :

+					sprintf( pcWriteBuffer, "Error %d opening file.", ( int ) red_errno );

+					break;

+			}

+		}

+		else

+		{

+			/* Put the requested character into the buffer. */

+			memset( pcWriteBuffer, pcCharacter[0], xWriteBufferLen );

+

+			/* Append the data. */

+			for( lTotalWritten = 0; lTotalWritten < lAppendLength; lTotalWritten += lThisWrite )

+			{

+				lThisWrite = lAppendLength - lTotalWritten;

+				if( lThisWrite > ( int32_t ) xWriteBufferLen )

+				{

+					lThisWrite = ( int32_t ) xWriteBufferLen;

+				}

+

+				lBytesWritten = red_write( lFildes, pcWriteBuffer, lThisWrite );

+				if( lBytesWritten == -1 )

+				{

+					/* User-friendly messages for common errors. */

+					switch( red_errno )

+					{

+						case RED_ENOSPC :

+							strcpy( pcWriteBuffer, "Out of disk space." );

+							break;

+

+						default :

+							sprintf( pcWriteBuffer, "Error %d writing to file.", ( int ) red_errno );

+							break;

+					}

+

+					break;

+				}

+				else if( lBytesWritten != lThisWrite )

+				{

+					/*	Some data was written, but not all of it.  This only

+					happens when the disk is full or the file reached its

+					maximum size.  That latter is unlikely in this demo. */

+					strcpy( pcWriteBuffer, "Out of disk space." );

+					break;

+				}

+			}

+

+			if( lTotalWritten == lAppendLength )

+			{

+				strcpy( pcWriteBuffer, "Append successful." );

+			}

+

+			red_close( lFildes );

+		}

+	}

+

+	strcat( pcWriteBuffer, cliNEW_LINE );

+

+	return pdFALSE;

+}

+/*-----------------------------------------------------------*/

+

+static BaseType_t prvDELCommand( char *pcWriteBuffer, size_t xWriteBufferLen, const char *pcCommandString )

+{

+const char *pcParameter;

+BaseType_t xParameterStringLength;

+int32_t lStatus;

+

+	/* This function assumes xWriteBufferLen is large enough! */

+	( void ) xWriteBufferLen;

+

+	/* Obtain the parameter string. */

+	pcParameter = FreeRTOS_CLIGetParameter

+					(

+						pcCommandString,		/* The command string itself. */

+						1,						/* Return the first parameter. */

+						&xParameterStringLength	/* Store the parameter string length. */

+					);

+

+	/* Sanity check something was returned. */

+	configASSERT( pcParameter );

+

+	/* Attempt to delete the file or directory. */

+	lStatus = red_unlink( pcParameter );

+

+	if( lStatus == 0 )

+	{

+		sprintf( pcWriteBuffer, "%s was deleted", pcParameter );

+	}

+	else

+	{

+		/* User-friendly messages for common errors. */

+		switch( red_errno )

+		{

+			case RED_ENOTDIR :

+			case RED_ENOENT :

+				sprintf( pcWriteBuffer, "File not found." );

+				break;

+

+			case RED_ENOTEMPTY :

+				sprintf( pcWriteBuffer, "Cannot remove directory: not empty." );

+				break;

+

+			default :

+				sprintf( pcWriteBuffer, "Error %d deleting file.", ( int ) red_errno );

+				break;

+		}

+	}

+

+	strcat( pcWriteBuffer, cliNEW_LINE );

+

+	return pdFALSE;

+}

+/*-----------------------------------------------------------*/

+

+static BaseType_t prvCOPYCommand( char *pcWriteBuffer, size_t xWriteBufferLen, const char *pcCommandString )

+{

+char *pcSourceFile;

+const char *pcDestinationFile;

+BaseType_t xParameterStringLength;

+int32_t lSourceFildes, lDestinationFildes;

+

+	/* Obtain the name of the destination file. */

+	pcDestinationFile = FreeRTOS_CLIGetParameter

+						(

+							pcCommandString,		/* The command string itself. */

+							2,						/* Return the second parameter. */

+							&xParameterStringLength	/* Store the parameter string length. */

+						);

+

+	/* Sanity check something was returned. */

+	configASSERT( pcDestinationFile );

+

+	/* Obtain the name of the source file. */

+	pcSourceFile = ( char * ) FreeRTOS_CLIGetParameter

+								(

+									pcCommandString,		/* The command string itself. */

+									1,						/* Return the first parameter. */

+									&xParameterStringLength	/* Store the parameter string length. */

+								);

+

+	/* Sanity check something was returned. */

+	configASSERT( pcSourceFile );

+

+	/* Terminate the string. */

+	pcSourceFile[ xParameterStringLength ] = 0x00;

+

+	/* See if the source file exists, openm it if it does. */

+	lSourceFildes = red_open( pcSourceFile, RED_O_RDONLY );

+

+	if( lSourceFildes == -1 )

+	{

+		sprintf( pcWriteBuffer, "Source file does not exist" );

+	}

+	else

+	{

+		/* Create the destination file, error if it already exists. */

+		lDestinationFildes = red_open( pcDestinationFile, RED_O_CREAT|RED_O_EXCL|RED_O_WRONLY );

+

+		if( lDestinationFildes == -1 )

+		{

+			sprintf( pcWriteBuffer, "Error: Destination file already exists" );

+		}

+		else

+		{

+			if( prvPerformCopy( lSourceFildes, lDestinationFildes, pcWriteBuffer, xWriteBufferLen ) == pdPASS )

+			{

+				sprintf( pcWriteBuffer, "Copy made" );

+			}

+			else

+			{

+				sprintf( pcWriteBuffer, "Error during copy" );

+			}

+

+			red_close( lDestinationFildes );

+		}

+

+		red_close( lSourceFildes );

+	}

+

+	strcat( pcWriteBuffer, cliNEW_LINE );

+

+	return pdFALSE;

+}

+/*-----------------------------------------------------------*/

+

+static BaseType_t prvCREATECommand( char *pcWriteBuffer, size_t xWriteBufferLen, const char *pcCommandString )

+{

+const char *pcParameter;

+BaseType_t xParameterStringLength;

+int32_t lFildes;

+

+	/* This function assumes xWriteBufferLen is large enough! */

+	( void ) xWriteBufferLen;

+

+	/* Obtain the parameter string. */

+	pcParameter = FreeRTOS_CLIGetParameter

+					(

+						pcCommandString,		/* The command string itself. */

+						1,						/* Return the first parameter. */

+						&xParameterStringLength	/* Store the parameter string length. */

+					);

+

+	/* Sanity check something was returned. */

+	configASSERT( pcParameter );

+

+	/* Attempt to create the file. */

+	lFildes = red_open( pcParameter, RED_O_CREAT|RED_O_EXCL|RED_O_RDWR );

+

+	if( lFildes != -1 )

+	{

+		sprintf( pcWriteBuffer, "%s was created", pcParameter );

+		red_close( lFildes );

+	}

+	else

+	{

+		/* User-friendly messages for common errors. */

+		switch( red_errno )

+		{

+			case RED_ENOTDIR :

+			case RED_ENOENT :

+				sprintf( pcWriteBuffer, "Bad file path." );

+				break;

+

+			case RED_EEXIST :

+				sprintf( pcWriteBuffer, "File already exists." );

+				break;

+

+			default :

+				sprintf( pcWriteBuffer, "Error %d creating file.", ( int ) red_errno );

+				break;

+		}

+	}

+

+	strcat( pcWriteBuffer, cliNEW_LINE );

+

+	return pdFALSE;

+}

+/*-----------------------------------------------------------*/

+

+static BaseType_t prvMKDIRCommand( char *pcWriteBuffer, size_t xWriteBufferLen, const char *pcCommandString )

+{

+const char *pcParameter;

+BaseType_t xParameterStringLength;

+int32_t lStatus;

+

+	/* This function assumes xWriteBufferLen is large enough! */

+	( void ) xWriteBufferLen;

+

+	/* Obtain the parameter string. */

+	pcParameter = FreeRTOS_CLIGetParameter

+					(

+						pcCommandString,		/* The command string itself. */

+						1,						/* Return the first parameter. */

+						&xParameterStringLength	/* Store the parameter string length. */

+					);

+

+	/* Sanity check something was returned. */

+	configASSERT( pcParameter );

+

+	/* Attempt to create the file. */

+	lStatus = red_mkdir( pcParameter );

+

+	if( lStatus == 0 )

+	{

+		sprintf( pcWriteBuffer, "%s was created", pcParameter );

+	}

+	else

+	{

+		/* User-friendly messages for common errors. */

+		switch( red_errno )

+		{

+			case RED_ENOTDIR :

+			case RED_ENOENT :

+				sprintf( pcWriteBuffer, "Bad file path." );

+				break;

+

+			case RED_EEXIST :

+				sprintf( pcWriteBuffer, "Directory already exists." );

+				break;

+

+			default :

+				sprintf( pcWriteBuffer, "Error %d creating directory.", ( int ) red_errno );

+				break;

+		}

+	}

+

+	strcat( pcWriteBuffer, cliNEW_LINE );

+

+	return pdFALSE;

+}

+/*-----------------------------------------------------------*/

+

+static BaseType_t prvRENAMECommand( char *pcWriteBuffer, size_t xWriteBufferLen, const char *pcCommandString )

+{

+const char *pcDestinationFile;

+char *pcSourceFile;

+BaseType_t xParameterStringLength;

+int32_t lStatus;

+

+	/* This function assumes xWriteBufferLen is large enough! */

+	( void ) xWriteBufferLen;

+

+	/* Obtain the name of the destination file. */

+	pcDestinationFile = FreeRTOS_CLIGetParameter

+						(

+							pcCommandString,		/* The command string itself. */

+							2,						/* Return the second parameter. */

+							&xParameterStringLength	/* Store the parameter string length. */

+						);

+

+	/* Sanity check something was returned. */

+	configASSERT( pcDestinationFile );

+

+	/* Obtain the name of the source file. */

+	pcSourceFile = ( char * ) FreeRTOS_CLIGetParameter

+								(

+									pcCommandString,		/* The command string itself. */

+									1,						/* Return the first parameter. */

+									&xParameterStringLength	/* Store the parameter string length. */

+								);

+

+	/* Sanity check something was returned. */

+	configASSERT( pcSourceFile );

+

+	/* Terminate the string. */

+	pcSourceFile[ xParameterStringLength ] = 0x00;

+

+	/* Attempt to rename the file. */

+	lStatus = red_rename( pcSourceFile, pcDestinationFile );

+

+	if( lStatus == 0 )

+	{

+		sprintf( pcWriteBuffer, "%s was renamed to %s", pcSourceFile, pcDestinationFile );

+	}

+	else

+	{

+		/* User-friendly messages for common errors. */

+		switch( red_errno )

+		{

+			case RED_ENOTDIR :

+			case RED_ENOENT :

+			case RED_EISDIR :

+				sprintf( pcWriteBuffer, "Bad file path." );

+				break;

+

+			/* This will only be seen if POSIX rename is disabled. */

+			case RED_EEXIST :

+				sprintf( pcWriteBuffer, "Destination already exists." );

+				break;

+

+			default :

+				sprintf( pcWriteBuffer, "Error %d renaming file.", ( int ) red_errno );

+				break;

+		}

+	}

+

+	strcat( pcWriteBuffer, cliNEW_LINE );

+

+	return pdFALSE;

+}

+/*-----------------------------------------------------------*/

+

+static BaseType_t prvLINKCommand( char *pcWriteBuffer, size_t xWriteBufferLen, const char *pcCommandString )

+{

+const char *pcDestinationFile;

+char *pcSourceFile;

+BaseType_t xParameterStringLength;

+int32_t lStatus;

+

+	/* This function assumes xWriteBufferLen is large enough! */

+	( void ) xWriteBufferLen;

+

+	/* Obtain the name of the destination file. */

+	pcDestinationFile = FreeRTOS_CLIGetParameter

+						(

+							pcCommandString,		/* The command string itself. */

+							2,						/* Return the second parameter. */

+							&xParameterStringLength	/* Store the parameter string length. */

+						);

+

+	/* Sanity check something was returned. */

+	configASSERT( pcDestinationFile );

+

+	/* Obtain the name of the source file. */

+	pcSourceFile = ( char * ) FreeRTOS_CLIGetParameter

+								(

+									pcCommandString,		/* The command string itself. */

+									1,						/* Return the first parameter. */

+									&xParameterStringLength	/* Store the parameter string length. */

+								);

+

+	/* Sanity check something was returned. */

+	configASSERT( pcSourceFile );

+

+	/* Terminate the string. */

+	pcSourceFile[ xParameterStringLength ] = 0x00;

+

+	/* Attempt to create the hard link. */

+	lStatus = red_link( pcSourceFile, pcDestinationFile );

+

+	if( lStatus == 0 )

+	{

+		sprintf( pcWriteBuffer, "%s was linked to %s", pcDestinationFile, pcSourceFile );

+	}

+	else

+	{

+		/* User-friendly messages for common errors. */

+		switch( red_errno )

+		{

+			case RED_ENOTDIR :

+			case RED_ENOENT :

+				sprintf( pcWriteBuffer, "Bad file path." );

+				break;

+

+			case RED_EPERM :

+				sprintf( pcWriteBuffer, "Cannot link a directory." );

+				break;

+

+			case RED_EMLINK :

+				sprintf( pcWriteBuffer, "Too many hard links." );

+				break;

+

+			default :

+				sprintf( pcWriteBuffer, "Error %d linking file.", ( int ) red_errno );

+				break;

+		}

+	}

+

+	strcat( pcWriteBuffer, cliNEW_LINE );

+

+	return pdFALSE;

+}

+/*-----------------------------------------------------------*/

+

+static BaseType_t prvSTATCommand( char *pcWriteBuffer, size_t xWriteBufferLen, const char *pcCommandString )

+{

+const char *pcParameter, *pcModeString;

+BaseType_t xParameterStringLength;

+REDSTAT finfo;

+int32_t lFildes, lStatus;

+

+	/* Ensure the buffer leaves space for the \r\n. */

+	configASSERT( xWriteBufferLen > ( strlen( cliNEW_LINE ) * 2 ) );

+	xWriteBufferLen -= strlen( cliNEW_LINE );

+

+	/* Find the file name. */

+	pcParameter = FreeRTOS_CLIGetParameter

+					(

+						pcCommandString,		/* The command string itself. */

+						1,						/* Return the first parameter. */

+						&xParameterStringLength	/* Store the parameter string length. */

+					);

+

+	/* Sanity check something was returned. */

+	configASSERT( pcParameter );

+

+	/* Attempt to open the requested file. */

+	lFildes = red_open( pcParameter, RED_O_RDONLY );

+	if( lFildes == -1 )

+	{

+		/* User-friendly messages for common errors. */

+		switch( red_errno )

+		{

+			case RED_ENOENT :

+			case RED_ENOTDIR :

+				snprintf( pcWriteBuffer, xWriteBufferLen, "File not found." );

+				break;

+

+			default :

+				snprintf( pcWriteBuffer, xWriteBufferLen, "Error %d opening file.", ( int ) red_errno );

+				break;

+		}

+	}

+	else

+	{

+		lStatus = red_fstat( lFildes, &finfo );

+		if( lStatus == 0 )

+		{

+			if( RED_S_ISDIR( finfo.st_mode ) )

+			{

+				pcModeString = "dir";

+			}

+			else

+			{

+				pcModeString = "file";

+			}

+

+			snprintf( pcWriteBuffer, xWriteBufferLen, "ino=%lu mode=0x%04x(%s) nlink=%x size=%lu blocks=%lu",

+				( unsigned long ) finfo.st_ino, ( unsigned ) finfo.st_mode, pcModeString,

+				( unsigned ) finfo.st_nlink, (unsigned long) finfo.st_size, (unsigned long) finfo.st_blocks );

+		}

+		else

+		{

+			snprintf( pcWriteBuffer, xWriteBufferLen, "Error %d querying file.", ( int ) red_errno );

+		}

+

+		red_close( lFildes );

+	}

+

+	strcat( pcWriteBuffer, cliNEW_LINE );

+

+	return pdFALSE;

+}

+/*-----------------------------------------------------------*/

+

+static BaseType_t prvSTATFSCommand( char *pcWriteBuffer, size_t xWriteBufferLen, const char *pcCommandString )

+{

+REDSTATFS fsinfo;

+int32_t lStatus;

+

+	/* Avoid compiler warnings. */

+	( void ) pcCommandString;

+

+	/* Ensure the buffer leaves space for the \r\n. */

+	configASSERT( xWriteBufferLen > ( strlen( cliNEW_LINE ) * 2 ) );

+	xWriteBufferLen -= strlen( cliNEW_LINE );

+

+	lStatus = red_statvfs( "", &fsinfo );

+

+	if( lStatus == -1 )

+	{

+		snprintf( pcWriteBuffer, xWriteBufferLen, "Error %d querying file system.", ( int ) red_errno );

+	}

+	else

+	{

+		snprintf( pcWriteBuffer, xWriteBufferLen,

+			"Block size: %lu\r\n"

+			"Block count: %lu\r\n"

+			"Free blocks: %lu\r\n"

+			"Inode count: %lu\r\n"

+			"Free inodes: %lu\r\n",

+			( unsigned long ) fsinfo.f_bsize, ( unsigned long ) fsinfo.f_blocks,

+			( unsigned long ) fsinfo.f_bfree, ( unsigned long ) fsinfo.f_files,

+			( unsigned long ) fsinfo.f_ffree );

+	}

+

+	strcat( pcWriteBuffer, cliNEW_LINE );

+

+	return pdFALSE;

+}

+/*-----------------------------------------------------------*/

+

+static BaseType_t prvFORMATCommand( char *pcWriteBuffer, size_t xWriteBufferLen, const char *pcCommandString )

+{

+int32_t lStatus;

+

+	/* Avoid compiler warnings. */

+	( void ) pcCommandString;

+

+	/* This function assumes xWriteBufferLen is large enough! */

+	( void ) xWriteBufferLen;

+

+	/* File system volumes cannot be formatted while mounted. */

+	lStatus = red_umount( "" );

+	if( lStatus == -1 )

+	{

+		sprintf( pcWriteBuffer, "Error %d during unmount.",  ( int ) red_errno );

+	}

+	else

+	{

+		/* Re-format the file system volume. */

+		lStatus = red_format( "" );

+

+		if( lStatus == -1 )

+		{

+			sprintf( pcWriteBuffer, "Error %d during format.",  ( int ) red_errno );

+		}

+		else

+		{

+			/* Mount again so that other commands will work properly. */

+			lStatus = red_mount( "" );

+

+			if( lStatus == -1 )

+			{

+				sprintf( pcWriteBuffer, "Error %d during mount.",  ( int ) red_errno );

+			}

+			else

+			{

+				strcpy( pcWriteBuffer, "Format successful." );

+			}

+		}

+	}

+

+	strcat( pcWriteBuffer, cliNEW_LINE );

+

+	return pdFALSE;

+}

+/*-----------------------------------------------------------*/

+

+static BaseType_t prvTRANSACTCommand( char *pcWriteBuffer, size_t xWriteBufferLen, const char *pcCommandString )

+{

+int32_t lStatus;

+

+	/* Avoid compiler warnings. */

+	( void ) pcCommandString;

+

+	/* This function assumes xWriteBufferLen is large enough! */

+	( void ) xWriteBufferLen;

+

+	/* Save the original transaction mask settings. */

+	lStatus = red_transact( "" );

+

+	if( lStatus == -1 )

+	{

+		sprintf( pcWriteBuffer, "Error %d during transaction point.",  ( int ) red_errno );

+	}

+	else

+	{

+		strcpy( pcWriteBuffer, "Transaction point successful." );

+	}

+

+	strcat( pcWriteBuffer, cliNEW_LINE );

+

+	return pdFALSE;

+}

+/*-----------------------------------------------------------*/

+

+static BaseType_t prvTRANSMASKGETCommand( char *pcWriteBuffer, size_t xWriteBufferLen, const char *pcCommandString )

+{

+uint32_t ulEventMask;

+int32_t lStatus;

+

+	/* Avoid compiler warnings. */

+	( void ) pcCommandString;

+

+	/* Ensure the buffer leaves space for the \r\n. */

+	configASSERT( xWriteBufferLen > ( strlen( cliNEW_LINE ) * 2 ) );

+	xWriteBufferLen -= strlen( cliNEW_LINE );

+

+	lStatus = red_gettransmask( "", &ulEventMask );

+	if( lStatus == -1 )

+	{

+		snprintf( pcWriteBuffer, xWriteBufferLen, "Error %d retrieving automatic transaction event mask.",  ( int ) red_errno );

+	}

+	else

+	{

+		snprintf( pcWriteBuffer, xWriteBufferLen,

+			"Current automatic transaction event mask: 0x%04lx\r\n"

+			"RED_TRANSACT_UMOUNT   (0x0001): %s\r\n"

+			"RED_TRANSACT_CREAT    (0x0002): %s\r\n"

+			"RED_TRANSACT_UNLINK   (0x0004): %s\r\n"

+			"RED_TRANSACT_MKDIR    (0x0008): %s\r\n"

+			"RED_TRANSACT_RENAME   (0x0010): %s\r\n"

+			"RED_TRANSACT_LINK     (0x0020): %s\r\n"

+			"RED_TRANSACT_CLOSE    (0x0040): %s\r\n"

+			"RED_TRANSACT_WRITE    (0x0080): %s\r\n"

+			"RED_TRANSACT_FSYNC    (0x0100): %s\r\n"

+			"RED_TRANSACT_TRUNCATE (0x0200): %s\r\n"

+			"RED_TRANSACT_VOLFULL  (0x0400): %s\r\n",

+			( unsigned long ) ulEventMask,

+			( ulEventMask & RED_TRANSACT_UMOUNT )   ? "Enabled" : "Disabled",

+			( ulEventMask & RED_TRANSACT_CREAT )    ? "Enabled" : "Disabled",

+			( ulEventMask & RED_TRANSACT_UNLINK )   ? "Enabled" : "Disabled",

+			( ulEventMask & RED_TRANSACT_MKDIR )    ? "Enabled" : "Disabled",

+			( ulEventMask & RED_TRANSACT_RENAME )   ? "Enabled" : "Disabled",

+			( ulEventMask & RED_TRANSACT_LINK )     ? "Enabled" : "Disabled",

+			( ulEventMask & RED_TRANSACT_CLOSE )    ? "Enabled" : "Disabled",

+			( ulEventMask & RED_TRANSACT_WRITE )    ? "Enabled" : "Disabled",

+			( ulEventMask & RED_TRANSACT_FSYNC )    ? "Enabled" : "Disabled",

+			( ulEventMask & RED_TRANSACT_TRUNCATE ) ? "Enabled" : "Disabled",

+			( ulEventMask & RED_TRANSACT_VOLFULL )  ? "Enabled" : "Disabled" );

+	}

+

+	strcat( pcWriteBuffer, cliNEW_LINE );

+

+	return pdFALSE;

+}

+/*-----------------------------------------------------------*/

+

+static BaseType_t prvTRANSMASKSETCommand( char *pcWriteBuffer, size_t xWriteBufferLen, const char *pcCommandString )

+{

+const char *pcParameter;

+BaseType_t xParameterStringLength;

+uint32_t ulEventMask;

+int32_t lStatus;

+

+	/* Ensure the buffer leaves space for the \r\n. */

+	configASSERT( xWriteBufferLen > ( strlen( cliNEW_LINE ) * 2 ) );

+	xWriteBufferLen -= strlen( cliNEW_LINE );

+

+	/* Obtain the parameter string. */

+	pcParameter = FreeRTOS_CLIGetParameter

+					(

+						pcCommandString,		/* The command string itself. */

+						1,						/* Return the first parameter. */

+						&xParameterStringLength	/* Store the parameter string length. */

+					);

+

+	/* Sanity check something was returned. */

+	configASSERT( pcParameter );

+

+	if( ( pcParameter[0] == '0' ) && ( ( pcParameter[1] == 'x' ) || ( pcParameter[1] == 'X' ) ) )

+	{

+		pcParameter += 2;

+	}

+

+	/* Convert the argument into a value. */

+	RedHtoUL( pcParameter, &ulEventMask );

+

+	/* Set the new transaction mask. */

+	lStatus = red_settransmask( "", ulEventMask );

+	if( lStatus == -1 )

+	{

+		/* User-friendly messages for common errors. */

+		switch( red_errno )

+		{

+			case RED_EINVAL:

+				snprintf( pcWriteBuffer, xWriteBufferLen, "Invalid bits in transaction mask." );

+				break;

+

+			default :

+				snprintf( pcWriteBuffer, xWriteBufferLen, "Error %d setting transaction mask.", ( int ) red_errno );

+				break;

+		}

+	}

+	else

+	{

+		snprintf( pcWriteBuffer, xWriteBufferLen,

+			"Successfully set automatic transaction mask.  Enabled events:\r\n"

+			"RED_TRANSACT_UMOUNT   (0x0001): %s\r\n"

+			"RED_TRANSACT_CREAT    (0x0002): %s\r\n"

+			"RED_TRANSACT_UNLINK   (0x0004): %s\r\n"

+			"RED_TRANSACT_MKDIR    (0x0008): %s\r\n"

+			"RED_TRANSACT_RENAME   (0x0010): %s\r\n"

+			"RED_TRANSACT_LINK     (0x0020): %s\r\n"

+			"RED_TRANSACT_CLOSE    (0x0040): %s\r\n"

+			"RED_TRANSACT_WRITE    (0x0080): %s\r\n"

+			"RED_TRANSACT_FSYNC    (0x0100): %s\r\n"

+			"RED_TRANSACT_TRUNCATE (0x0200): %s\r\n"

+			"RED_TRANSACT_VOLFULL  (0x0400): %s\r\n",

+			( ulEventMask & RED_TRANSACT_UMOUNT )   ? "Enabled" : "Disabled",

+			( ulEventMask & RED_TRANSACT_CREAT )    ? "Enabled" : "Disabled",

+			( ulEventMask & RED_TRANSACT_UNLINK )   ? "Enabled" : "Disabled",

+			( ulEventMask & RED_TRANSACT_MKDIR )    ? "Enabled" : "Disabled",

+			( ulEventMask & RED_TRANSACT_RENAME )   ? "Enabled" : "Disabled",

+			( ulEventMask & RED_TRANSACT_LINK )     ? "Enabled" : "Disabled",

+			( ulEventMask & RED_TRANSACT_CLOSE )    ? "Enabled" : "Disabled",

+			( ulEventMask & RED_TRANSACT_WRITE )    ? "Enabled" : "Disabled",

+			( ulEventMask & RED_TRANSACT_FSYNC )    ? "Enabled" : "Disabled",

+			( ulEventMask & RED_TRANSACT_TRUNCATE ) ? "Enabled" : "Disabled",

+			( ulEventMask & RED_TRANSACT_VOLFULL )  ? "Enabled" : "Disabled" );

+	}

+

+	strcat( pcWriteBuffer, cliNEW_LINE );

+

+	return pdFALSE;

+}

+/*-----------------------------------------------------------*/

+

+static BaseType_t prvABORTCommand( char *pcWriteBuffer, size_t xWriteBufferLen, const char *pcCommandString )

+{

+uint32_t ulEventMask;

+int32_t lStatus;

+

+	/* Avoid compiler warnings. */

+	( void ) pcCommandString;

+

+	/* This function assumes xWriteBufferLen is large enough! */

+	( void ) xWriteBufferLen;

+

+	/* Save the original transaction mask settings. */

+	lStatus = red_gettransmask( "", &ulEventMask );

+

+	if( lStatus == -1 )

+	{

+		sprintf( pcWriteBuffer, "Error %d querying transaction mask.",  ( int ) red_errno );

+	}

+	else

+	{

+		/* Make it so that red_umount() will not automatically commit a new

+		transaction point. */

+		lStatus = red_settransmask( "", ulEventMask & ~( ( uint32_t ) RED_TRANSACT_UMOUNT ) );

+

+		if( lStatus == -1 )

+		{

+			sprintf( pcWriteBuffer, "Error %d setting transaction mask.",  ( int ) red_errno );

+		}

+		else

+		{

+			/* Unmount.  Since red_umount() will not transact, all changes which

+			were not already transacted are rolled back. */

+			lStatus = red_umount( "" );

+

+			if( lStatus == -1 )

+			{

+				sprintf( pcWriteBuffer, "Error %d during unmount.",  ( int ) red_errno );

+			}

+			else

+			{

+				/* Mount.  Mount always starts from the last transaction point. */

+				lStatus = red_mount( "" );

+

+				if( lStatus == -1 )

+				{

+					sprintf( pcWriteBuffer, "Error %d during mount.",  ( int ) red_errno );

+				}

+				else

+				{

+					strcpy( pcWriteBuffer, "Working state changes succesfully aborted." );

+				}

+			}

+

+			/* Restore the original transaction mask settings. */

+			red_settransmask( "", ulEventMask );

+		}

+	}

+

+	strcat( pcWriteBuffer, cliNEW_LINE );

+

+	return pdFALSE;

+}

+/*-----------------------------------------------------------*/

+

+static BaseType_t prvTESTFSCommand( char *pcWriteBuffer, size_t xWriteBufferLen, const char *pcCommandString )

+{

+UBaseType_t uxOriginalPriority;

+FSSTRESSPARAM param;

+

+	/* Avoid compiler warnings. */

+	( void ) xWriteBufferLen;

+	( void ) pcCommandString;

+

+	/* Limitations in the interaction with the Windows TCP/IP stack require

+	the command console to run at the idle priority.  Raise the priority for

+	the duration of the tests to ensure there are not multiple switches to the

+	idle task as in the simulated environment the idle task hook function may

+	include a (relatively) long delay. */

+	uxOriginalPriority = uxTaskPriorityGet( NULL );

+	vTaskPrioritySet( NULL, configMAX_PRIORITIES - 1 );

+

+	/* Delete all files to avoid inteferring with the test. */

+	red_umount( "" );

+	red_format( "" );

+	red_mount( "" );

+

+	FsstressDefaultParams(&param);

+	param.fVerbose = pdTRUE;

+	param.ulNops = 10000;

+	param.ulSeed = 1;

+	FsstressStart(&param);

+

+	/* Clean up after the test. */

+	red_umount( "" );

+	red_format( "" );

+	red_mount( "" );

+

+	/* Reset back to the original priority. */

+	vTaskPrioritySet( NULL, uxOriginalPriority );

+

+	sprintf( pcWriteBuffer, "%s", "Test results were sent to Windows console" );

+	strcat( pcWriteBuffer, cliNEW_LINE );

+

+	return pdFALSE;

+}

+/*-----------------------------------------------------------*/

+

+static BaseType_t prvPerformCopy( int32_t lSourceFildes,

+									int32_t lDestinationFiledes,

+									char *pxWriteBuffer,

+									size_t xWriteBufferLen )

+{

+int32_t lBytesRead;

+BaseType_t xReturn = pdPASS;

+

+	/* Assuming both files are at offset zero. */

+

+	for( ;; )

+	{

+		/* Read the next block of data. */

+		lBytesRead = red_read( lSourceFildes, pxWriteBuffer, xWriteBufferLen );

+		if( lBytesRead <= 0 )

+		{

+			if( lBytesRead == -1)

+			{

+				/* Error reading from file. */

+				xReturn = pdFAIL;

+			}

+			else

+			{

+				/* No error: reached end of file, time to stop. */

+			}

+

+			break;

+		}

+

+		/* Write the block of data to the end of the file. */

+		if( red_write( lDestinationFiledes, pxWriteBuffer, lBytesRead ) != lBytesRead )

+		{

+			xReturn = pdFAIL;

+			break;

+		}

+	}

+

+	return xReturn;

+}

+/*-----------------------------------------------------------*/

+

+static void prvCreateFileInfoString( char *pcBuffer, REDDIRENT *pxDirent )

+{

+const char *pcFile = "file", *pcDirectory = "directory";

+const char *pcAttrib;

+

+	/* Point pcAttrib to a string that describes the file. */

+	if( RED_S_ISDIR(pxDirent->d_stat.st_mode) )

+	{

+		pcAttrib = pcDirectory;

+	}

+	else

+	{

+		pcAttrib = pcFile;

+	}

+

+	/* Create a string that includes the file name, the file size and the

+	attributes string. */

+	sprintf( pcBuffer, "%s [%s] [size=%d]", pxDirent->d_name, pcAttrib, pxDirent->d_stat.st_size );

+}

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
new file mode 100644
index 0000000..a1fc4a2
--- /dev/null
+++ b/FreeRTOS-Plus/Demo/FreeRTOS_Plus_Reliance_Edge_and_CLI_Windows_Simulator/File-system-demo.c
@@ -0,0 +1,331 @@
+/*

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

+    All rights reserved

+

+    VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

+

+    This file is part of the FreeRTOS distribution.

+

+    FreeRTOS is free software; you can redistribute it and/or modify it under

+    the terms of the GNU General Public License (version 2) as published by the

+    Free Software Foundation >>!AND MODIFIED BY!<< the FreeRTOS exception.

+

+    ***************************************************************************

+    >>!   NOTE: The modification to the GPL is included to allow you to     !<<

+    >>!   distribute a combined work that includes FreeRTOS without being   !<<

+    >>!   obliged to provide the source code for proprietary components     !<<

+    >>!   outside of the FreeRTOS kernel.                                   !<<

+    ***************************************************************************

+

+    FreeRTOS is distributed in the hope that it will be useful, but WITHOUT ANY

+    WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS

+    FOR A PARTICULAR PURPOSE.  Full license text is available on the following

+    link: http://www.freertos.org/a00114.html

+

+    ***************************************************************************

+     *                                                                       *

+     *    FreeRTOS provides completely free yet professionally developed,    *

+     *    robust, strictly quality controlled, supported, and cross          *

+     *    platform software that is more than just the market leader, it     *

+     *    is the industry's de facto standard.                               *

+     *                                                                       *

+     *    Help yourself get started quickly while simultaneously helping     *

+     *    to support the FreeRTOS project by purchasing a FreeRTOS           *

+     *    tutorial book, reference manual, or both:                          *

+     *    http://www.FreeRTOS.org/Documentation                              *

+     *                                                                       *

+    ***************************************************************************

+

+    http://www.FreeRTOS.org/FAQHelp.html - Having a problem?  Start by reading

+    the FAQ page "My application does not run, what could be wrong?".  Have you

+    defined configASSERT()?

+

+    http://www.FreeRTOS.org/support - In return for receiving this top quality

+    embedded software for free we request you assist our global community by

+    participating in the support forum.

+

+    http://www.FreeRTOS.org/training - Investing in training allows your team to

+    be as productive as possible as early as possible.  Now you can receive

+    FreeRTOS training directly from Richard Barry, CEO of Real Time Engineers

+    Ltd, and the world's leading authority on the world's leading RTOS.

+

+    http://www.FreeRTOS.org/plus - A selection of FreeRTOS ecosystem products,

+    including FreeRTOS+Trace - an indispensable productivity tool, a DOS

+    compatible FAT file system, and our tiny thread aware UDP/IP stack.

+

+    http://www.FreeRTOS.org/labs - Where new FreeRTOS products go to incubate.

+    Come and try FreeRTOS+TCP, our new open source TCP/IP stack for FreeRTOS.

+

+    http://www.OpenRTOS.com - Real Time Engineers ltd. license FreeRTOS to High

+    Integrity Systems ltd. to sell under the OpenRTOS brand.  Low cost OpenRTOS

+    licenses offer ticketed support, indemnification and commercial middleware.

+

+    http://www.SafeRTOS.com - High Integrity Systems also provide a safety

+    engineered and independently SIL3 certified version for use in safety and

+    mission critical applications that require provable dependability.

+

+    1 tab == 4 spaces!

+*/

+

+/*******************************************************************************

+ * See the URL in the comments within main.c for the location of the online

+ * documentation.

+ ******************************************************************************/

+

+/* Standard includes. */

+#include <stdio.h>

+

+/* FreeRTOS includes. */

+#include "FreeRTOS.h"

+

+/* File system includes. */

+#include <redposix.h>

+

+/* The number of bytes read/written to the example files at a time. */

+#define fsRAM_BUFFER_SIZE	200

+

+/* The volume prefix is an empty string, for convenience since there is only one

+volume in this demo.

+*/

+#define fsVOLUME_NAME		""

+

+/*-----------------------------------------------------------*/

+

+/*

+ * Creates and verifies different files on the volume, demonstrating the use of

+ * various different API functions.

+ */

+void vCreateAndVerifySampleFiles( void );

+

+/*

+ * Create a set of example files in the root directory of the volume using

+ * f_write().

+ */

+static void prvCreateDemoFiles( void );

+

+/*

+ * Use f_read() to read back and verify the files that were created by

+ * prvCreateDemoFiles().

+ */

+static void prvVerifyDemoFiles( void );

+

+/*-----------------------------------------------------------*/

+

+/* A buffer used to both create content to write to disk, and read content back

+from a disk.  Note there is no mutual exclusion on this buffer. */

+static char cRAMBuffer[ fsRAM_BUFFER_SIZE ];

+

+/* Names of directories that are created. */

+static const char *pcDirectory1 = "/SUB1", *pcDirectory2 = "/SUB1/SUB2";

+

+/*-----------------------------------------------------------*/

+

+void vCreateAndVerifySampleFiles( void )

+{

+int32_t lStatus;

+

+	/* First initialize the Reliance Edge driver. */

+	lStatus = red_init();

+

+	/* Format the volume. */

+	if( lStatus == 0 )

+	{

+		lStatus = red_format( fsVOLUME_NAME );

+	}

+

+	/* Mount the volume. */

+	if( lStatus == 0 )

+	{

+		lStatus = red_mount( fsVOLUME_NAME );

+	}

+

+	if( lStatus == 0 )

+	{

+		/* Create a set of files using red_write(). */

+		prvCreateDemoFiles();

+

+		/* Read back and verify the files that were created using red_write(). */

+		prvVerifyDemoFiles();

+	}

+}

+/*-----------------------------------------------------------*/

+

+static void prvCreateDemoFiles( void )

+{

+BaseType_t xFileNumber, xWriteNumber;

+char cFilePath[ 64 ];

+const BaseType_t xMaxFiles = 5;

+uint32_t ulEventMask;

+int32_t lBytesWritten, lFildes, lStatus;

+int iByte;

+

+	/* Save the current transaction point settings. */

+	lStatus = red_gettransmask( fsVOLUME_NAME, &ulEventMask );

+	configASSERT( lStatus == 0 );

+

+	/* Disable automatic transaction points so that all of the files can be

+	created in one atomic operation. */

+	lStatus = red_settransmask( fsVOLUME_NAME, RED_TRANSACT_MANUAL );

+	configASSERT( lStatus == 0 );

+

+	/* Create xMaxFiles files.  Each created file will be

+	( xFileNumber * fsRAM_BUFFER_SIZE ) bytes in length, and filled

+	with a different repeating character. */

+	for( xFileNumber = 1; xFileNumber <= xMaxFiles; xFileNumber++ )

+	{

+		/* Generate a file name. */

+		sprintf( cFilePath, "/root%03d.txt", xFileNumber );

+

+		/* Print out the file name and the directory into which the file is

+		being written. */

+		printf( "Creating file %s\r\n", cFilePath );

+

+		/* Open the file, creating the file if it does not already exist. */

+		lFildes = red_open( cFilePath, RED_O_CREAT|RED_O_TRUNC|RED_O_WRONLY );

+		configASSERT( lFildes != -1 );

+

+		/* Fill the RAM buffer with data that will be written to the file.  This

+		is just a repeating ascii character that indicates the file number. */

+		memset( cRAMBuffer, ( int ) ( '0' + xFileNumber ), fsRAM_BUFFER_SIZE );

+

+		/* Write the RAM buffer to the opened file a number of times.  The

+		number of times the RAM buffer is written to the file depends on the

+		file number, so the length of each created file will be different. */

+		for( xWriteNumber = 0; xWriteNumber < xFileNumber; xWriteNumber++ )

+		{

+			lBytesWritten = red_write( lFildes, cRAMBuffer, fsRAM_BUFFER_SIZE );

+			configASSERT( lBytesWritten == fsRAM_BUFFER_SIZE );

+		}

+

+		/* Close the file so another file can be created. */

+		lStatus = red_close( lFildes );

+		configASSERT( lStatus == 0 );

+	}

+

+	/* Commit a transaction point, atomically adding the set of files to the

+	transacted state. */

+	lStatus = red_transact( fsVOLUME_NAME );

+	configASSERT( lStatus == 0 );

+

+	/* Create a sub directory. */

+	printf( "Creating directory %s\r\n", pcDirectory1 );

+

+	lStatus = red_mkdir( pcDirectory1 );

+	configASSERT( lStatus == 0 );

+

+	/* Create a subdirectory in the new directory. */

+	printf( "Creating directory %s\r\n", pcDirectory2 );

+

+	lStatus = red_mkdir( pcDirectory2 );

+	configASSERT( lStatus == 0 );

+

+	/* Generate the file name. */

+	sprintf( cFilePath, "%s/file.txt", pcDirectory2 );

+

+	/* Print out the file name and the directory into which the file is being

+	written. */

+	printf( "Writing file %s\r\n", cFilePath );

+

+	lFildes = red_open( cFilePath, RED_O_CREAT|RED_O_TRUNC|RED_O_WRONLY );

+

+	/* Write the file.  It is filled with incrementing ascii characters starting

+	from '0'. */

+	for( iByte = 0; iByte < fsRAM_BUFFER_SIZE; iByte++ )

+	{

+		cRAMBuffer[ iByte ] = ( char ) ( ( int ) '0' + iByte );

+	}

+

+	lBytesWritten = red_write( lFildes, cRAMBuffer, fsRAM_BUFFER_SIZE );

+	configASSERT( lBytesWritten == fsRAM_BUFFER_SIZE );

+

+	/* Finished so close the file. */

+	lStatus = red_close( lFildes );

+	configASSERT( lStatus == 0 );

+

+	/* Commit a transaction point, atomically adding the set of files and

+	directories to the transacted state. */

+	lStatus = red_transact( fsVOLUME_NAME );

+	configASSERT( lStatus == 0 );

+

+	/* Restore previous transaction point settings. */

+	lStatus = red_settransmask( fsVOLUME_NAME, ulEventMask );

+	configASSERT( lStatus == 0 );

+}

+/*-----------------------------------------------------------*/

+

+static void prvVerifyDemoFiles( void )

+{

+BaseType_t xFileNumber, xReadNumber;

+char cFilePath[ 64 ];

+const BaseType_t xMaxFiles = 5;

+long lChar;

+int32_t lBytesRead, lFildes, lStatus;

+int iByte;

+

+	/* Read back the files that were created by prvCreateDemoFiles(). */

+	for( xFileNumber = 1; xFileNumber <= xMaxFiles; xFileNumber++ )

+	{

+		/* Generate the file name. */

+		sprintf( cFilePath, "/root%03d.txt", xFileNumber );

+

+		/* Print out the file name and the directory from which the file is

+		being read. */

+		printf( "Reading file %s\r\n", cFilePath );

+

+		/* Open the file for reading. */

+		lFildes = red_open( cFilePath, RED_O_RDONLY );

+		configASSERT( lFildes != -1 );

+

+		/* Read the file into the RAM buffer, checking the file contents are as

+		expected.  The size of the file depends on the file number. */

+		for( xReadNumber = 0; xReadNumber < xFileNumber; xReadNumber++ )

+		{

+			/* Start with the RAM buffer clear. */

+			memset( cRAMBuffer, 0x00, fsRAM_BUFFER_SIZE );

+

+			lBytesRead = red_read( lFildes, cRAMBuffer, fsRAM_BUFFER_SIZE );

+			configASSERT( lBytesRead == fsRAM_BUFFER_SIZE );

+

+			/* Check the RAM buffer is filled with the expected data.  Each

+			file contains a different repeating ascii character that indicates

+			the number of the file. */

+			for( lChar = 0; lChar < fsRAM_BUFFER_SIZE; lChar++ )

+			{

+				configASSERT( cRAMBuffer[ lChar ] == ( '0' + ( char ) xFileNumber ) );

+			}

+		}

+

+		/* Close the file. */

+		lStatus = red_close( lFildes );

+		configASSERT( lStatus == 0 );

+	}

+

+	/* Generate the file name. */

+	sprintf( cFilePath, "%s/file.txt", pcDirectory2 );

+

+	/* Print out the file name and the directory from which the file is being

+	read. */

+	printf( "Reading file %s\r\n", cFilePath );

+

+	/* This time the file is opened for reading. */

+	lFildes = red_open( cFilePath, RED_O_RDONLY );

+	configASSERT( lFildes != -1 );

+

+	/* Read the file. */

+	lBytesRead = red_read( lFildes, cRAMBuffer, fsRAM_BUFFER_SIZE );

+	configASSERT( lBytesRead == fsRAM_BUFFER_SIZE );

+

+	/* Verify the file 1 byte at a time. */

+	for( iByte = 0; iByte < fsRAM_BUFFER_SIZE; iByte++ )

+	{

+		configASSERT( cRAMBuffer[ iByte ] == ( char ) ( ( int ) '0' + iByte ) );

+	}

+

+	/* Finished so close the file. */

+	lStatus = red_close( lFildes );

+	configASSERT( lStatus == 0 );

+}

+

+

+

+

diff --git a/FreeRTOS-Plus/Demo/FreeRTOS_Plus_Reliance_Edge_and_CLI_Windows_Simulator/FreeRTOS_Plus_Reliance_Edge_with_CLI.sln b/FreeRTOS-Plus/Demo/FreeRTOS_Plus_Reliance_Edge_and_CLI_Windows_Simulator/FreeRTOS_Plus_Reliance_Edge_with_CLI.sln
new file mode 100644
index 0000000..3f819af
--- /dev/null
+++ b/FreeRTOS-Plus/Demo/FreeRTOS_Plus_Reliance_Edge_and_CLI_Windows_Simulator/FreeRTOS_Plus_Reliance_Edge_with_CLI.sln
@@ -0,0 +1,20 @@
+

+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-Plus/Demo/FreeRTOS_Plus_Reliance_Edge_and_CLI_Windows_Simulator/Instructions_ReadMe.url b/FreeRTOS-Plus/Demo/FreeRTOS_Plus_Reliance_Edge_and_CLI_Windows_Simulator/Instructions_ReadMe.url
new file mode 100644
index 0000000..277474b
--- /dev/null
+++ b/FreeRTOS-Plus/Demo/FreeRTOS_Plus_Reliance_Edge_and_CLI_Windows_Simulator/Instructions_ReadMe.url
@@ -0,0 +1,5 @@
+[{000214A0-0000-0000-C000-000000000046}]

+Prop3=19,2

+[InternetShortcut]

+URL=http://www.freertos.org/FreeRTOS-Plus/Fail_Safe_File_System/Reliance_Edge_Fail_Safe_File_System.shtml

+IDList=

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
new file mode 100644
index 0000000..bcd843a
--- /dev/null
+++ b/FreeRTOS-Plus/Demo/FreeRTOS_Plus_Reliance_Edge_and_CLI_Windows_Simulator/Run-time-stats-utils.c
@@ -0,0 +1,132 @@
+/*

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

+    All rights reserved

+

+    VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

+

+    This file is part of the FreeRTOS distribution.

+

+    FreeRTOS is free software; you can redistribute it and/or modify it under

+    the terms of the GNU General Public License (version 2) as published by the

+    Free Software Foundation >>!AND MODIFIED BY!<< the FreeRTOS exception.

+

+    ***************************************************************************

+    >>!   NOTE: The modification to the GPL is included to allow you to     !<<

+    >>!   distribute a combined work that includes FreeRTOS without being   !<<

+    >>!   obliged to provide the source code for proprietary components     !<<

+    >>!   outside of the FreeRTOS kernel.                                   !<<

+    ***************************************************************************

+

+    FreeRTOS is distributed in the hope that it will be useful, but WITHOUT ANY

+    WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS

+    FOR A PARTICULAR PURPOSE.  Full license text is available on the following

+    link: http://www.freertos.org/a00114.html

+

+    ***************************************************************************

+     *                                                                       *

+     *    FreeRTOS provides completely free yet professionally developed,    *

+     *    robust, strictly quality controlled, supported, and cross          *

+     *    platform software that is more than just the market leader, it     *

+     *    is the industry's de facto standard.                               *

+     *                                                                       *

+     *    Help yourself get started quickly while simultaneously helping     *

+     *    to support the FreeRTOS project by purchasing a FreeRTOS           *

+     *    tutorial book, reference manual, or both:                          *

+     *    http://www.FreeRTOS.org/Documentation                              *

+     *                                                                       *

+    ***************************************************************************

+

+    http://www.FreeRTOS.org/FAQHelp.html - Having a problem?  Start by reading

+    the FAQ page "My application does not run, what could be wrong?".  Have you

+    defined configASSERT()?

+

+    http://www.FreeRTOS.org/support - In return for receiving this top quality

+    embedded software for free we request you assist our global community by

+    participating in the support forum.

+

+    http://www.FreeRTOS.org/training - Investing in training allows your team to

+    be as productive as possible as early as possible.  Now you can receive

+    FreeRTOS training directly from Richard Barry, CEO of Real Time Engineers

+    Ltd, and the world's leading authority on the world's leading RTOS.

+

+    http://www.FreeRTOS.org/plus - A selection of FreeRTOS ecosystem products,

+    including FreeRTOS+Trace - an indispensable productivity tool, a DOS

+    compatible FAT file system, and our tiny thread aware UDP/IP stack.

+

+    http://www.FreeRTOS.org/labs - Where new FreeRTOS products go to incubate.

+    Come and try FreeRTOS+TCP, our new open source TCP/IP stack for FreeRTOS.

+

+    http://www.OpenRTOS.com - Real Time Engineers ltd. license FreeRTOS to High

+    Integrity Systems ltd. to sell under the OpenRTOS brand.  Low cost OpenRTOS

+    licenses offer ticketed support, indemnification and commercial middleware.

+

+    http://www.SafeRTOS.com - High Integrity Systems also provide a safety

+    engineered and independently SIL3 certified version for use in safety and

+    mission critical applications that require provable dependability.

+

+    1 tab == 4 spaces!

+*/

+

+/*

+ * Utility functions required to gather run time statistics.  See:

+ * http://www.freertos.org/rtos-run-time-stats.html

+ *

+ * Note that this is a simulated port, where simulated time is a lot slower than

+ * real time, therefore the run time counter values have no real meaningful

+ * units.

+ *

+ * Also note that it is assumed this demo is going to be used for short periods

+ * of time only, and therefore timer overflows are not handled.

+*/

+

+/* FreeRTOS includes. */

+#include <FreeRTOS.h>

+

+/* 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. */

+static long long llInitialRunTimeCounterValue = 0LL, llTicksPerHundedthMillisecond = 0LL;

+

+/*-----------------------------------------------------------*/

+

+void vConfigureTimerForRunTimeStats( 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 )

+	{

+		llTicksPerHundedthMillisecond = 1;

+	}

+	else

+	{

+		/* How many times does the performance counter increment in 1/100th

+		millisecond. */

+		llTicksPerHundedthMillisecond = liPerformanceCounterFrequency.QuadPart / 100000LL;

+

+		/* What is the performance counter value now, this will be subtracted

+		from readings taken at run time. */

+		QueryPerformanceCounter( &liInitialRunTimeValue );

+		llInitialRunTimeCounterValue = liInitialRunTimeValue.QuadPart;

+	}

+}

+/*-----------------------------------------------------------*/

+

+unsigned long ulGetRunTimeCounterValue( 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 (simulated) 1/100ths of a millisecond. */

+	ulReturn = ( unsigned long ) ( ( liCurrentCount.QuadPart - llInitialRunTimeCounterValue ) / llTicksPerHundedthMillisecond );

+

+	return ulReturn;

+}

+/*-----------------------------------------------------------*/

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
new file mode 100644
index 0000000..7d6139b
--- /dev/null
+++ b/FreeRTOS-Plus/Demo/FreeRTOS_Plus_Reliance_Edge_and_CLI_Windows_Simulator/Sample-CLI-commands.c
@@ -0,0 +1,421 @@
+/*

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

+    All rights reserved

+

+    VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

+

+    This file is part of the FreeRTOS distribution.

+

+    FreeRTOS is free software; you can redistribute it and/or modify it under

+    the terms of the GNU General Public License (version 2) as published by the

+    Free Software Foundation >>!AND MODIFIED BY!<< the FreeRTOS exception.

+

+    ***************************************************************************

+    >>!   NOTE: The modification to the GPL is included to allow you to     !<<

+    >>!   distribute a combined work that includes FreeRTOS without being   !<<

+    >>!   obliged to provide the source code for proprietary components     !<<

+    >>!   outside of the FreeRTOS kernel.                                   !<<

+    ***************************************************************************

+

+    FreeRTOS is distributed in the hope that it will be useful, but WITHOUT ANY

+    WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS

+    FOR A PARTICULAR PURPOSE.  Full license text is available on the following

+    link: http://www.freertos.org/a00114.html

+

+    ***************************************************************************

+     *                                                                       *

+     *    FreeRTOS provides completely free yet professionally developed,    *

+     *    robust, strictly quality controlled, supported, and cross          *

+     *    platform software that is more than just the market leader, it     *

+     *    is the industry's de facto standard.                               *

+     *                                                                       *

+     *    Help yourself get started quickly while simultaneously helping     *

+     *    to support the FreeRTOS project by purchasing a FreeRTOS           *

+     *    tutorial book, reference manual, or both:                          *

+     *    http://www.FreeRTOS.org/Documentation                              *

+     *                                                                       *

+    ***************************************************************************

+

+    http://www.FreeRTOS.org/FAQHelp.html - Having a problem?  Start by reading

+    the FAQ page "My application does not run, what could be wrong?".  Have you

+    defined configASSERT()?

+

+    http://www.FreeRTOS.org/support - In return for receiving this top quality

+    embedded software for free we request you assist our global community by

+    participating in the support forum.

+

+    http://www.FreeRTOS.org/training - Investing in training allows your team to

+    be as productive as possible as early as possible.  Now you can receive

+    FreeRTOS training directly from Richard Barry, CEO of Real Time Engineers

+    Ltd, and the world's leading authority on the world's leading RTOS.

+

+    http://www.FreeRTOS.org/plus - A selection of FreeRTOS ecosystem products,

+    including FreeRTOS+Trace - an indispensable productivity tool, a DOS

+    compatible FAT file system, and our tiny thread aware UDP/IP stack.

+

+    http://www.FreeRTOS.org/labs - Where new FreeRTOS products go to incubate.

+    Come and try FreeRTOS+TCP, our new open source TCP/IP stack for FreeRTOS.

+

+    http://www.OpenRTOS.com - Real Time Engineers ltd. license FreeRTOS to High

+    Integrity Systems ltd. to sell under the OpenRTOS brand.  Low cost OpenRTOS

+    licenses offer ticketed support, indemnification and commercial middleware.

+

+    http://www.SafeRTOS.com - High Integrity Systems also provide a safety

+    engineered and independently SIL3 certified version for use in safety and

+    mission critical applications that require provable dependability.

+

+    1 tab == 4 spaces!

+*/

+

+ /******************************************************************************

+ *

+ * See the following URL for information on the commands defined in this file:

+ * http://www.FreeRTOS.org/FreeRTOS-Plus/FreeRTOS_Plus_UDP/Embedded_Ethernet_Examples/Ethernet_Related_CLI_Commands.shtml

+ *

+ ******************************************************************************/

+

+

+/* FreeRTOS includes. */

+#include "FreeRTOS.h"

+#include "task.h"

+

+/* Standard includes. */

+#include <stdint.h>

+#include <stdio.h>

+#include <stdlib.h>

+

+/* FreeRTOS+CLI includes. */

+#include "FreeRTOS_CLI.h"

+

+#ifndef  configINCLUDE_TRACE_RELATED_CLI_COMMANDS

+	#define configINCLUDE_TRACE_RELATED_CLI_COMMANDS 0

+#endif

+

+

+/*

+ * Implements the run-time-stats command.

+ */

+static BaseType_t prvTaskStatsCommand( char *pcWriteBuffer, size_t xWriteBufferLen, const char *pcCommandString );

+

+/*

+ * Implements the task-stats command.

+ */

+static BaseType_t prvRunTimeStatsCommand( char *pcWriteBuffer, size_t xWriteBufferLen, const char *pcCommandString );

+

+/*

+ * Implements the echo-three-parameters command.

+ */

+static BaseType_t prvThreeParameterEchoCommand( char *pcWriteBuffer, size_t xWriteBufferLen, const char *pcCommandString );

+

+/*

+ * Implements the echo-parameters command.

+ */

+static BaseType_t prvParameterEchoCommand( char *pcWriteBuffer, size_t xWriteBufferLen, const char *pcCommandString );

+

+/*

+ * Implements the "trace start" and "trace stop" commands;

+ */

+#if configINCLUDE_TRACE_RELATED_CLI_COMMANDS == 1

+	static BaseType_t prvStartStopTraceCommand( char *pcWriteBuffer, size_t xWriteBufferLen, const char *pcCommandString );

+#endif

+

+/* Structure that defines the "run-time-stats" command line command.   This

+generates a table that shows how much run time each task has */

+static const CLI_Command_Definition_t xRunTimeStats =

+{

+	"run-time-stats", /* The command string to type. */

+	"\r\nrun-time-stats:\r\n Displays a table showing how much processing time each FreeRTOS task has used\r\n",

+	prvRunTimeStatsCommand, /* The function to run. */

+	0 /* No parameters are expected. */

+};

+

+/* Structure that defines the "task-stats" command line command.  This generates

+a table that gives information on each task in the system. */

+static const CLI_Command_Definition_t xTaskStats =

+{

+	"task-stats", /* The command string to type. */

+	"\r\ntask-stats:\r\n Displays a table showing the state of each FreeRTOS task\r\n",

+	prvTaskStatsCommand, /* The function to run. */

+	0 /* No parameters are expected. */

+};

+

+/* Structure that defines the "echo_3_parameters" command line command.  This

+takes exactly three parameters that the command simply echos back one at a

+time. */

+static const CLI_Command_Definition_t xThreeParameterEcho =

+{

+	"echo-3-parameters",

+	"\r\necho-3-parameters <param1> <param2> <param3>:\r\n Expects three parameters, echos each in turn\r\n",

+	prvThreeParameterEchoCommand, /* The function to run. */

+	3 /* Three parameters are expected, which can take any value. */

+};

+

+/* Structure that defines the "echo_parameters" command line command.  This

+takes a variable number of parameters that the command simply echos back one at

+a time. */

+static const CLI_Command_Definition_t xParameterEcho =

+{

+	"echo-parameters",

+	"\r\necho-parameters <...>:\r\n Take variable number of parameters, echos each in turn\r\n",

+	prvParameterEchoCommand, /* The function to run. */

+	-1 /* The user can enter any number of commands. */

+};

+

+#if configINCLUDE_TRACE_RELATED_CLI_COMMANDS == 1

+	/* Structure that defines the "trace" command line command.  This takes a single

+	parameter, which can be either "start" or "stop". */

+	static const CLI_Command_Definition_t xStartStopTrace =

+	{

+		"trace",

+		"\r\ntrace [start | stop]:\r\n Starts or stops a trace recording for viewing in FreeRTOS+Trace\r\n",

+		prvStartStopTraceCommand, /* The function to run. */

+		1 /* One parameter is expected.  Valid values are "start" and "stop". */

+	};

+#endif /* configINCLUDE_TRACE_RELATED_CLI_COMMANDS */

+

+/*-----------------------------------------------------------*/

+

+void vRegisterSampleCLICommands( void )

+{

+	/* Register all the command line commands defined immediately above. */

+	FreeRTOS_CLIRegisterCommand( &xTaskStats );

+	FreeRTOS_CLIRegisterCommand( &xRunTimeStats );

+	FreeRTOS_CLIRegisterCommand( &xThreeParameterEcho );

+	FreeRTOS_CLIRegisterCommand( &xParameterEcho );

+

+	#if( configINCLUDE_TRACE_RELATED_CLI_COMMANDS == 1 )

+	{

+		FreeRTOS_CLIRegisterCommand( & xStartStopTrace );

+	}

+	#endif

+}

+/*-----------------------------------------------------------*/

+

+static BaseType_t prvTaskStatsCommand( char *pcWriteBuffer, size_t xWriteBufferLen, const char *pcCommandString )

+{

+const char *const pcHeader = "Task          State  Priority  Stack	#\r\n************************************************\r\n";

+

+	/* Remove compile time warnings about unused parameters, and check the

+	write buffer is not NULL.  NOTE - for simplicity, this example assumes the

+	write buffer length is adequate, so does not check for buffer overflows. */

+	( void ) pcCommandString;

+	( void ) xWriteBufferLen;

+	configASSERT( pcWriteBuffer );

+

+	/* 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 BaseType_t prvRunTimeStatsCommand( char *pcWriteBuffer, size_t xWriteBufferLen, const char *pcCommandString )

+{

+const char * const pcHeader = "Task            Abs Time      % Time\r\n****************************************\r\n";

+

+	/* Remove compile time warnings about unused parameters, and check the

+	write buffer is not NULL.  NOTE - for simplicity, this example assumes the

+	write buffer length is adequate, so does not check for buffer overflows. */

+	( void ) pcCommandString;

+	( void ) xWriteBufferLen;

+	configASSERT( pcWriteBuffer );

+

+	/* Generate a table of task stats. */

+	strcpy( pcWriteBuffer, pcHeader );

+	vTaskGetRunTimeStats( pcWriteBuffer + strlen( pcHeader ) );

+

+	/* There is no more data to return after this single string, so return

+	pdFALSE. */

+	return pdFALSE;

+}

+/*-----------------------------------------------------------*/

+

+static BaseType_t prvThreeParameterEchoCommand( char *pcWriteBuffer, size_t xWriteBufferLen, const char *pcCommandString )

+{

+const char *pcParameter;

+BaseType_t xParameterStringLength, xReturn;

+static BaseType_t lParameterNumber = 0;

+

+	/* Remove compile time warnings about unused parameters, and check the

+	write buffer is not NULL.  NOTE - for simplicity, this example assumes the

+	write buffer length is adequate, so does not check for buffer overflows. */

+	( void ) pcCommandString;

+	( void ) xWriteBufferLen;

+	configASSERT( pcWriteBuffer );

+

+	if( lParameterNumber == 0 )

+	{

+		/* The first time the function is called after the command has been

+		entered just a header string is returned. */

+		sprintf( pcWriteBuffer, "The three parameters were:\r\n" );

+

+		/* Next time the function is called the first parameter will be echoed

+		back. */

+		lParameterNumber = 1L;

+

+		/* There is more data to be returned as no parameters have been echoed

+		back yet. */

+		xReturn = pdPASS;

+	}

+	else

+	{

+		/* Obtain the parameter string. */

+		pcParameter = FreeRTOS_CLIGetParameter

+						(

+							pcCommandString,		/* The command string itself. */

+							lParameterNumber,		/* Return the next parameter. */

+							&xParameterStringLength	/* Store the parameter string length. */

+						);

+

+		/* Sanity check something was returned. */

+		configASSERT( pcParameter );

+

+		/* Return the parameter string. */

+		memset( pcWriteBuffer, 0x00, xWriteBufferLen );

+		sprintf( pcWriteBuffer, "%d: ", ( int ) lParameterNumber );

+		strncat( pcWriteBuffer, pcParameter, xParameterStringLength );

+		strncat( pcWriteBuffer, "\r\n", strlen( "\r\n" ) );

+

+		/* If this is the last of the three parameters then there are no more

+		strings to return after this one. */

+		if( lParameterNumber == 3L )

+		{

+			/* If this is the last of the three parameters then there are no more

+			strings to return after this one. */

+			xReturn = pdFALSE;

+			lParameterNumber = 0L;

+		}

+		else

+		{

+			/* There are more parameters to return after this one. */

+			xReturn = pdTRUE;

+			lParameterNumber++;

+		}

+	}

+

+	return xReturn;

+}

+/*-----------------------------------------------------------*/

+

+static BaseType_t prvParameterEchoCommand( char *pcWriteBuffer, size_t xWriteBufferLen, const char *pcCommandString )

+{

+const char *pcParameter;

+BaseType_t xParameterStringLength, xReturn;

+static BaseType_t lParameterNumber = 0;

+

+	/* Remove compile time warnings about unused parameters, and check the

+	write buffer is not NULL.  NOTE - for simplicity, this example assumes the

+	write buffer length is adequate, so does not check for buffer overflows. */

+	( void ) pcCommandString;

+	( void ) xWriteBufferLen;

+	configASSERT( pcWriteBuffer );

+

+	if( lParameterNumber == 0 )

+	{

+		/* The first time the function is called after the command has been

+		entered just a header string is returned. */

+		sprintf( pcWriteBuffer, "The parameters were:\r\n" );

+

+		/* Next time the function is called the first parameter will be echoed

+		back. */

+		lParameterNumber = 1L;

+

+		/* There is more data to be returned as no parameters have been echoed

+		back yet. */

+		xReturn = pdPASS;

+	}

+	else

+	{

+		/* Obtain the parameter string. */

+		pcParameter = FreeRTOS_CLIGetParameter

+						(

+							pcCommandString,		/* The command string itself. */

+							lParameterNumber,		/* Return the next parameter. */

+							&xParameterStringLength	/* Store the parameter string length. */

+						);

+

+		if( pcParameter != NULL )

+		{

+			/* Return the parameter string. */

+			memset( pcWriteBuffer, 0x00, xWriteBufferLen );

+			sprintf( pcWriteBuffer, "%d: ", ( int ) lParameterNumber );

+			strncat( pcWriteBuffer, pcParameter, xParameterStringLength );

+			strncat( pcWriteBuffer, "\r\n", strlen( "\r\n" ) );

+

+			/* There might be more parameters to return after this one. */

+			xReturn = pdTRUE;

+			lParameterNumber++;

+		}

+		else

+		{

+			/* No more parameters were found.  Make sure the write buffer does

+			not contain a valid string. */

+			pcWriteBuffer[ 0 ] = 0x00;

+

+			/* No more data to return. */

+			xReturn = pdFALSE;

+

+			/* Start over the next time this command is executed. */

+			lParameterNumber = 0;

+		}

+	}

+

+	return xReturn;

+}

+/*-----------------------------------------------------------*/

+

+#if configINCLUDE_TRACE_RELATED_CLI_COMMANDS == 1

+

+	static BaseType_t prvStartStopTraceCommand( char *pcWriteBuffer, size_t xWriteBufferLen, const char *pcCommandString )

+	{

+	const char *pcParameter;

+	BaseType_t lParameterStringLength;

+

+		/* Remove compile time warnings about unused parameters, and check the

+		write buffer is not NULL.  NOTE - for simplicity, this example assumes the

+		write buffer length is adequate, so does not check for buffer overflows. */

+		( void ) pcCommandString;

+		( void ) xWriteBufferLen;

+		configASSERT( pcWriteBuffer );

+

+		/* Obtain the parameter string. */

+		pcParameter = FreeRTOS_CLIGetParameter

+						(

+							pcCommandString,		/* The command string itself. */

+							1,						/* Return the first parameter. */

+							&lParameterStringLength	/* Store the parameter string length. */

+						);

+

+		/* Sanity check something was returned. */

+		configASSERT( pcParameter );

+

+		/* There are only two valid parameter values. */

+		if( strncmp( pcParameter, "start", strlen( "start" ) ) == 0 )

+		{

+			/* Start or restart the trace. */

+			vTraceStop();

+			vTraceClear();

+			vTraceStart();

+

+			sprintf( pcWriteBuffer, "Trace recording (re)started.\r\n" );

+		}

+		else if( strncmp( pcParameter, "stop", strlen( "stop" ) ) == 0 )

+		{

+			/* End the trace, if one is running. */

+			vTraceStop();

+			sprintf( pcWriteBuffer, "Stopping trace recording.\r\n" );

+		}

+		else

+		{

+			sprintf( pcWriteBuffer, "Valid parameters are 'start' and 'stop'.\r\n" );

+		}

+

+		/* There is no more data to return after this single string, so return

+		pdFALSE. */

+		return pdFALSE;

+	}

+

+#endif /* configINCLUDE_TRACE_RELATED_CLI_COMMANDS */

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
new file mode 100644
index 0000000..b6aa59f
--- /dev/null
+++ b/FreeRTOS-Plus/Demo/FreeRTOS_Plus_Reliance_Edge_and_CLI_Windows_Simulator/UDPCommandServer.c
@@ -0,0 +1,271 @@
+/*

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

+    All rights reserved

+

+    VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

+

+    This file is part of the FreeRTOS distribution.

+

+    FreeRTOS is free software; you can redistribute it and/or modify it under

+    the terms of the GNU General Public License (version 2) as published by the

+    Free Software Foundation >>!AND MODIFIED BY!<< the FreeRTOS exception.

+

+    ***************************************************************************

+    >>!   NOTE: The modification to the GPL is included to allow you to     !<<

+    >>!   distribute a combined work that includes FreeRTOS without being   !<<

+    >>!   obliged to provide the source code for proprietary components     !<<

+    >>!   outside of the FreeRTOS kernel.                                   !<<

+    ***************************************************************************

+

+    FreeRTOS is distributed in the hope that it will be useful, but WITHOUT ANY

+    WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS

+    FOR A PARTICULAR PURPOSE.  Full license text is available on the following

+    link: http://www.freertos.org/a00114.html

+

+    ***************************************************************************

+     *                                                                       *

+     *    FreeRTOS provides completely free yet professionally developed,    *

+     *    robust, strictly quality controlled, supported, and cross          *

+     *    platform software that is more than just the market leader, it     *

+     *    is the industry's de facto standard.                               *

+     *                                                                       *

+     *    Help yourself get started quickly while simultaneously helping     *

+     *    to support the FreeRTOS project by purchasing a FreeRTOS           *

+     *    tutorial book, reference manual, or both:                          *

+     *    http://www.FreeRTOS.org/Documentation                              *

+     *                                                                       *

+    ***************************************************************************

+

+    http://www.FreeRTOS.org/FAQHelp.html - Having a problem?  Start by reading

+    the FAQ page "My application does not run, what could be wrong?".  Have you

+    defined configASSERT()?

+

+    http://www.FreeRTOS.org/support - In return for receiving this top quality

+    embedded software for free we request you assist our global community by

+    participating in the support forum.

+

+    http://www.FreeRTOS.org/training - Investing in training allows your team to

+    be as productive as possible as early as possible.  Now you can receive

+    FreeRTOS training directly from Richard Barry, CEO of Real Time Engineers

+    Ltd, and the world's leading authority on the world's leading RTOS.

+

+    http://www.FreeRTOS.org/plus - A selection of FreeRTOS ecosystem products,

+    including FreeRTOS+Trace - an indispensable productivity tool, a DOS

+    compatible FAT file system, and our tiny thread aware UDP/IP stack.

+

+    http://www.FreeRTOS.org/labs - Where new FreeRTOS products go to incubate.

+    Come and try FreeRTOS+TCP, our new open source TCP/IP stack for FreeRTOS.

+

+    http://www.OpenRTOS.com - Real Time Engineers ltd. license FreeRTOS to High

+    Integrity Systems ltd. to sell under the OpenRTOS brand.  Low cost OpenRTOS

+    licenses offer ticketed support, indemnification and commercial middleware.

+

+    http://www.SafeRTOS.com - High Integrity Systems also provide a safety

+    engineered and independently SIL3 certified version for use in safety and

+    mission critical applications that require provable dependability.

+

+    1 tab == 4 spaces!

+*/

+

+

+#pragma comment( lib, "ws2_32.lib" )

+

+/* Win32 includes. */

+#include <WinSock2.h>

+

+/* FreeRTOS includes. */

+#include "FreeRTOS.h"

+#include "task.h"

+

+/* Standard includes. */

+#include <stdint.h>

+#include <stdio.h>

+

+/* FreeRTOS+CLI includes. */

+#include "FreeRTOS_CLI.h"

+

+/* Dimensions the buffer into which input characters are placed. */

+#define cmdMAX_INPUT_SIZE	60

+

+/* Dimensions the buffer into which string outputs can be placed. */

+#define cmdMAX_OUTPUT_SIZE	1024

+

+/* Dimensions the buffer passed to the recvfrom() call. */

+#define cmdSOCKET_INPUT_BUFFER_SIZE 60

+

+/* DEL acts as a backspace. */

+#define cmdASCII_DEL		( 0x7F )

+

+/*

+ * Open and configure the UDP socket.

+ */

+static SOCKET prvOpenUDPSocket( void );

+

+/*-----------------------------------------------------------*/

+

+/*

+ * Task that provides the input and output for the FreeRTOS+CLI command

+ * interpreter.  In this case a WinSock UDP port is used for convenience as this

+ * demo runs in a simulated environment on a Windows PC.  See the URL in the

+ * comments within main.c for the location of the online documentation.

+ */

+void vUDPCommandInterpreterTask( void *pvParameters )

+{

+long lBytes, lByte;

+signed char cInChar, cInputIndex = 0;

+static signed char cInputString[ cmdMAX_INPUT_SIZE ], cOutputString[ cmdMAX_OUTPUT_SIZE ], cLocalBuffer[ cmdSOCKET_INPUT_BUFFER_SIZE ];

+BaseType_t xMoreDataToFollow;

+volatile int iErrorCode = 0;

+struct sockaddr_in xClient;

+int xClientAddressLength = sizeof( struct sockaddr_in );

+SOCKET xSocket;

+

+	/* Just to prevent compiler warnings. */

+	( void ) pvParameters;

+

+	/* Attempt to open the socket. */

+	xSocket = prvOpenUDPSocket();

+

+	if( xSocket != INVALID_SOCKET )

+	{

+		for( ;; )

+		{

+			/* Wait for incoming data on the opened socket. */

+			lBytes = recvfrom( xSocket, cLocalBuffer, sizeof( cLocalBuffer ), 0, ( struct sockaddr * ) &xClient, &xClientAddressLength );

+

+			if( lBytes == SOCKET_ERROR )

+			{

+				/* Something went wrong, but it is not handled by this simple

+				example. */

+				iErrorCode = WSAGetLastError();

+			}

+			else

+			{

+				/* Process each received byte in turn. */

+				lByte = 0;

+				while( lByte < lBytes )

+				{

+					/* The next character in the input buffer. */

+					cInChar = cLocalBuffer[ lByte ];

+					lByte++;

+

+					/* Newline characters are taken as the end of the command

+					string. */

+					if( cInChar == '\n' )

+					{

+						/* Process the input string received prior to the

+						newline. */

+						do

+						{

+							/* Pass the string to FreeRTOS+CLI. */

+							xMoreDataToFollow = FreeRTOS_CLIProcessCommand( cInputString, cOutputString, cmdMAX_OUTPUT_SIZE );

+

+							/* Send the output generated by the command's

+							implementation. */

+							sendto( xSocket, cOutputString,  strlen( cOutputString ), 0, ( SOCKADDR * ) &xClient, xClientAddressLength );

+

+						} while( xMoreDataToFollow != pdFALSE ); /* Until the command does not generate any more output. */

+

+						/* All the strings generated by the command processing

+						have been sent.  Clear the input string ready to receive

+						the next command. */

+						cInputIndex = 0;

+						memset( cInputString, 0x00, cmdMAX_INPUT_SIZE );

+

+						/* Transmit a spacer, just to make the command console

+						easier to read. */

+						sendto( xSocket, "\r\n",  strlen( "\r\n" ), 0, ( SOCKADDR * ) &xClient, xClientAddressLength );

+					}

+					else

+					{

+						if( cInChar == '\r' )

+						{

+							/* Ignore the character.  Newlines are used to

+							detect the end of the input string. */

+						}

+						else if( ( cInChar == '\b' ) || ( cInChar == cmdASCII_DEL ) )

+						{

+							/* 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++;

+							}

+						}

+					}

+				}

+			}

+		}

+	}

+	else

+	{

+		/* The socket could not be opened. */

+		vTaskDelete( NULL );

+	}

+}

+/*-----------------------------------------------------------*/

+

+static SOCKET prvOpenUDPSocket( void )

+{

+WSADATA xWSAData;

+WORD wVersionRequested;

+struct sockaddr_in xServer;

+SOCKET xSocket = INVALID_SOCKET;

+

+	wVersionRequested = MAKEWORD( 2, 2 );

+

+	/* Prepare to use WinSock. */

+	if( WSAStartup( wVersionRequested, &xWSAData ) != 0 )

+	{

+		fprintf( stderr, "Could not open Windows connection.\n" );

+	}

+	else

+	{

+		xSocket = socket( AF_INET, SOCK_DGRAM, 0 );

+		if( xSocket == INVALID_SOCKET)

+		{

+			fprintf( stderr, "Could not create socket.\n" );

+			WSACleanup();

+		}

+		else

+		{

+			/* Zero out the server structure. */

+			memset( ( void * ) &xServer, 0x00, sizeof( struct sockaddr_in ) );

+

+			/* Set family and port. */

+			xServer.sin_family = AF_INET;

+			xServer.sin_port = htons( configUDP_CLI_PORT_NUMBER );

+

+			/* Assign the loopback address */

+			xServer.sin_addr.S_un.S_un_b.s_b1 = 127;

+			xServer.sin_addr.S_un.S_un_b.s_b2 = 0;

+			xServer.sin_addr.S_un.S_un_b.s_b3 = 0;

+			xServer.sin_addr.S_un.S_un_b.s_b4 = 1;

+

+			/* Bind the address to the socket. */

+			if( bind( xSocket, ( struct sockaddr * ) &xServer, sizeof( struct sockaddr_in ) ) == -1 )

+			{

+				fprintf( stderr, "Could not socket to port %d.\n", configUDP_CLI_PORT_NUMBER );

+				closesocket( xSocket );

+				xSocket = INVALID_SOCKET;

+				WSACleanup();

+			}

+		}

+	}

+

+	return xSocket;

+}

+

+

diff --git a/FreeRTOS-Plus/Demo/FreeRTOS_Plus_Reliance_Edge_and_CLI_Windows_Simulator/WIN32.vcxproj b/FreeRTOS-Plus/Demo/FreeRTOS_Plus_Reliance_Edge_and_CLI_Windows_Simulator/WIN32.vcxproj
new file mode 100644
index 0000000..dbbae63
--- /dev/null
+++ b/FreeRTOS-Plus/Demo/FreeRTOS_Plus_Reliance_Edge_and_CLI_Windows_Simulator/WIN32.vcxproj
@@ -0,0 +1,200 @@
+<?xml version="1.0" encoding="utf-8"?>

+<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">

+  <ItemGroup Label="ProjectConfigurations">

+    <ProjectConfiguration Include="Debug|Win32">

+      <Configuration>Debug</Configuration>

+      <Platform>Win32</Platform>

+    </ProjectConfiguration>

+    <ProjectConfiguration Include="Release|Win32">

+      <Configuration>Release</Configuration>

+      <Platform>Win32</Platform>

+    </ProjectConfiguration>

+  </ItemGroup>

+  <PropertyGroup Label="Globals">

+    <ProjectGuid>{C686325E-3261-42F7-AEB1-DDE5280E1CEB}</ProjectGuid>

+    <ProjectName>RTOSDemo</ProjectName>

+  </PropertyGroup>

+  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />

+  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">

+    <ConfigurationType>Application</ConfigurationType>

+    <UseOfMfc>false</UseOfMfc>

+    <CharacterSet>MultiByte</CharacterSet>

+  </PropertyGroup>

+  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">

+    <ConfigurationType>Application</ConfigurationType>

+    <UseOfMfc>false</UseOfMfc>

+    <CharacterSet>MultiByte</CharacterSet>

+  </PropertyGroup>

+  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />

+  <ImportGroup Label="ExtensionSettings">

+  </ImportGroup>

+  <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">

+    <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />

+    <Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC60.props" />

+  </ImportGroup>

+  <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">

+    <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />

+    <Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC60.props" />

+  </ImportGroup>

+  <PropertyGroup Label="UserMacros" />

+  <PropertyGroup>

+    <_ProjectFileVersion>10.0.30319.1</_ProjectFileVersion>

+    <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">.\Debug\</OutDir>

+    <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">.\Debug\</IntDir>

+    <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</LinkIncremental>

+    <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">.\Release\</OutDir>

+    <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">.\Release\</IntDir>

+    <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</LinkIncremental>

+  </PropertyGroup>

+  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">

+    <Midl>

+      <TypeLibraryName>.\Debug/WIN32.tlb</TypeLibraryName>

+      <HeaderFileName>

+      </HeaderFileName>

+    </Midl>

+    <ClCompile>

+      <Optimization>Disabled</Optimization>

+      <AdditionalIncludeDirectories>..\..\Source\Reliance-Edge\os\freertos\include;..\..\Source\Reliance-Edge\projects\freertos\win32-demo;..\..\Source\Reliance-Edge\core\include;..\..\Source\Reliance-Edge\include;..\..\..\FreeRTOS\Source\include;..\..\..\FreeRTOS\Source\portable\MSVC-MingW;..\..\Source\FreeRTOS-Plus-CLI;.;.\ConfigurationFiles;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>

+      <PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;_WIN32_WINNT=0x0500;WINVER=0x400;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>

+      <MinimalRebuild>true</MinimalRebuild>

+      <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>

+      <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>

+      <PrecompiledHeaderOutputFile>.\Debug/WIN32.pch</PrecompiledHeaderOutputFile>

+      <AssemblerListingLocation>.\Debug/</AssemblerListingLocation>

+      <ObjectFileName>.\Debug/</ObjectFileName>

+      <ProgramDataBaseFileName>.\Debug/</ProgramDataBaseFileName>

+      <WarningLevel>Level4</WarningLevel>

+      <SuppressStartupBanner>true</SuppressStartupBanner>

+      <DisableLanguageExtensions>false</DisableLanguageExtensions>

+      <DebugInformationFormat>EditAndContinue</DebugInformationFormat>

+    </ClCompile>

+    <ResourceCompile>

+      <PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>

+      <Culture>0x0c09</Culture>

+    </ResourceCompile>

+    <Link>

+      <OutputFile>.\Debug/RTOSDemo.exe</OutputFile>

+      <SuppressStartupBanner>true</SuppressStartupBanner>

+      <GenerateDebugInformation>true</GenerateDebugInformation>

+      <ProgramDatabaseFile>.\Debug/WIN32.pdb</ProgramDatabaseFile>

+      <SubSystem>Console</SubSystem>

+      <TargetMachine>MachineX86</TargetMachine>

+      <AdditionalDependencies>%(AdditionalDependencies)</AdditionalDependencies>

+      <AdditionalLibraryDirectories>.\WinPCap</AdditionalLibraryDirectories>

+    </Link>

+    <Bscmake>

+      <SuppressStartupBanner>true</SuppressStartupBanner>

+      <OutputFile>.\Debug/WIN32.bsc</OutputFile>

+    </Bscmake>

+  </ItemDefinitionGroup>

+  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">

+    <Midl>

+      <TypeLibraryName>.\Release/WIN32.tlb</TypeLibraryName>

+      <HeaderFileName>

+      </HeaderFileName>

+    </Midl>

+    <ClCompile>

+      <Optimization>MaxSpeed</Optimization>

+      <InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>

+      <PreprocessorDefinitions>_WINSOCKAPI_;WIN32;NDEBUG;_CONSOLE;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>

+      <StringPooling>true</StringPooling>

+      <RuntimeLibrary>MultiThreaded</RuntimeLibrary>

+      <FunctionLevelLinking>true</FunctionLevelLinking>

+      <PrecompiledHeaderOutputFile>.\Release/WIN32.pch</PrecompiledHeaderOutputFile>

+      <AssemblerListingLocation>.\Release/</AssemblerListingLocation>

+      <ObjectFileName>.\Release/</ObjectFileName>

+      <ProgramDataBaseFileName>.\Release/</ProgramDataBaseFileName>

+      <WarningLevel>Level3</WarningLevel>

+      <SuppressStartupBanner>true</SuppressStartupBanner>

+      <AdditionalIncludeDirectories>..\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)</AdditionalIncludeDirectories>

+    </ClCompile>

+    <ResourceCompile>

+      <PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>

+      <Culture>0x0c09</Culture>

+    </ResourceCompile>

+    <Link>

+      <OutputFile>.\Release/RTOSDemo.exe</OutputFile>

+      <SuppressStartupBanner>true</SuppressStartupBanner>

+      <ProgramDatabaseFile>.\Release/WIN32.pdb</ProgramDatabaseFile>

+      <SubSystem>Console</SubSystem>

+      <TargetMachine>MachineX86</TargetMachine>

+      <AdditionalLibraryDirectories>..\Common\ethernet\lwip-1.4.0\ports\win32\WinPCap</AdditionalLibraryDirectories>

+      <AdditionalDependencies>wpcap.lib;%(AdditionalDependencies)</AdditionalDependencies>

+    </Link>

+    <Bscmake>

+      <SuppressStartupBanner>true</SuppressStartupBanner>

+      <OutputFile>.\Release/WIN32.bsc</OutputFile>

+    </Bscmake>

+  </ItemDefinitionGroup>

+  <ItemGroup>

+    <ClCompile Include="..\..\..\FreeRTOS\Source\portable\MemMang\heap_4.c" />

+    <ClCompile Include="..\..\..\FreeRTOS\Source\list.c" />

+    <ClCompile Include="..\..\..\FreeRTOS\Source\portable\MSVC-MingW\port.c" />

+    <ClCompile Include="..\..\..\FreeRTOS\Source\queue.c" />

+    <ClCompile Include="..\..\..\FreeRTOS\Source\tasks.c" />

+    <ClCompile Include="..\..\..\FreeRTOS\Source\timers.c" />

+    <ClCompile Include="..\..\Source\FreeRTOS-Plus-CLI\FreeRTOS_CLI.c" />

+    <ClCompile Include="..\..\Source\Reliance-Edge\core\driver\blockio.c" />

+    <ClCompile Include="..\..\Source\Reliance-Edge\core\driver\buffer.c" />

+    <ClCompile Include="..\..\Source\Reliance-Edge\core\driver\core.c" />

+    <ClCompile Include="..\..\Source\Reliance-Edge\core\driver\dir.c" />

+    <ClCompile Include="..\..\Source\Reliance-Edge\core\driver\format.c" />

+    <ClCompile Include="..\..\Source\Reliance-Edge\core\driver\imap.c" />

+    <ClCompile Include="..\..\Source\Reliance-Edge\core\driver\imapextern.c" />

+    <ClCompile Include="..\..\Source\Reliance-Edge\core\driver\imapinline.c" />

+    <ClCompile Include="..\..\Source\Reliance-Edge\core\driver\inode.c" />

+    <ClCompile Include="..\..\Source\Reliance-Edge\core\driver\inodedata.c" />

+    <ClCompile Include="..\..\Source\Reliance-Edge\core\driver\volume.c" />

+    <ClCompile Include="..\..\Source\Reliance-Edge\fse\fse.c" />

+    <ClCompile Include="..\..\Source\Reliance-Edge\os\freertos\services\osassert.c" />

+    <ClCompile Include="..\..\Source\Reliance-Edge\os\freertos\services\osbdev.c" />

+    <ClCompile Include="..\..\Source\Reliance-Edge\os\freertos\services\osclock.c" />

+    <ClCompile Include="..\..\Source\Reliance-Edge\os\freertos\services\osmutex.c" />

+    <ClCompile Include="..\..\Source\Reliance-Edge\os\freertos\services\osoutput.c" />

+    <ClCompile Include="..\..\Source\Reliance-Edge\os\freertos\services\ostask.c" />

+    <ClCompile Include="..\..\Source\Reliance-Edge\os\freertos\services\ostimestamp.c" />

+    <ClCompile Include="..\..\Source\Reliance-Edge\posix\path.c" />

+    <ClCompile Include="..\..\Source\Reliance-Edge\posix\posix.c" />

+    <ClCompile Include="..\..\Source\Reliance-Edge\tests\posix\fsstress.c" />

+    <ClCompile Include="..\..\Source\Reliance-Edge\tests\util\atoi.c" />

+    <ClCompile Include="..\..\Source\Reliance-Edge\tests\util\math.c" />

+    <ClCompile Include="..\..\Source\Reliance-Edge\tests\util\printf.c" />

+    <ClCompile Include="..\..\Source\Reliance-Edge\tests\util\rand.c" />

+    <ClCompile Include="..\..\Source\Reliance-Edge\toolcmn\getopt.c" />

+    <ClCompile Include="..\..\Source\Reliance-Edge\toolcmn\toolcmn.c" />

+    <ClCompile Include="..\..\Source\Reliance-Edge\util\bitmap.c" />

+    <ClCompile Include="..\..\Source\Reliance-Edge\util\crc.c" />

+    <ClCompile Include="..\..\Source\Reliance-Edge\util\endian.c" />

+    <ClCompile Include="..\..\Source\Reliance-Edge\util\memory.c" />

+    <ClCompile Include="..\..\Source\Reliance-Edge\util\namelen.c" />

+    <ClCompile Include="..\..\Source\Reliance-Edge\util\sign.c" />

+    <ClCompile Include="..\..\Source\Reliance-Edge\util\string.c" />

+    <ClCompile Include="ConfigurationFiles\redconf.c" />

+    <ClCompile Include="File-Related-CLI-commands.c" />

+    <ClCompile Include="File-system-demo.c" />

+    <ClCompile Include="main.c">

+      <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>

+      <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>

+      <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>

+    </ClCompile>

+    <ClCompile Include="Run-time-stats-utils.c" />

+    <ClCompile Include="Sample-CLI-commands.c" />

+    <ClCompile Include="UDPCommandServer.c" />

+  </ItemGroup>

+  <ItemGroup>

+    <ClInclude Include="..\..\..\FreeRTOS\Source\include\FreeRTOS.h" />

+    <ClInclude Include="..\..\..\FreeRTOS\Source\include\projdefs.h" />

+    <ClInclude Include="..\..\..\FreeRTOS\Source\include\queue.h" />

+    <ClInclude Include="..\..\..\FreeRTOS\Source\include\semphr.h" />

+    <ClInclude Include="..\..\..\FreeRTOS\Source\include\task.h" />

+    <ClInclude Include="..\..\..\FreeRTOS\Source\include\timers.h" />

+    <ClInclude Include="..\..\Source\FreeRTOS-Plus-CLI\FreeRTOS_CLI.h" />

+    <ClInclude Include="..\..\Source\Reliance-Edge\os\freertos\include\ostypes.h" />

+    <ClInclude Include="ConfigurationFiles\FreeRTOSConfig.h" />

+    <ClInclude Include="ConfigurationFiles\redconf.h" />

+    <ClInclude Include="ConfigurationFiles\redtypes.h" />

+  </ItemGroup>

+  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />

+  <ImportGroup Label="ExtensionTargets">

+  </ImportGroup>

+</Project>
\ No newline at end of file
diff --git a/FreeRTOS-Plus/Demo/FreeRTOS_Plus_Reliance_Edge_and_CLI_Windows_Simulator/WIN32.vcxproj.filters b/FreeRTOS-Plus/Demo/FreeRTOS_Plus_Reliance_Edge_and_CLI_Windows_Simulator/WIN32.vcxproj.filters
new file mode 100644
index 0000000..fd68b27
--- /dev/null
+++ b/FreeRTOS-Plus/Demo/FreeRTOS_Plus_Reliance_Edge_and_CLI_Windows_Simulator/WIN32.vcxproj.filters
@@ -0,0 +1,222 @@
+<?xml version="1.0" encoding="utf-8"?>

+<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">

+  <ItemGroup>

+    <Filter Include="Resource Files">

+      <UniqueIdentifier>{38712199-cebf-4124-bf15-398f7c3419ea}</UniqueIdentifier>

+      <Extensions>ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe</Extensions>

+    </Filter>

+    <Filter Include="FreeRTOS">

+      <UniqueIdentifier>{af3445a1-4908-4170-89ed-39345d90d30c}</UniqueIdentifier>

+    </Filter>

+    <Filter Include="FreeRTOS\Source">

+      <UniqueIdentifier>{f32be356-4763-4cae-9020-974a2638cb08}</UniqueIdentifier>

+      <Extensions>*.c</Extensions>

+    </Filter>

+    <Filter Include="FreeRTOS\Source\Portable">

+      <UniqueIdentifier>{88f409e6-d396-4ac5-94bd-7a99c914be46}</UniqueIdentifier>

+    </Filter>

+    <Filter Include="FreeRTOS+">

+      <UniqueIdentifier>{e5ad4ec7-23dc-4295-8add-2acaee488f5a}</UniqueIdentifier>

+    </Filter>

+    <Filter Include="FreeRTOS+\FreeRTOS+CLI">

+      <UniqueIdentifier>{fd43c0ed-fdbc-437f-a5a3-c50399690bd7}</UniqueIdentifier>

+    </Filter>

+    <Filter Include="FreeRTOS+\FreeRTOS+CLI\include">

+      <UniqueIdentifier>{c5889fe2-af0f-4cea-927f-6a6935ec5e14}</UniqueIdentifier>

+    </Filter>

+    <Filter Include="Configuration Files">

+      <UniqueIdentifier>{19ff1a34-36de-4c48-9d10-3fb1fa0d1fa4}</UniqueIdentifier>

+      <Extensions>h;hpp;hxx;hm;inl</Extensions>

+    </Filter>

+    <Filter Include="FreeRTOS\Source\include">

+      <UniqueIdentifier>{ab23827c-126c-4e5a-bc99-8efa44d8a8bd}</UniqueIdentifier>

+    </Filter>

+    <Filter Include="FreeRTOS+\FreeRTOS+Reliance Edge">

+      <UniqueIdentifier>{9c9c3b2d-6958-407d-b742-23fbf73678ed}</UniqueIdentifier>

+    </Filter>

+    <Filter Include="FreeRTOS+\FreeRTOS+Reliance Edge\test">

+      <UniqueIdentifier>{e47b8f1d-1582-4e56-9c2f-ca2cdbea1b86}</UniqueIdentifier>

+    </Filter>

+    <Filter Include="FreeRTOS+\FreeRTOS+Reliance Edge\port">

+      <UniqueIdentifier>{9ecfe142-5bd2-472b-9568-243fa6169874}</UniqueIdentifier>

+    </Filter>

+    <Filter Include="FreeRTOS+\FreeRTOS+Reliance Edge\driver">

+      <UniqueIdentifier>{28ee3d7e-231b-4094-8a10-ad89fc82f705}</UniqueIdentifier>

+    </Filter>

+    <Filter Include="FreeRTOS+\FreeRTOS+Reliance Edge\util">

+      <UniqueIdentifier>{a955d01e-1f95-4c34-9558-14c52b75576f}</UniqueIdentifier>

+    </Filter>

+  </ItemGroup>

+  <ItemGroup>

+    <ClCompile Include="..\..\..\FreeRTOS\Source\portable\MSVC-MingW\port.c">

+      <Filter>FreeRTOS\Source\Portable</Filter>

+    </ClCompile>

+    <ClCompile Include="..\..\..\FreeRTOS\Source\timers.c">

+      <Filter>FreeRTOS\Source</Filter>

+    </ClCompile>

+    <ClCompile Include="..\..\..\FreeRTOS\Source\list.c">

+      <Filter>FreeRTOS\Source</Filter>

+    </ClCompile>

+    <ClCompile Include="..\..\..\FreeRTOS\Source\queue.c">

+      <Filter>FreeRTOS\Source</Filter>

+    </ClCompile>

+    <ClCompile Include="..\..\..\FreeRTOS\Source\tasks.c">

+      <Filter>FreeRTOS\Source</Filter>

+    </ClCompile>

+    <ClCompile Include="..\..\..\FreeRTOS\Source\portable\MemMang\heap_4.c">

+      <Filter>FreeRTOS\Source\Portable</Filter>

+    </ClCompile>

+    <ClCompile Include="..\..\Source\FreeRTOS-Plus-CLI\FreeRTOS_CLI.c">

+      <Filter>FreeRTOS+\FreeRTOS+CLI</Filter>

+    </ClCompile>

+    <ClCompile Include="UDPCommandServer.c" />

+    <ClCompile Include="File-system-demo.c" />

+    <ClCompile Include="main.c" />

+    <ClCompile Include="Run-time-stats-utils.c" />

+    <ClCompile Include="Sample-CLI-commands.c" />

+    <ClCompile Include="..\..\Source\Reliance-Edge\tests\util\printf.c">

+      <Filter>FreeRTOS+\FreeRTOS+Reliance Edge\test</Filter>

+    </ClCompile>

+    <ClCompile Include="..\..\Source\Reliance-Edge\tests\util\rand.c">

+      <Filter>FreeRTOS+\FreeRTOS+Reliance Edge\test</Filter>

+    </ClCompile>

+    <ClCompile Include="..\..\Source\Reliance-Edge\tests\posix\fsstress.c">

+      <Filter>FreeRTOS+\FreeRTOS+Reliance Edge\test</Filter>

+    </ClCompile>

+    <ClCompile Include="..\..\Source\Reliance-Edge\os\freertos\services\ostimestamp.c">

+      <Filter>FreeRTOS+\FreeRTOS+Reliance Edge\port</Filter>

+    </ClCompile>

+    <ClCompile Include="..\..\Source\Reliance-Edge\os\freertos\services\osassert.c">

+      <Filter>FreeRTOS+\FreeRTOS+Reliance Edge\port</Filter>

+    </ClCompile>

+    <ClCompile Include="..\..\Source\Reliance-Edge\os\freertos\services\osbdev.c">

+      <Filter>FreeRTOS+\FreeRTOS+Reliance Edge\port</Filter>

+    </ClCompile>

+    <ClCompile Include="..\..\Source\Reliance-Edge\os\freertos\services\osclock.c">

+      <Filter>FreeRTOS+\FreeRTOS+Reliance Edge\port</Filter>

+    </ClCompile>

+    <ClCompile Include="..\..\Source\Reliance-Edge\os\freertos\services\osmutex.c">

+      <Filter>FreeRTOS+\FreeRTOS+Reliance Edge\port</Filter>

+    </ClCompile>

+    <ClCompile Include="..\..\Source\Reliance-Edge\os\freertos\services\osoutput.c">

+      <Filter>FreeRTOS+\FreeRTOS+Reliance Edge\port</Filter>

+    </ClCompile>

+    <ClCompile Include="..\..\Source\Reliance-Edge\os\freertos\services\ostask.c">

+      <Filter>FreeRTOS+\FreeRTOS+Reliance Edge\port</Filter>

+    </ClCompile>

+    <ClCompile Include="..\..\Source\Reliance-Edge\core\driver\volume.c">

+      <Filter>FreeRTOS+\FreeRTOS+Reliance Edge\driver</Filter>

+    </ClCompile>

+    <ClCompile Include="..\..\Source\Reliance-Edge\core\driver\blockio.c">

+      <Filter>FreeRTOS+\FreeRTOS+Reliance Edge\driver</Filter>

+    </ClCompile>

+    <ClCompile Include="..\..\Source\Reliance-Edge\core\driver\buffer.c">

+      <Filter>FreeRTOS+\FreeRTOS+Reliance Edge\driver</Filter>

+    </ClCompile>

+    <ClCompile Include="..\..\Source\Reliance-Edge\core\driver\core.c">

+      <Filter>FreeRTOS+\FreeRTOS+Reliance Edge\driver</Filter>

+    </ClCompile>

+    <ClCompile Include="..\..\Source\Reliance-Edge\core\driver\dir.c">

+      <Filter>FreeRTOS+\FreeRTOS+Reliance Edge\driver</Filter>

+    </ClCompile>

+    <ClCompile Include="..\..\Source\Reliance-Edge\core\driver\format.c">

+      <Filter>FreeRTOS+\FreeRTOS+Reliance Edge\driver</Filter>

+    </ClCompile>

+    <ClCompile Include="..\..\Source\Reliance-Edge\fse\fse.c">

+      <Filter>FreeRTOS+\FreeRTOS+Reliance Edge\driver</Filter>

+    </ClCompile>

+    <ClCompile Include="..\..\Source\Reliance-Edge\core\driver\imap.c">

+      <Filter>FreeRTOS+\FreeRTOS+Reliance Edge\driver</Filter>

+    </ClCompile>

+    <ClCompile Include="..\..\Source\Reliance-Edge\core\driver\imapextern.c">

+      <Filter>FreeRTOS+\FreeRTOS+Reliance Edge\driver</Filter>

+    </ClCompile>

+    <ClCompile Include="..\..\Source\Reliance-Edge\core\driver\imapinline.c">

+      <Filter>FreeRTOS+\FreeRTOS+Reliance Edge\driver</Filter>

+    </ClCompile>

+    <ClCompile Include="..\..\Source\Reliance-Edge\core\driver\inode.c">

+      <Filter>FreeRTOS+\FreeRTOS+Reliance Edge\driver</Filter>

+    </ClCompile>

+    <ClCompile Include="..\..\Source\Reliance-Edge\core\driver\inodedata.c">

+      <Filter>FreeRTOS+\FreeRTOS+Reliance Edge\driver</Filter>

+    </ClCompile>

+    <ClCompile Include="..\..\Source\Reliance-Edge\posix\path.c">

+      <Filter>FreeRTOS+\FreeRTOS+Reliance Edge\driver</Filter>

+    </ClCompile>

+    <ClCompile Include="..\..\Source\Reliance-Edge\posix\posix.c">

+      <Filter>FreeRTOS+\FreeRTOS+Reliance Edge\driver</Filter>

+    </ClCompile>

+    <ClCompile Include="..\..\Source\Reliance-Edge\util\bitmap.c">

+      <Filter>FreeRTOS+\FreeRTOS+Reliance Edge\util</Filter>

+    </ClCompile>

+    <ClCompile Include="..\..\Source\Reliance-Edge\util\string.c">

+      <Filter>FreeRTOS+\FreeRTOS+Reliance Edge\util</Filter>

+    </ClCompile>

+    <ClCompile Include="..\..\Source\Reliance-Edge\util\crc.c">

+      <Filter>FreeRTOS+\FreeRTOS+Reliance Edge\util</Filter>

+    </ClCompile>

+    <ClCompile Include="..\..\Source\Reliance-Edge\util\endian.c">

+      <Filter>FreeRTOS+\FreeRTOS+Reliance Edge\util</Filter>

+    </ClCompile>

+    <ClCompile Include="..\..\Source\Reliance-Edge\util\memory.c">

+      <Filter>FreeRTOS+\FreeRTOS+Reliance Edge\util</Filter>

+    </ClCompile>

+    <ClCompile Include="..\..\Source\Reliance-Edge\util\namelen.c">

+      <Filter>FreeRTOS+\FreeRTOS+Reliance Edge\util</Filter>

+    </ClCompile>

+    <ClCompile Include="..\..\Source\Reliance-Edge\util\sign.c">

+      <Filter>FreeRTOS+\FreeRTOS+Reliance Edge\util</Filter>

+    </ClCompile>

+    <ClCompile Include="File-Related-CLI-commands.c" />

+    <ClCompile Include="ConfigurationFiles\redconf.c">

+      <Filter>Configuration Files</Filter>

+    </ClCompile>

+    <ClCompile Include="..\..\Source\Reliance-Edge\tests\util\atoi.c">

+      <Filter>FreeRTOS+\FreeRTOS+Reliance Edge\test</Filter>

+    </ClCompile>

+    <ClCompile Include="..\..\Source\Reliance-Edge\tests\util\math.c">

+      <Filter>FreeRTOS+\FreeRTOS+Reliance Edge\test</Filter>

+    </ClCompile>

+    <ClCompile Include="..\..\Source\Reliance-Edge\toolcmn\getopt.c">

+      <Filter>FreeRTOS+\FreeRTOS+Reliance Edge\test</Filter>

+    </ClCompile>

+    <ClCompile Include="..\..\Source\Reliance-Edge\toolcmn\toolcmn.c">

+      <Filter>FreeRTOS+\FreeRTOS+Reliance Edge\test</Filter>

+    </ClCompile>

+  </ItemGroup>

+  <ItemGroup>

+    <ClInclude Include="..\..\Source\FreeRTOS-Plus-CLI\FreeRTOS_CLI.h">

+      <Filter>FreeRTOS+\FreeRTOS+CLI\include</Filter>

+    </ClInclude>

+    <ClInclude Include="..\..\..\FreeRTOS\Source\include\timers.h">

+      <Filter>FreeRTOS\Source\include</Filter>

+    </ClInclude>

+    <ClInclude Include="..\..\..\FreeRTOS\Source\include\FreeRTOS.h">

+      <Filter>FreeRTOS\Source\include</Filter>

+    </ClInclude>

+    <ClInclude Include="..\..\..\FreeRTOS\Source\include\projdefs.h">

+      <Filter>FreeRTOS\Source\include</Filter>

+    </ClInclude>

+    <ClInclude Include="..\..\..\FreeRTOS\Source\include\queue.h">

+      <Filter>FreeRTOS\Source\include</Filter>

+    </ClInclude>

+    <ClInclude Include="..\..\..\FreeRTOS\Source\include\semphr.h">

+      <Filter>FreeRTOS\Source\include</Filter>

+    </ClInclude>

+    <ClInclude Include="..\..\..\FreeRTOS\Source\include\task.h">

+      <Filter>FreeRTOS\Source\include</Filter>

+    </ClInclude>

+    <ClInclude Include="ConfigurationFiles\FreeRTOSConfig.h">

+      <Filter>Configuration Files</Filter>

+    </ClInclude>

+    <ClInclude Include="..\..\Source\Reliance-Edge\os\freertos\include\ostypes.h">

+      <Filter>FreeRTOS+\FreeRTOS+Reliance Edge\port</Filter>

+    </ClInclude>

+    <ClInclude Include="ConfigurationFiles\redconf.h">

+      <Filter>Configuration Files</Filter>

+    </ClInclude>

+    <ClInclude Include="ConfigurationFiles\redtypes.h">

+      <Filter>Configuration Files</Filter>

+    </ClInclude>

+  </ItemGroup>

+</Project>
\ No newline at end of file
diff --git a/FreeRTOS-Plus/Demo/FreeRTOS_Plus_Reliance_Edge_and_CLI_Windows_Simulator/WIN32.vcxproj.user b/FreeRTOS-Plus/Demo/FreeRTOS_Plus_Reliance_Edge_and_CLI_Windows_Simulator/WIN32.vcxproj.user
new file mode 100644
index 0000000..695b5c7
--- /dev/null
+++ b/FreeRTOS-Plus/Demo/FreeRTOS_Plus_Reliance_Edge_and_CLI_Windows_Simulator/WIN32.vcxproj.user
@@ -0,0 +1,3 @@
+<?xml version="1.0" encoding="utf-8"?>

+<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">

+</Project>
\ No newline at end of file
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
new file mode 100644
index 0000000..0a7028d
--- /dev/null
+++ b/FreeRTOS-Plus/Demo/FreeRTOS_Plus_Reliance_Edge_and_CLI_Windows_Simulator/main.c
@@ -0,0 +1,204 @@
+/*

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

+    All rights reserved

+

+    VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

+

+    This file is part of the FreeRTOS distribution.

+

+    FreeRTOS is free software; you can redistribute it and/or modify it under

+    the terms of the GNU General Public License (version 2) as published by the

+    Free Software Foundation >>!AND MODIFIED BY!<< the FreeRTOS exception.

+

+    ***************************************************************************

+    >>!   NOTE: The modification to the GPL is included to allow you to     !<<

+    >>!   distribute a combined work that includes FreeRTOS without being   !<<

+    >>!   obliged to provide the source code for proprietary components     !<<

+    >>!   outside of the FreeRTOS kernel.                                   !<<

+    ***************************************************************************

+

+    FreeRTOS is distributed in the hope that it will be useful, but WITHOUT ANY

+    WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS

+    FOR A PARTICULAR PURPOSE.  Full license text is available on the following

+    link: http://www.freertos.org/a00114.html

+

+    ***************************************************************************

+     *                                                                       *

+     *    FreeRTOS provides completely free yet professionally developed,    *

+     *    robust, strictly quality controlled, supported, and cross          *

+     *    platform software that is more than just the market leader, it     *

+     *    is the industry's de facto standard.                               *

+     *                                                                       *

+     *    Help yourself get started quickly while simultaneously helping     *

+     *    to support the FreeRTOS project by purchasing a FreeRTOS           *

+     *    tutorial book, reference manual, or both:                          *

+     *    http://www.FreeRTOS.org/Documentation                              *

+     *                                                                       *

+    ***************************************************************************

+

+    http://www.FreeRTOS.org/FAQHelp.html - Having a problem?  Start by reading

+    the FAQ page "My application does not run, what could be wrong?".  Have you

+    defined configASSERT()?

+

+    http://www.FreeRTOS.org/support - In return for receiving this top quality

+    embedded software for free we request you assist our global community by

+    participating in the support forum.

+

+    http://www.FreeRTOS.org/training - Investing in training allows your team to

+    be as productive as possible as early as possible.  Now you can receive

+    FreeRTOS training directly from Richard Barry, CEO of Real Time Engineers

+    Ltd, and the world's leading authority on the world's leading RTOS.

+

+    http://www.FreeRTOS.org/plus - A selection of FreeRTOS ecosystem products,

+    including FreeRTOS+Trace - an indispensable productivity tool, a DOS

+    compatible FAT file system, and our tiny thread aware UDP/IP stack.

+

+    http://www.FreeRTOS.org/labs - Where new FreeRTOS products go to incubate.

+    Come and try FreeRTOS+TCP, our new open source TCP/IP stack for FreeRTOS.

+

+    http://www.OpenRTOS.com - Real Time Engineers ltd. license FreeRTOS to High

+    Integrity Systems ltd. to sell under the OpenRTOS brand.  Low cost OpenRTOS

+    licenses offer ticketed support, indemnification and commercial middleware.

+

+    http://www.SafeRTOS.com - High Integrity Systems also provide a safety

+    engineered and independently SIL3 certified version for use in safety and

+    mission critical applications that require provable dependability.

+

+    1 tab == 4 spaces!

+*/

+

+/******************************************************************************

+ *

+ * This demo is described on the following web page:

+ * TODO: This link describes the FAT version of this demo.

+ * http://FreeRTOS-Plus/Fail_Safe_File_System/Fail_Safe_Embedded_File_System_demo.shtml

+ *

+ ******************************************************************************/

+

+/* Standard includes. */

+#include <stdio.h>

+#include <stdint.h>

+

+/* FreeRTOS includes. */

+#include <FreeRTOS.h>

+#include "task.h"

+#include "queue.h"

+#include "semphr.h"

+

+/* Priorities at which the tasks are created. */

+#define mainUDP_CLI_TASK_PRIORITY			( tskIDLE_PRIORITY )

+

+/*-----------------------------------------------------------*/

+

+/*

+ * Register the generic commands that can be used with FreeRTOS+CLI.

+ */

+extern void vRegisterSampleCLICommands( void );

+

+/*

+ * Register the file system commands that can be used with FreeRTOS+CLI.

+ */

+extern void vRegisterFileSystemCLICommands( void );

+

+/*

+ * The task that implements the UDP command interpreter using FreeRTOS+CLI.

+ */

+extern void vUDPCommandInterpreterTask( void *pvParameters );

+

+/*

+ * Creates and verifies different files on the volume, demonstrating the use of

+ * various different API functions.

+ */

+extern void vCreateAndVerifySampleFiles( void );

+

+/*-----------------------------------------------------------*/

+#pragma warning - add link to documentation page

+int main( void )

+{

+const uint32_t ulLongTime_ms = 250UL;

+

+	/* Initialise the drive and file system, then create a few example

+	files.  The output from this function just goes to the stdout window,

+	allowing the output to be viewed when the UDP command console is not

+	connected. */

+	vCreateAndVerifySampleFiles();

+

+	/* Register generic commands with the FreeRTOS+CLI command interpreter. */

+	vRegisterSampleCLICommands();

+

+	/* Register file system related commands with the FreeRTOS+CLI command

+	interpreter. */

+	vRegisterFileSystemCLICommands();

+

+	/* Create the task that handles the CLI on a UDP port.  The port number

+	is set using the configUDP_CLI_PORT_NUMBER setting in FreeRTOSConfig.h. */

+	xTaskCreate( vUDPCommandInterpreterTask, 	/* The function that implements the command interpreter IO handling. */

+				"CLI", 							/* The name of the task - just to assist debugging. */

+				configMINIMAL_STACK_SIZE, NULL, /* The size of the stack allocated to the task. */

+				mainUDP_CLI_TASK_PRIORITY, 		/* The priority at which the task will run. */

+				NULL );							/* A handle to the task is not required, so NULL is passed. */

+

+	/* 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( ;; )

+	{

+		Sleep( ulLongTime_ms );

+	}

+}

+/*-----------------------------------------------------------*/

+

+void vApplicationIdleHook( void )

+{

+const unsigned long ulMSToSleep = 5;

+

+	/* This function is called on each cycle of the idle task if

+	configUSE_IDLE_HOOK is set to 1 in FreeRTOSConfig.h.  Sleep to reduce CPU

+	load. */

+	Sleep( ulMSToSleep );

+}

+/*-----------------------------------------------------------*/

+

+void vAssertCalled( const char *pcFile, unsigned long ulLine )

+{

+volatile uint32_t ulSetToNonZeroToExitLoop = 0;

+

+	printf( "ASSERT FAILED: File %s, line %u\r\n", pcFile, ulLine );

+

+	taskENTER_CRITICAL();

+	{

+		while( ulSetToNonZeroToExitLoop == 0 )

+		{

+			/* Do not leave the assert function unless the debugger is used to

+			set ulSetToNonZeroToExitLoop to a non-zero value. */

+		}

+	}

+	taskEXIT_CRITICAL();

+}

+/*-----------------------------------------------------------*/

+

+void vApplicationMallocFailedHook( void )

+{

+	/* vApplicationMallocFailedHook() will only be called if

+	configUSE_MALLOC_FAILED_HOOK is set to 1 in FreeRTOSConfig.h.  It is a hook

+	function that will get called if a call to pvPortMalloc() fails.

+	pvPortMalloc() is called internally by the kernel whenever a task, queue,

+	timer or semaphore is created.  It is also called by various parts of the

+	demo application.  If heap_1.c, heap_2.c or heap_4.c are used, then the

+	size of the heap available to pvPortMalloc() is defined by

+	configTOTAL_HEAP_SIZE in FreeRTOSConfig.h, and the xPortGetFreeHeapSize()

+	API function can be used to query the size of free heap space that remains

+	(although it does not provide information on how the remaining heap might

+	be fragmented). */

+	taskDISABLE_INTERRUPTS();

+	for( ;; );

+}

+

+

+

diff --git a/FreeRTOS-Plus/Demo/FreeRTOS_Plus_UDP_and_CLI_LPC1830_GCC/CLI-commands.c b/FreeRTOS-Plus/Demo/FreeRTOS_Plus_UDP_and_CLI_LPC1830_GCC/CLI-commands.c
index 3258112..fa3a106 100644
--- a/FreeRTOS-Plus/Demo/FreeRTOS_Plus_UDP_and_CLI_LPC1830_GCC/CLI-commands.c
+++ b/FreeRTOS-Plus/Demo/FreeRTOS_Plus_UDP_and_CLI_LPC1830_GCC/CLI-commands.c
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS-Plus/Demo/FreeRTOS_Plus_UDP_and_CLI_LPC1830_GCC/Examples/USB_CDC/CDCCommandConsole.c b/FreeRTOS-Plus/Demo/FreeRTOS_Plus_UDP_and_CLI_LPC1830_GCC/Examples/USB_CDC/CDCCommandConsole.c
index 6422ee7..0c673e2 100644
--- a/FreeRTOS-Plus/Demo/FreeRTOS_Plus_UDP_and_CLI_LPC1830_GCC/Examples/USB_CDC/CDCCommandConsole.c
+++ b/FreeRTOS-Plus/Demo/FreeRTOS_Plus_UDP_and_CLI_LPC1830_GCC/Examples/USB_CDC/CDCCommandConsole.c
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS-Plus/Demo/FreeRTOS_Plus_UDP_and_CLI_LPC1830_GCC/Examples/include/CDCCommandConsole.h b/FreeRTOS-Plus/Demo/FreeRTOS_Plus_UDP_and_CLI_LPC1830_GCC/Examples/include/CDCCommandConsole.h
index adb7623..5000e00 100644
--- a/FreeRTOS-Plus/Demo/FreeRTOS_Plus_UDP_and_CLI_LPC1830_GCC/Examples/include/CDCCommandConsole.h
+++ b/FreeRTOS-Plus/Demo/FreeRTOS_Plus_UDP_and_CLI_LPC1830_GCC/Examples/include/CDCCommandConsole.h
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS-Plus/Demo/FreeRTOS_Plus_UDP_and_CLI_LPC1830_GCC/Examples/include/TwoEchoClients.h b/FreeRTOS-Plus/Demo/FreeRTOS_Plus_UDP_and_CLI_LPC1830_GCC/Examples/include/TwoEchoClients.h
index 00be0bf..b959591 100644
--- a/FreeRTOS-Plus/Demo/FreeRTOS_Plus_UDP_and_CLI_LPC1830_GCC/Examples/include/TwoEchoClients.h
+++ b/FreeRTOS-Plus/Demo/FreeRTOS_Plus_UDP_and_CLI_LPC1830_GCC/Examples/include/TwoEchoClients.h
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS-Plus/Demo/FreeRTOS_Plus_UDP_and_CLI_LPC1830_GCC/FreeRTOSConfig.h b/FreeRTOS-Plus/Demo/FreeRTOS_Plus_UDP_and_CLI_LPC1830_GCC/FreeRTOSConfig.h
index 5d131a5..9704c09 100644
--- a/FreeRTOS-Plus/Demo/FreeRTOS_Plus_UDP_and_CLI_LPC1830_GCC/FreeRTOSConfig.h
+++ b/FreeRTOS-Plus/Demo/FreeRTOS_Plus_UDP_and_CLI_LPC1830_GCC/FreeRTOSConfig.h
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS-Plus/Demo/FreeRTOS_Plus_UDP_and_CLI_LPC1830_GCC/LEDs.c b/FreeRTOS-Plus/Demo/FreeRTOS_Plus_UDP_and_CLI_LPC1830_GCC/LEDs.c
index b660c00..41d8bf3 100644
--- a/FreeRTOS-Plus/Demo/FreeRTOS_Plus_UDP_and_CLI_LPC1830_GCC/LEDs.c
+++ b/FreeRTOS-Plus/Demo/FreeRTOS_Plus_UDP_and_CLI_LPC1830_GCC/LEDs.c
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS-Plus/Demo/FreeRTOS_Plus_UDP_and_CLI_LPC1830_GCC/RunTimeStatsTimer.c b/FreeRTOS-Plus/Demo/FreeRTOS_Plus_UDP_and_CLI_LPC1830_GCC/RunTimeStatsTimer.c
index 7861af7..56e0943 100644
--- a/FreeRTOS-Plus/Demo/FreeRTOS_Plus_UDP_and_CLI_LPC1830_GCC/RunTimeStatsTimer.c
+++ b/FreeRTOS-Plus/Demo/FreeRTOS_Plus_UDP_and_CLI_LPC1830_GCC/RunTimeStatsTimer.c
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS-Plus/Demo/FreeRTOS_Plus_UDP_and_CLI_LPC1830_GCC/main.c b/FreeRTOS-Plus/Demo/FreeRTOS_Plus_UDP_and_CLI_LPC1830_GCC/main.c
index cde239d..2dc9fce 100644
--- a/FreeRTOS-Plus/Demo/FreeRTOS_Plus_UDP_and_CLI_LPC1830_GCC/main.c
+++ b/FreeRTOS-Plus/Demo/FreeRTOS_Plus_UDP_and_CLI_LPC1830_GCC/main.c
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS-Plus/Demo/FreeRTOS_Plus_UDP_and_CLI_Windows_Simulator/DemoTasks/SelectServer.c b/FreeRTOS-Plus/Demo/FreeRTOS_Plus_UDP_and_CLI_Windows_Simulator/DemoTasks/SelectServer.c
index ccdd394..55e96f8 100644
--- a/FreeRTOS-Plus/Demo/FreeRTOS_Plus_UDP_and_CLI_Windows_Simulator/DemoTasks/SelectServer.c
+++ b/FreeRTOS-Plus/Demo/FreeRTOS_Plus_UDP_and_CLI_Windows_Simulator/DemoTasks/SelectServer.c
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS-Plus/Demo/FreeRTOS_Plus_UDP_and_CLI_Windows_Simulator/DemoTasks/SimpleClientAndServer.c b/FreeRTOS-Plus/Demo/FreeRTOS_Plus_UDP_and_CLI_Windows_Simulator/DemoTasks/SimpleClientAndServer.c
index 06c8ea8..eede2d7 100644
--- a/FreeRTOS-Plus/Demo/FreeRTOS_Plus_UDP_and_CLI_Windows_Simulator/DemoTasks/SimpleClientAndServer.c
+++ b/FreeRTOS-Plus/Demo/FreeRTOS_Plus_UDP_and_CLI_Windows_Simulator/DemoTasks/SimpleClientAndServer.c
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS-Plus/Demo/FreeRTOS_Plus_UDP_and_CLI_Windows_Simulator/DemoTasks/UDPCommandServer.c b/FreeRTOS-Plus/Demo/FreeRTOS_Plus_UDP_and_CLI_Windows_Simulator/DemoTasks/UDPCommandServer.c
index 72061be..d182ee1 100644
--- a/FreeRTOS-Plus/Demo/FreeRTOS_Plus_UDP_and_CLI_Windows_Simulator/DemoTasks/UDPCommandServer.c
+++ b/FreeRTOS-Plus/Demo/FreeRTOS_Plus_UDP_and_CLI_Windows_Simulator/DemoTasks/UDPCommandServer.c
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS-Plus/Demo/FreeRTOS_Plus_UDP_and_CLI_Windows_Simulator/DemoTasks/include/SelectServer.h b/FreeRTOS-Plus/Demo/FreeRTOS_Plus_UDP_and_CLI_Windows_Simulator/DemoTasks/include/SelectServer.h
index cafc926..f30b119 100644
--- a/FreeRTOS-Plus/Demo/FreeRTOS_Plus_UDP_and_CLI_Windows_Simulator/DemoTasks/include/SelectServer.h
+++ b/FreeRTOS-Plus/Demo/FreeRTOS_Plus_UDP_and_CLI_Windows_Simulator/DemoTasks/include/SelectServer.h
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS-Plus/Demo/FreeRTOS_Plus_UDP_and_CLI_Windows_Simulator/DemoTasks/include/SimpleClientAndServer.h b/FreeRTOS-Plus/Demo/FreeRTOS_Plus_UDP_and_CLI_Windows_Simulator/DemoTasks/include/SimpleClientAndServer.h
index 70988cd..85e3d9f 100644
--- a/FreeRTOS-Plus/Demo/FreeRTOS_Plus_UDP_and_CLI_Windows_Simulator/DemoTasks/include/SimpleClientAndServer.h
+++ b/FreeRTOS-Plus/Demo/FreeRTOS_Plus_UDP_and_CLI_Windows_Simulator/DemoTasks/include/SimpleClientAndServer.h
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS-Plus/Demo/FreeRTOS_Plus_UDP_and_CLI_Windows_Simulator/DemoTasks/include/UDPCommandInterpreter.h b/FreeRTOS-Plus/Demo/FreeRTOS_Plus_UDP_and_CLI_Windows_Simulator/DemoTasks/include/UDPCommandInterpreter.h
index 516e91e..befd44a 100644
--- a/FreeRTOS-Plus/Demo/FreeRTOS_Plus_UDP_and_CLI_Windows_Simulator/DemoTasks/include/UDPCommandInterpreter.h
+++ b/FreeRTOS-Plus/Demo/FreeRTOS_Plus_UDP_and_CLI_Windows_Simulator/DemoTasks/include/UDPCommandInterpreter.h
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS-Plus/Demo/FreeRTOS_Plus_UDP_and_CLI_Windows_Simulator/FreeRTOSConfig.h b/FreeRTOS-Plus/Demo/FreeRTOS_Plus_UDP_and_CLI_Windows_Simulator/FreeRTOSConfig.h
index d61a38d..e028176 100644
--- a/FreeRTOS-Plus/Demo/FreeRTOS_Plus_UDP_and_CLI_Windows_Simulator/FreeRTOSConfig.h
+++ b/FreeRTOS-Plus/Demo/FreeRTOS_Plus_UDP_and_CLI_Windows_Simulator/FreeRTOSConfig.h
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS-Plus/Demo/FreeRTOS_Plus_UDP_and_CLI_Windows_Simulator/Run-time-stats-utils.c b/FreeRTOS-Plus/Demo/FreeRTOS_Plus_UDP_and_CLI_Windows_Simulator/Run-time-stats-utils.c
index b0b3bee..eac1c28 100644
--- a/FreeRTOS-Plus/Demo/FreeRTOS_Plus_UDP_and_CLI_Windows_Simulator/Run-time-stats-utils.c
+++ b/FreeRTOS-Plus/Demo/FreeRTOS_Plus_UDP_and_CLI_Windows_Simulator/Run-time-stats-utils.c
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS-Plus/Demo/FreeRTOS_Plus_UDP_and_CLI_Windows_Simulator/WinPCap/arch.c b/FreeRTOS-Plus/Demo/FreeRTOS_Plus_UDP_and_CLI_Windows_Simulator/WinPCap/arch.c
index 7dac8aa..c52be2f 100644
--- a/FreeRTOS-Plus/Demo/FreeRTOS_Plus_UDP_and_CLI_Windows_Simulator/WinPCap/arch.c
+++ b/FreeRTOS-Plus/Demo/FreeRTOS_Plus_UDP_and_CLI_Windows_Simulator/WinPCap/arch.c
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS-Plus/Demo/FreeRTOS_Plus_UDP_and_CLI_Windows_Simulator/WinPCap/netif.h b/FreeRTOS-Plus/Demo/FreeRTOS_Plus_UDP_and_CLI_Windows_Simulator/WinPCap/netif.h
index c0d8061..aaf87cf 100644
--- a/FreeRTOS-Plus/Demo/FreeRTOS_Plus_UDP_and_CLI_Windows_Simulator/WinPCap/netif.h
+++ b/FreeRTOS-Plus/Demo/FreeRTOS_Plus_UDP_and_CLI_Windows_Simulator/WinPCap/netif.h
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS-Plus/Demo/FreeRTOS_Plus_UDP_and_CLI_Windows_Simulator/main.c b/FreeRTOS-Plus/Demo/FreeRTOS_Plus_UDP_and_CLI_Windows_Simulator/main.c
index b65d4d5..64f3f87 100644
--- a/FreeRTOS-Plus/Demo/FreeRTOS_Plus_UDP_and_CLI_Windows_Simulator/main.c
+++ b/FreeRTOS-Plus/Demo/FreeRTOS_Plus_UDP_and_CLI_Windows_Simulator/main.c
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS-Plus/Source/FreeRTOS-Plus-CLI/FreeRTOS_CLI.c b/FreeRTOS-Plus/Source/FreeRTOS-Plus-CLI/FreeRTOS_CLI.c
index 89e25fc..58e795c 100644
--- a/FreeRTOS-Plus/Source/FreeRTOS-Plus-CLI/FreeRTOS_CLI.c
+++ b/FreeRTOS-Plus/Source/FreeRTOS-Plus-CLI/FreeRTOS_CLI.c
@@ -53,8 +53,8 @@
 

 /* If the application writer needs to place the buffer used by the CLI at a

 fixed address then set configAPPLICATION_PROVIDES_cOutputBuffer to 1 in

-FreeRTOSConfig.h, and provide then declare an array as follows with the

-following name and size in one of the application files:

+FreeRTOSConfig.h, then declare an array with the following name and size in 

+one of the application files:

 	char cOutputBuffer[ configCOMMAND_INT_MAX_OUTPUT_SIZE ];

 */

 #ifndef configAPPLICATION_PROVIDES_cOutputBuffer

diff --git a/FreeRTOS-Plus/Source/Reliance-Edge/CREDITS.txt b/FreeRTOS-Plus/Source/Reliance-Edge/CREDITS.txt
new file mode 100644
index 0000000..ad14dda
--- /dev/null
+++ b/FreeRTOS-Plus/Source/Reliance-Edge/CREDITS.txt
@@ -0,0 +1,18 @@
+Reliance Edge Credits

+=====================

+

+This is a list (or partial list) of people who have made non-trivial or

+noteworthy contributions to the Reliance Edge project.  It is sorted by name.

+Entries are formatted as below:

+

+Real Name (githubaccount)

+Short description of how Real Name contributed to Reliance Edge.

+

+The real name may be withheld by request and the GitHub account name might be

+missing if the contributor does not use GitHub.

+

+Credits

+-------

+

+None yet! ;)

+

diff --git a/FreeRTOS-Plus/Source/Reliance-Edge/LICENSE.txt b/FreeRTOS-Plus/Source/Reliance-Edge/LICENSE.txt
new file mode 100644
index 0000000..6eb1fc8
--- /dev/null
+++ b/FreeRTOS-Plus/Source/Reliance-Edge/LICENSE.txt
@@ -0,0 +1,340 @@
+                    GNU GENERAL PUBLIC LICENSE

+                       Version 2, June 1991

+

+ Copyright (C) 1989, 1991 Free Software Foundation, Inc.,

+ 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA

+ Everyone is permitted to copy and distribute verbatim copies

+ of this license document, but changing it is not allowed.

+

+                            Preamble

+

+  The licenses for most software are designed to take away your

+freedom to share and change it.  By contrast, the GNU General Public

+License is intended to guarantee your freedom to share and change free

+software--to make sure the software is free for all its users.  This

+General Public License applies to most of the Free Software

+Foundation's software and to any other program whose authors commit to

+using it.  (Some other Free Software Foundation software is covered by

+the GNU Lesser General Public License instead.)  You can apply it to

+your programs, too.

+

+  When we speak of free software, we are referring to freedom, not

+price.  Our General Public Licenses are designed to make sure that you

+have the freedom to distribute copies of free software (and charge for

+this service if you wish), that you receive source code or can get it

+if you want it, that you can change the software or use pieces of it

+in new free programs; and that you know you can do these things.

+

+  To protect your rights, we need to make restrictions that forbid

+anyone to deny you these rights or to ask you to surrender the rights.

+These restrictions translate to certain responsibilities for you if you

+distribute copies of the software, or if you modify it.

+

+  For example, if you distribute copies of such a program, whether

+gratis or for a fee, you must give the recipients all the rights that

+you have.  You must make sure that they, too, receive or can get the

+source code.  And you must show them these terms so they know their

+rights.

+

+  We protect your rights with two steps: (1) copyright the software, and

+(2) offer you this license which gives you legal permission to copy,

+distribute and/or modify the software.

+

+  Also, for each author's protection and ours, we want to make certain

+that everyone understands that there is no warranty for this free

+software.  If the software is modified by someone else and passed on, we

+want its recipients to know that what they have is not the original, so

+that any problems introduced by others will not reflect on the original

+authors' reputations.

+

+  Finally, any free program is threatened constantly by software

+patents.  We wish to avoid the danger that redistributors of a free

+program will individually obtain patent licenses, in effect making the

+program proprietary.  To prevent this, we have made it clear that any

+patent must be licensed for everyone's free use or not licensed at all.

+

+  The precise terms and conditions for copying, distribution and

+modification follow.

+

+                    GNU GENERAL PUBLIC LICENSE

+   TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION

+

+  0. This License applies to any program or other work which contains

+a notice placed by the copyright holder saying it may be distributed

+under the terms of this General Public License.  The "Program", below,

+refers to any such program or work, and a "work based on the Program"

+means either the Program or any derivative work under copyright law:

+that is to say, a work containing the Program or a portion of it,

+either verbatim or with modifications and/or translated into another

+language.  (Hereinafter, translation is included without limitation in

+the term "modification".)  Each licensee is addressed as "you".

+

+Activities other than copying, distribution and modification are not

+covered by this License; they are outside its scope.  The act of

+running the Program is not restricted, and the output from the Program

+is covered only if its contents constitute a work based on the

+Program (independent of having been made by running the Program).

+Whether that is true depends on what the Program does.

+

+  1. You may copy and distribute verbatim copies of the Program's

+source code as you receive it, in any medium, provided that you

+conspicuously and appropriately publish on each copy an appropriate

+copyright notice and disclaimer of warranty; keep intact all the

+notices that refer to this License and to the absence of any warranty;

+and give any other recipients of the Program a copy of this License

+along with the Program.

+

+You may charge a fee for the physical act of transferring a copy, and

+you may at your option offer warranty protection in exchange for a fee.

+

+  2. You may modify your copy or copies of the Program or any portion

+of it, thus forming a work based on the Program, and copy and

+distribute such modifications or work under the terms of Section 1

+above, provided that you also meet all of these conditions:

+

+    a) You must cause the modified files to carry prominent notices

+    stating that you changed the files and the date of any change.

+

+    b) You must cause any work that you distribute or publish, that in

+    whole or in part contains or is derived from the Program or any

+    part thereof, to be licensed as a whole at no charge to all third

+    parties under the terms of this License.

+

+    c) If the modified program normally reads commands interactively

+    when run, you must cause it, when started running for such

+    interactive use in the most ordinary way, to print or display an

+    announcement including an appropriate copyright notice and a

+    notice that there is no warranty (or else, saying that you provide

+    a warranty) and that users may redistribute the program under

+    these conditions, and telling the user how to view a copy of this

+    License.  (Exception: if the Program itself is interactive but

+    does not normally print such an announcement, your work based on

+    the Program is not required to print an announcement.)

+

+These requirements apply to the modified work as a whole.  If

+identifiable sections of that work are not derived from the Program,

+and can be reasonably considered independent and separate works in

+themselves, then this License, and its terms, do not apply to those

+sections when you distribute them as separate works.  But when you

+distribute the same sections as part of a whole which is a work based

+on the Program, the distribution of the whole must be on the terms of

+this License, whose permissions for other licensees extend to the

+entire whole, and thus to each and every part regardless of who wrote it.

+

+Thus, it is not the intent of this section to claim rights or contest

+your rights to work written entirely by you; rather, the intent is to

+exercise the right to control the distribution of derivative or

+collective works based on the Program.

+

+In addition, mere aggregation of another work not based on the Program

+with the Program (or with a work based on the Program) on a volume of

+a storage or distribution medium does not bring the other work under

+the scope of this License.

+

+  3. You may copy and distribute the Program (or a work based on it,

+under Section 2) in object code or executable form under the terms of

+Sections 1 and 2 above provided that you also do one of the following:

+

+    a) Accompany it with the complete corresponding machine-readable

+    source code, which must be distributed under the terms of Sections

+    1 and 2 above on a medium customarily used for software interchange; or,

+

+    b) Accompany it with a written offer, valid for at least three

+    years, to give any third party, for a charge no more than your

+    cost of physically performing source distribution, a complete

+    machine-readable copy of the corresponding source code, to be

+    distributed under the terms of Sections 1 and 2 above on a medium

+    customarily used for software interchange; or,

+

+    c) Accompany it with the information you received as to the offer

+    to distribute corresponding source code.  (This alternative is

+    allowed only for noncommercial distribution and only if you

+    received the program in object code or executable form with such

+    an offer, in accord with Subsection b above.)

+

+The source code for a work means the preferred form of the work for

+making modifications to it.  For an executable work, complete source

+code means all the source code for all modules it contains, plus any

+associated interface definition files, plus the scripts used to

+control compilation and installation of the executable.  However, as a

+special exception, the source code distributed need not include

+anything that is normally distributed (in either source or binary

+form) with the major components (compiler, kernel, and so on) of the

+operating system on which the executable runs, unless that component

+itself accompanies the executable.

+

+If distribution of executable or object code is made by offering

+access to copy from a designated place, then offering equivalent

+access to copy the source code from the same place counts as

+distribution of the source code, even though third parties are not

+compelled to copy the source along with the object code.

+

+  4. You may not copy, modify, sublicense, or distribute the Program

+except as expressly provided under this License.  Any attempt

+otherwise to copy, modify, sublicense or distribute the Program is

+void, and will automatically terminate your rights under this License.

+However, parties who have received copies, or rights, from you under

+this License will not have their licenses terminated so long as such

+parties remain in full compliance.

+

+  5. You are not required to accept this License, since you have not

+signed it.  However, nothing else grants you permission to modify or

+distribute the Program or its derivative works.  These actions are

+prohibited by law if you do not accept this License.  Therefore, by

+modifying or distributing the Program (or any work based on the

+Program), you indicate your acceptance of this License to do so, and

+all its terms and conditions for copying, distributing or modifying

+the Program or works based on it.

+

+  6. Each time you redistribute the Program (or any work based on the

+Program), the recipient automatically receives a license from the

+original licensor to copy, distribute or modify the Program subject to

+these terms and conditions.  You may not impose any further

+restrictions on the recipients' exercise of the rights granted herein.

+You are not responsible for enforcing compliance by third parties to

+this License.

+

+  7. If, as a consequence of a court judgment or allegation of patent

+infringement or for any other reason (not limited to patent issues),

+conditions are imposed on you (whether by court order, agreement or

+otherwise) that contradict the conditions of this License, they do not

+excuse you from the conditions of this License.  If you cannot

+distribute so as to satisfy simultaneously your obligations under this

+License and any other pertinent obligations, then as a consequence you

+may not distribute the Program at all.  For example, if a patent

+license would not permit royalty-free redistribution of the Program by

+all those who receive copies directly or indirectly through you, then

+the only way you could satisfy both it and this License would be to

+refrain entirely from distribution of the Program.

+

+If any portion of this section is held invalid or unenforceable under

+any particular circumstance, the balance of the section is intended to

+apply and the section as a whole is intended to apply in other

+circumstances.

+

+It is not the purpose of this section to induce you to infringe any

+patents or other property right claims or to contest validity of any

+such claims; this section has the sole purpose of protecting the

+integrity of the free software distribution system, which is

+implemented by public license practices.  Many people have made

+generous contributions to the wide range of software distributed

+through that system in reliance on consistent application of that

+system; it is up to the author/donor to decide if he or she is willing

+to distribute software through any other system and a licensee cannot

+impose that choice.

+

+This section is intended to make thoroughly clear what is believed to

+be a consequence of the rest of this License.

+

+  8. If the distribution and/or use of the Program is restricted in

+certain countries either by patents or by copyrighted interfaces, the

+original copyright holder who places the Program under this License

+may add an explicit geographical distribution limitation excluding

+those countries, so that distribution is permitted only in or among

+countries not thus excluded.  In such case, this License incorporates

+the limitation as if written in the body of this License.

+

+  9. The Free Software Foundation may publish revised and/or new versions

+of the General Public License from time to time.  Such new versions will

+be similar in spirit to the present version, but may differ in detail to

+address new problems or concerns.

+

+Each version is given a distinguishing version number.  If the Program

+specifies a version number of this License which applies to it and "any

+later version", you have the option of following the terms and conditions

+either of that version or of any later version published by the Free

+Software Foundation.  If the Program does not specify a version number of

+this License, you may choose any version ever published by the Free Software

+Foundation.

+

+  10. If you wish to incorporate parts of the Program into other free

+programs whose distribution conditions are different, write to the author

+to ask for permission.  For software which is copyrighted by the Free

+Software Foundation, write to the Free Software Foundation; we sometimes

+make exceptions for this.  Our decision will be guided by the two goals

+of preserving the free status of all derivatives of our free software and

+of promoting the sharing and reuse of software generally.

+

+                            NO WARRANTY

+

+  11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY

+FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW.  EXCEPT WHEN

+OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES

+PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED

+OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF

+MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.  THE ENTIRE RISK AS

+TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU.  SHOULD THE

+PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,

+REPAIR OR CORRECTION.

+

+  12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING

+WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR

+REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,

+INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING

+OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED

+TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY

+YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER

+PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE

+POSSIBILITY OF SUCH DAMAGES.

+

+                     END OF TERMS AND CONDITIONS

+

+            How to Apply These Terms to Your New Programs

+

+  If you develop a new program, and you want it to be of the greatest

+possible use to the public, the best way to achieve this is to make it

+free software which everyone can redistribute and change under these terms.

+

+  To do so, attach the following notices to the program.  It is safest

+to attach them to the start of each source file to most effectively

+convey the exclusion of warranty; and each file should have at least

+the "copyright" line and a pointer to where the full notice is found.

+

+    <one line to give the program's name and a brief idea of what it does.>

+    Copyright (C) <year>  <name of author>

+

+    This program is free software; you can redistribute it and/or modify

+    it under the terms of the GNU General Public License as published by

+    the Free Software Foundation; either version 2 of the License, or

+    (at your option) any later version.

+

+    This program is distributed in the hope that it will be useful,

+    but WITHOUT ANY WARRANTY; without even the implied warranty of

+    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the

+    GNU General Public License for more details.

+

+    You should have received a copy of the GNU General Public License along

+    with this program; if not, write to the Free Software Foundation, Inc.,

+    51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.

+

+Also add information on how to contact you by electronic and paper mail.

+

+If the program is interactive, make it output a short notice like this

+when it starts in an interactive mode:

+

+    Gnomovision version 69, Copyright (C) year name of author

+    Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.

+    This is free software, and you are welcome to redistribute it

+    under certain conditions; type `show c' for details.

+

+The hypothetical commands `show w' and `show c' should show the appropriate

+parts of the General Public License.  Of course, the commands you use may

+be called something other than `show w' and `show c'; they could even be

+mouse-clicks or menu items--whatever suits your program.

+

+You should also get your employer (if you work as a programmer) or your

+school, if any, to sign a "copyright disclaimer" for the program, if

+necessary.  Here is a sample; alter the names:

+

+  Yoyodyne, Inc., hereby disclaims all copyright interest in the program

+  `Gnomovision' (which makes passes at compilers) written by James Hacker.

+

+  <signature of Ty Coon>, 1 April 1989

+  Ty Coon, President of Vice

+

+This General Public License does not permit incorporating your program into

+proprietary programs.  If your program is a subroutine library, you may

+consider it more useful to permit linking proprietary applications with the

+library.  If this is what you want to do, use the GNU Lesser General

+Public License instead of this License.

+

diff --git a/FreeRTOS-Plus/Source/Reliance-Edge/README.md b/FreeRTOS-Plus/Source/Reliance-Edge/README.md
new file mode 100644
index 0000000..aaff784
--- /dev/null
+++ b/FreeRTOS-Plus/Source/Reliance-Edge/README.md
@@ -0,0 +1,115 @@
+# Reliance Edge

+

+Reliance Edge is a small, portable, highly reliable power-fail safe file system

+for resource-constrained embedded systems like microcontrollers.  It is written

+in C and provides a familiar POSIX-like file system API, making it easy to use

+in your application; or an alternate minimalist API if your application has

+simple storage needs.  Reliance Edge is highly configurable and can be tuned to

+the precise needs of your application.

+

+## Documentation

+

+The complete documentation for Reliance Edge is distributed separately.  It

+includes an API reference and detailed discussions of various aspects of using

+Reliance Edge, including porting, building, configuring, and testing.  This

+complete documentation, called the _Developer's Guide_, can be obtained for free

+from here:

+

+<http://www.datalight.com/reliance-edge>

+

+In addition this README, see [doc/release_notes.md](doc/release_notes.md) for a

+list of updates to Reliance Edge and a list of known issues.  There is also a

+quick-start guide in the doc/ directory that describes step-by-step how to

+compile and run Reliance Edge in a simulated Windows environment.

+

+## Why Use Reliance Edge?

+

+Reliance Edge is ideal for small embedded systems with data storage

+requirements, especially if there is a chance of sudden power loss or other

+system failures.  Compared to "raw" disk access, using a file system like

+Reliance Edge removes the burden of tracking which sectors belong to which

+objects, and allows data to be updated more reliably.  Compared to the FAT file

+system, using Reliance Edge eliminates the possibility that file system data

+will be left in an inconsistent state, corrupting the disk; Reliance Edge does

+not need a fsck/CHKDSK utility.  Compared to journaling file systems, Reliance

+Edge has less overhead and results in less storage media wear for longer device

+lifetimes.

+

+Reliance Edge uses a unique transactional model that not only prevents file

+system corruption but also allows a set of changes to be made in an atomic "all

+or nothing" fashion.  This is very useful for applications that make sets of

+interrelated changes.  By using the features of Reliance Edge, a set of changes

+can be incorporated into a single atomic transaction, which is committed in its

+entirety or not at all even if interrupted by power loss; this means the

+application does not need code to recover from partially-finished updates.

+

+## Hardware

+

+The typical hardware for Reliance Edge is a 32-bit microcontroller, but other

+targets are possible.  In its typical configurations, Reliance Edge needs at

+least 4 KB to 5 KB of RAM, 11 to 18 KB of code space (on the ROM or NOR flash),

+and 500 to 700 bytes of stack.

+

+Reliance Edge is not designed for high-end embedded systems that run complicated

+operating systems like Linux or Windows Embedded Compact.  Embedded systems of

+that variety are better served by other file systems, like Datalight's

+[Reliance Nitro](http://www.datalight.com/products/embedded-file-systems/reliance-nitro).

+

+## Getting Reliance Edge Working

+

+Before you can use Reliance Edge, it must be ported and configured.  At a

+minimum, porting includes filling-in functions so that Reliance Edge can issue

+commands to your storage medium; depending on your needs, other functions may

+need to be filled in as well.  These functions reside in a subdirectory in the

+os/ directory; see os/stub/ for a blank set of functions.  Configuring includes

+creating a project directory (start by copying projects/newproj) and creating

+the two configuration files (redconf.h/redconf.c) using the Reliance Edge

+Configuration Utility (which can be downloaded from

+<http://www.datalight.com/reliance-edge>).

+

+These topics are covered in much greater detail in the _Developer's Guide_,

+linked above.

+

+## Using Reliance Edge

+

+Using Reliance Edge is a simple matter of including the primary Reliance Edge

+application header in your application (either include/redposix.h or

+include/redfse.h) and compiling and linking against Reliance Edge binaries.

+The Reliance Edge driver must be initialized before it is used (via the

+red\_init() or RedFseInit() functions) and then volumes can be mounted and file

+and directory functions invoked.  The Reliance Edge API is documented in the

+_Developer's Guide_ (linked above) and also via comments in the source code.

+

+## Licensing

+

+Reliance Edge is an open-source project licensed under the GNU General Public

+License v2 (GPLv2).  Businesses and individuals that for commercial or other

+reasons cannot comply with the terms of the GPLv2 license may obtain a

+commercial license before incorporating Reliance Edge into proprietary software

+for distribution in any form.  Visit <http://www.datalight.com/reliance-edge>

+for more information.  The commercial distribution also includes extra tests and

+tools not distributed with the GPLv2 version.

+

+See LICENSE.txt for the full license terms of this distribution of the product.

+

+## Getting Help

+

+If you need assistance using Reliance Edge, and you have already consulted the

+_Developer's Guide_, contact <RelianceEdgeSupport@datalight.com>.

+

+In the near future, a community forum or message board will be set up to

+facilitate discussion of Reliance Edge and allow users to get help from

+Datalight and from each other.  In the meantime, please use the email address

+given above.

+

+## Contributing

+

+Contributions to Reliance Edge are welcome.  Our policy is that Datalight must

+own the copyright of all code incorporated into Reliance Edge; if contributing a

+significant amount of code, you will be asked to file a copyright assignment

+agreement.  See CONTRIBUTING.txt for further details and contribution

+guidelines.

+

+To report bugs, please create a GitHub issue or contact

+<RelianceEdgeSupport@datalight.com>.

+

diff --git a/FreeRTOS-Plus/Source/Reliance-Edge/README.txt b/FreeRTOS-Plus/Source/Reliance-Edge/README.txt
new file mode 100644
index 0000000..1199093
--- /dev/null
+++ b/FreeRTOS-Plus/Source/Reliance-Edge/README.txt
@@ -0,0 +1,131 @@
+

+

+RELIANCE EDGE

+

+

+Reliance Edge is a small, portable, highly reliable power-fail safe file

+system for resource-constrained embedded systems like microcontrollers.

+It is written in C and provides a familiar POSIX-like file system API,

+making it easy to use in your application; or an alternate minimalist

+API if your application has simple storage needs. Reliance Edge is

+highly configurable and can be tuned to the precise needs of your

+application.

+

+

+Documentation

+

+The complete documentation for Reliance Edge is distributed separately.

+It includes an API reference and detailed discussions of various aspects

+of using Reliance Edge, including porting, building, configuring, and

+testing. This complete documentation, called the _Developer's Guide_,

+can be obtained for free from here:

+

+http://www.datalight.com/reliance-edge

+

+In addition this README, see doc/release_notes.md for a list of updates

+to Reliance Edge and a list of known issues. There is also a quick-start

+guide in the doc/ directory that describes step-by-step how to compile

+and run Reliance Edge in a simulated Windows environment.

+

+

+Why Use Reliance Edge?

+

+Reliance Edge is ideal for small embedded systems with data storage

+requirements, especially if there is a chance of sudden power loss or

+other system failures. Compared to "raw" disk access, using a file

+system like Reliance Edge removes the burden of tracking which sectors

+belong to which objects, and allows data to be updated more reliably.

+Compared to the FAT file system, using Reliance Edge eliminates the

+possibility that file system data will be left in an inconsistent state,

+corrupting the disk; Reliance Edge does not need a fsck/CHKDSK utility.

+Compared to journaling file systems, Reliance Edge has less overhead and

+results in less storage media wear for longer device lifetimes.

+

+Reliance Edge uses a unique transactional model that not only prevents

+file system corruption but also allows a set of changes to be made in an

+atomic "all or nothing" fashion. This is very useful for applications

+that make sets of interrelated changes. By using the features of

+Reliance Edge, a set of changes can be incorporated into a single atomic

+transaction, which is committed in its entirety or not at all even if

+interrupted by power loss; this means the application does not need code

+to recover from partially-finished updates.

+

+

+Hardware

+

+The typical hardware for Reliance Edge is a 32-bit microcontroller, but

+other targets are possible. In its typical configurations, Reliance Edge

+needs at least 4 KB to 5 KB of RAM, 11 to 18 KB of code space (on the

+ROM or NOR flash), and 500 to 700 bytes of stack.

+

+Reliance Edge is not designed for high-end embedded systems that run

+complicated operating systems like Linux or Windows Embedded Compact.

+Embedded systems of that variety are better served by other file

+systems, like Datalight's Reliance Nitro.

+

+

+Getting Reliance Edge Working

+

+Before you can use Reliance Edge, it must be ported and configured. At a

+minimum, porting includes filling-in functions so that Reliance Edge can

+issue commands to your storage medium; depending on your needs, other

+functions may need to be filled in as well. These functions reside in a

+subdirectory in the os/ directory; see os/stub/ for a blank set of

+functions. Configuring includes creating a project directory (start by

+copying projects/newproj) and creating the two configuration files

+(redconf.h/redconf.c) using the Reliance Edge Configuration Utility

+(which can be downloaded from http://www.datalight.com/reliance-edge).

+

+These topics are covered in much greater detail in the _Developer's

+Guide_, linked above.

+

+

+Using Reliance Edge

+

+Using Reliance Edge is a simple matter of including the primary Reliance

+Edge application header in your application (either include/redposix.h

+or include/redfse.h) and compiling and linking against Reliance Edge

+binaries. The Reliance Edge driver must be initialized before it is used

+(via the red_init() or RedFseInit() functions) and then volumes can be

+mounted and file and directory functions invoked. The Reliance Edge API

+is documented in the _Developer's Guide_ (linked above) and also via

+comments in the source code.

+

+

+Licensing

+

+Reliance Edge is an open-source project licensed under the GNU General

+Public License v2 (GPLv2). Businesses and individuals that for

+commercial or other reasons cannot comply with the terms of the GPLv2

+license may obtain a commercial license before incorporating Reliance

+Edge into proprietary software for distribution in any form. Visit

+http://www.datalight.com/reliance-edge for more information. The

+commercial distribution also includes extra tests and tools not

+distributed with the GPLv2 version.

+

+See LICENSE.txt for the full license terms of this distribution of the

+product.

+

+

+Getting Help

+

+If you need assistance using Reliance Edge, and you have already

+consulted the _Developer's Guide_, contact

+RelianceEdgeSupport@datalight.com.

+

+In the near future, a community forum or message board will be set up to

+facilitate discussion of Reliance Edge and allow users to get help from

+Datalight and from each other. In the meantime, please use the email

+address given above.

+

+

+Contributing

+

+Contributions to Reliance Edge are welcome. Our policy is that Datalight

+must own the copyright of all code incorporated into Reliance Edge; if

+contributing a significant amount of code, you will be asked to file a

+copyright assignment agreement. See CONTRIBUTING.txt for further details

+and contribution guidelines.

+

+To report bugs, please create a GitHub issue or contact

+RelianceEdgeSupport@datalight.com.

diff --git a/FreeRTOS-Plus/Source/Reliance-Edge/core/driver/blockio.c b/FreeRTOS-Plus/Source/Reliance-Edge/core/driver/blockio.c
new file mode 100644
index 0000000..d815ca8
--- /dev/null
+++ b/FreeRTOS-Plus/Source/Reliance-Edge/core/driver/blockio.c
@@ -0,0 +1,164 @@
+/*             ----> DO NOT REMOVE THE FOLLOWING NOTICE <----

+

+                   Copyright (c) 2014-2015 Datalight, Inc.

+                       All Rights Reserved Worldwide.

+

+    This program is free software; you can redistribute it and/or modify

+    it under the terms of the GNU General Public License as published by

+    the Free Software Foundation; use version 2 of the License.

+

+    This program is distributed in the hope that it will be useful,

+    but "AS-IS," WITHOUT ANY WARRANTY; without even the implied warranty

+    of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the

+    GNU General Public License for more details.

+

+    You should have received a copy of the GNU General Public License along

+    with this program; if not, write to the Free Software Foundation, Inc.,

+    51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.

+*/

+/*  Businesses and individuals that for commercial or other reasons cannot

+    comply with the terms of the GPLv2 license may obtain a commercial license

+    before incorporating Reliance Edge into proprietary software for

+    distribution in any form.  Visit http://www.datalight.com/reliance-edge for

+    more information.

+*/

+/** @file

+    @brief Implements block device I/O using logical blocks as the units.

+

+    The OS block device implementations operate on sectors.  The core does I/O

+    in terms of logical blocks: this module translates from logical blocks to

+    sectors.

+*/

+#include <redfs.h>

+#include <redcore.h>

+

+

+/** @brief Read a range of logical blocks.

+

+    @param bVolNum      The volume whose block device is being read from.

+    @param ulBlockStart The first block to read.

+    @param ulBlockCount The number of blocks to read.

+    @param pBuffer      The buffer to populate with the data read.

+

+    @return A negated ::REDSTATUS code indicating the operation result.

+

+    @retval 0           Operation was successful.

+    @retval -RED_EIO    A disk I/O error occurred.

+    @retval -RED_EINVAL Invalid parameters.

+*/

+REDSTATUS RedIoRead(

+    uint8_t     bVolNum,

+    uint32_t    ulBlockStart,

+    uint32_t    ulBlockCount,

+    void       *pBuffer)

+{

+    REDSTATUS   ret;

+

+    if(    (bVolNum >= REDCONF_VOLUME_COUNT)

+        || (ulBlockStart >= gaRedVolume[bVolNum].ulBlockCount)

+        || ((gaRedVolume[bVolNum].ulBlockCount - ulBlockStart) < ulBlockCount)

+        || (ulBlockCount == 0U)

+        || (pBuffer == NULL))

+    {

+        REDERROR();

+        ret = -RED_EINVAL;

+    }

+    else

+    {

+        uint8_t  bSectorShift = gaRedVolume[bVolNum].bBlockSectorShift;

+        uint64_t ullSectorStart = (uint64_t)ulBlockStart << bSectorShift;

+        uint32_t ulSectorCount = ulBlockCount << bSectorShift;

+

+        REDASSERT(bSectorShift < 32U);

+        REDASSERT((ulSectorCount >> bSectorShift) == ulBlockCount);

+

+        ret = RedOsBDevRead(bVolNum, ullSectorStart, ulSectorCount, pBuffer);

+    }

+

+    CRITICAL_ASSERT(ret == 0);

+

+    return ret;

+}

+

+

+#if REDCONF_READ_ONLY == 0

+/** @brief Write a range of logical blocks.

+

+    @param bVolNum      The volume whose block device is being written to.

+    @param ulBlockStart The first block to write.

+    @param ulBlockCount The number of blocks to write.

+    @param pBuffer      The buffer containing the data to write.

+

+    @return A negated ::REDSTATUS code indicating the operation result.

+

+    @retval 0           Operation was successful.

+    @retval -RED_EIO    A disk I/O error occurred.

+    @retval -RED_EINVAL Invalid parameters.

+*/

+REDSTATUS RedIoWrite(

+    uint8_t     bVolNum,

+    uint32_t    ulBlockStart,

+    uint32_t    ulBlockCount,

+    const void *pBuffer)

+{

+    REDSTATUS   ret;

+

+    if(    (bVolNum >= REDCONF_VOLUME_COUNT)

+        || (ulBlockStart >= gaRedVolume[bVolNum].ulBlockCount)

+        || ((gaRedVolume[bVolNum].ulBlockCount - ulBlockStart) < ulBlockCount)

+        || (ulBlockCount == 0U)

+        || (pBuffer == NULL))

+    {

+        REDERROR();

+        ret = -RED_EINVAL;

+    }

+    else

+    {

+        uint8_t  bSectorShift = gaRedVolume[bVolNum].bBlockSectorShift;

+        uint64_t ullSectorStart = (uint64_t)ulBlockStart << bSectorShift;

+        uint32_t ulSectorCount = ulBlockCount << bSectorShift;

+

+        REDASSERT(bSectorShift < 32U);

+        REDASSERT((ulSectorCount >> bSectorShift) == ulBlockCount);

+

+        ret = RedOsBDevWrite(bVolNum, ullSectorStart, ulSectorCount, pBuffer);

+    }

+

+    CRITICAL_ASSERT(ret == 0);

+

+    return ret;

+}

+

+

+/** @brief Flush any caches beneath the file system.

+

+    @param bVolNum  The volume number of the volume whose block device is being

+                    flushed.

+

+    @return A negated ::REDSTATUS code indicating the operation result.

+

+    @retval 0           Operation was successful.

+    @retval -RED_EINVAL @p bVolNum is an invalid volume number.

+    @retval -RED_EIO    A disk I/O error occurred.

+*/

+REDSTATUS RedIoFlush(

+    uint8_t     bVolNum)

+{

+    REDSTATUS   ret;

+

+    if(bVolNum >= REDCONF_VOLUME_COUNT)

+    {

+        REDERROR();

+        ret = -RED_EINVAL;

+    }

+    else

+    {

+        ret = RedOsBDevFlush(bVolNum);

+    }

+

+    CRITICAL_ASSERT(ret == 0);

+

+    return ret;

+}

+#endif /* REDCONF_READ_ONLY == 0 */

+

diff --git a/FreeRTOS-Plus/Source/Reliance-Edge/core/driver/buffer.c b/FreeRTOS-Plus/Source/Reliance-Edge/core/driver/buffer.c
new file mode 100644
index 0000000..b1cfea2
--- /dev/null
+++ b/FreeRTOS-Plus/Source/Reliance-Edge/core/driver/buffer.c
@@ -0,0 +1,1212 @@
+/*             ----> DO NOT REMOVE THE FOLLOWING NOTICE <----

+

+                   Copyright (c) 2014-2015 Datalight, Inc.

+                       All Rights Reserved Worldwide.

+

+    This program is free software; you can redistribute it and/or modify

+    it under the terms of the GNU General Public License as published by

+    the Free Software Foundation; use version 2 of the License.

+

+    This program is distributed in the hope that it will be useful,

+    but "AS-IS," WITHOUT ANY WARRANTY; without even the implied warranty

+    of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the

+    GNU General Public License for more details.

+

+    You should have received a copy of the GNU General Public License along

+    with this program; if not, write to the Free Software Foundation, Inc.,

+    51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.

+*/

+/*  Businesses and individuals that for commercial or other reasons cannot

+    comply with the terms of the GPLv2 license may obtain a commercial license

+    before incorporating Reliance Edge into proprietary software for

+    distribution in any form.  Visit http://www.datalight.com/reliance-edge for

+    more information.

+*/

+/** @file

+    @brief Implements the block device buffering system.

+

+    This module implements the block buffer cache.  It has a number of block

+    sized buffers which are used to store data from a given block (identified

+    by both block number and volume number: this cache is shared among all

+    volumes).  Block buffers may be either dirty or clean.  Most I/O passes

+    through this module.  When a buffer is needed for a block which is not in

+    the cache, a "victim" is selected via a simple LRU scheme.

+*/

+#include <redfs.h>

+#include <redcore.h>

+

+

+#if DINDIR_POINTERS > 0U

+  #define INODE_META_BUFFERS 3U /* Inode, double indirect, indirect */

+#elif REDCONF_INDIRECT_POINTERS > 0U

+  #define INODE_META_BUFFERS 2U /* Inode, indirect */

+#elif REDCONF_DIRECT_POINTERS == INODE_ENTRIES

+  #define INODE_META_BUFFERS 1U /* Inode only */

+#endif

+

+#define INODE_BUFFERS (INODE_META_BUFFERS + 1U) /* Add data buffer */

+

+#if REDCONF_IMAP_EXTERNAL == 1

+  #define IMAP_BUFFERS 1U

+#else

+  #define IMAP_BUFFERS 0U

+#endif

+

+#if (REDCONF_READ_ONLY == 1) || (REDCONF_API_FSE == 1)

+  /*  Read, write, truncate, lookup: One inode all the way down, plus imap.

+  */

+  #define MINIMUM_BUFFER_COUNT (INODE_BUFFERS + IMAP_BUFFERS)

+#elif REDCONF_API_POSIX == 1

+  #if REDCONF_API_POSIX_RENAME == 1

+    #if REDCONF_RENAME_ATOMIC == 1

+      /*  Two parent directories all the way down.  Source and destination inode

+          buffer.  One inode buffer for cyclic rename detection.  Imap.  The

+          parent inode buffers are released before deleting the destination

+          inode, so that does not increase the minimum.

+      */

+      #define MINIMUM_BUFFER_COUNT (INODE_BUFFERS + INODE_BUFFERS + 3U + IMAP_BUFFERS)

+    #else

+      /*  Two parent directories all the way down.  Source inode buffer.  One

+          inode buffer for cyclic rename detection.  Imap.

+      */

+      #define MINIMUM_BUFFER_COUNT (INODE_BUFFERS + INODE_BUFFERS + 2U + IMAP_BUFFERS)

+    #endif

+  #else

+    /*  Link/create: Needs a parent inode all the way down, an extra inode

+        buffer, and an imap buffer.

+

+        Unlink is the same, since the parent inode buffers are released before

+        the inode is deleted.

+    */

+    #define MINIMUM_BUFFER_COUNT (INODE_BUFFERS + 1U + IMAP_BUFFERS)

+  #endif

+#endif

+

+#if REDCONF_BUFFER_COUNT < MINIMUM_BUFFER_COUNT

+#error "REDCONF_BUFFER_COUNT is too low for the configuration"

+#endif

+

+

+/*  A note on the typecasts in the below macros: Operands to bitwise operators

+    are subject to the "usual arithmetic conversions".  This means that the

+    flags, which have uint16_t values, are promoted to int.  MISRA-C:2012 R10.1

+    forbids using signed integers in bitwise operations, so we cast to uint32_t

+    to avoid the integer promotion, then back to uint16_t to reflect the actual

+    type.

+*/

+#define BFLAG_META_MASK (uint16_t)((uint32_t)BFLAG_META_MASTER | BFLAG_META_IMAP | BFLAG_META_INODE | BFLAG_META_INDIR | BFLAG_META_DINDIR)

+#define BFLAG_MASK (uint16_t)((uint32_t)BFLAG_DIRTY | BFLAG_NEW | BFLAG_META_MASK)

+

+

+/*  An invalid block number.  Used to indicate buffers which are not currently

+    in use.

+*/

+#define BBLK_INVALID UINT32_MAX

+

+

+/** @brief Metadata stored for each block buffer.

+

+    To make better use of CPU caching when searching the BUFFERHEAD array, this

+    structure should be kept small.

+*/

+typedef struct

+{

+    uint32_t    ulBlock;    /**< Block number the buffer is associated with; BBLK_INVALID if unused. */

+    uint8_t     bVolNum;    /**< Volume the block resides on. */

+    uint8_t     bRefCount;  /**< Number of references. */

+    uint16_t    uFlags;     /**< Buffer flags: mask of BFLAG_* values. */

+} BUFFERHEAD;

+

+

+/** @brief State information for the block buffer module.

+*/

+typedef struct

+{

+    /** Number of buffers which are referenced (have a bRefCount > 0).

+    */

+    uint16_t    uNumUsed;

+

+    /** MRU array.  Each element of the array stores a buffer index; each buffer

+        index appears in the array once and only once.  The first element of the

+        array is the most-recently-used (MRU) buffer, followed by the next most

+        recently used, and so on, till the last element, which is the least-

+        recently-used (LRU) buffer.

+    */

+    uint8_t     abMRU[REDCONF_BUFFER_COUNT];

+

+    /** Buffer heads, storing metadata for each buffer.

+    */

+    BUFFERHEAD  aHead[REDCONF_BUFFER_COUNT];

+

+    /** Array of memory for the block buffers themselves.

+

+        Force 64-bit alignment of the aabBuffer array to ensure that it is safe

+        to cast buffer pointers to node structure pointers.

+    */

+    ALIGNED_2D_BYTE_ARRAY(b, aabBuffer, REDCONF_BUFFER_COUNT, REDCONF_BLOCK_SIZE);

+} BUFFERCTX;

+

+

+static bool BufferIsValid(const uint8_t  *pbBuffer, uint16_t uFlags);

+static bool BufferToIdx(const void *pBuffer, uint8_t *pbIdx);

+#if REDCONF_READ_ONLY == 0

+static REDSTATUS BufferWrite(uint8_t bIdx);

+static REDSTATUS BufferFinalize(uint8_t *pbBuffer, uint16_t uFlags);

+#endif

+static void BufferMakeLRU(uint8_t bIdx);

+static void BufferMakeMRU(uint8_t bIdx);

+static bool BufferFind(uint32_t ulBlock, uint8_t *pbIdx);

+

+#ifdef REDCONF_ENDIAN_SWAP

+static void BufferEndianSwap(const void *pBuffer, uint16_t uFlags);

+static void BufferEndianSwapHeader(NODEHEADER *pHeader);

+static void BufferEndianSwapMaster(MASTERBLOCK *pMaster);

+static void BufferEndianSwapMetaRoot(METAROOT *pMetaRoot);

+static void BufferEndianSwapInode(INODE *pInode);

+static void BufferEndianSwapIndir(INDIR *pIndir);

+#endif

+

+

+static BUFFERCTX gBufCtx;

+

+

+/** @brief Initialize the buffers.

+*/

+void RedBufferInit(void)

+{

+    uint8_t bIdx;

+

+    RedMemSet(&gBufCtx, 0U, sizeof(gBufCtx));

+

+    for(bIdx = 0U; bIdx < REDCONF_BUFFER_COUNT; bIdx++)

+    {

+        /*  When the buffers have been freshly initialized, acquire the buffers

+            in the order in which they appear in the array.

+        */

+        gBufCtx.abMRU[bIdx] = (uint8_t)((REDCONF_BUFFER_COUNT - bIdx) - 1U);

+        gBufCtx.aHead[bIdx].ulBlock = BBLK_INVALID;

+    }

+}

+

+

+/** @brief Acquire a buffer.

+

+    @param ulBlock  Block number to acquire.

+    @param uFlags   BFLAG_ values for the operation.

+    @param ppBuffer On success, populated with the acquired buffer.

+

+    @return A negated ::REDSTATUS code indicating the operation result.

+

+    @retval 0           Operation was successful.

+    @retval -RED_EIO    A disk I/O error occurred.

+    @retval -RED_EINVAL Invalid parameters.

+    @retval -RED_EBUSY  All buffers are referenced.

+*/

+REDSTATUS RedBufferGet(

+    uint32_t    ulBlock,

+    uint16_t    uFlags,

+    void      **ppBuffer)

+{

+    REDSTATUS   ret = 0;

+    uint8_t     bIdx;

+

+    if((ulBlock >= gpRedVolume->ulBlockCount) || ((uFlags & BFLAG_MASK) != uFlags) || (ppBuffer == NULL))

+    {

+        REDERROR();

+        ret = -RED_EINVAL;

+    }

+    else

+    {

+        if(BufferFind(ulBlock, &bIdx))

+        {

+            /*  Error if the buffer exists and BFLAG_NEW was specified, since

+                the new flag is used when a block is newly allocated/created, so

+                the block was previously free and and there should never be an

+                existing buffer for a free block.

+

+                Error if the buffer exists but does not have the same type as

+                was requested.

+            */

+            if(    ((uFlags & BFLAG_NEW) != 0U)

+                || ((uFlags & BFLAG_META_MASK) != (gBufCtx.aHead[bIdx].uFlags & BFLAG_META_MASK)))

+            {

+                CRITICAL_ERROR();

+                ret = -RED_EFUBAR;

+            }

+        }

+        else if(gBufCtx.uNumUsed == REDCONF_BUFFER_COUNT)

+        {

+            /*  The MINIMUM_BUFFER_COUNT is supposed to ensure that no operation

+                ever runs out of buffers, so this should never happen.

+            */

+            CRITICAL_ERROR();

+            ret = -RED_EBUSY;

+        }

+        else

+        {

+            BUFFERHEAD *pHead;

+

+            /*  Search for the least recently used buffer which is not

+                referenced.

+            */

+            for(bIdx = (uint8_t)(REDCONF_BUFFER_COUNT - 1U); bIdx > 0U; bIdx--)

+            {

+                if(gBufCtx.aHead[gBufCtx.abMRU[bIdx]].bRefCount == 0U)

+                {

+                    break;

+                }

+            }

+

+            bIdx = gBufCtx.abMRU[bIdx];

+            pHead = &gBufCtx.aHead[bIdx];

+

+            if(pHead->bRefCount == 0U)

+            {

+                /*  If the LRU buffer is valid and dirty, write it out before

+                    repurposing it.

+                */

+                if(((pHead->uFlags & BFLAG_DIRTY) != 0U) && (pHead->ulBlock != BBLK_INVALID))

+                {

+                  #if REDCONF_READ_ONLY == 1

+                    CRITICAL_ERROR();

+                    ret = -RED_EFUBAR;

+                  #else

+                    ret = BufferWrite(bIdx);

+                  #endif

+                }

+            }

+            else

+            {

+                /*  All the buffers are used, which should have been caught by

+                    checking gBufCtx.uNumUsed.

+                */

+                CRITICAL_ERROR();

+                ret = -RED_EBUSY;

+            }

+

+            if(ret == 0)

+            {

+                if((uFlags & BFLAG_NEW) == 0U)

+                {

+                    /*  Invalidate the LRU buffer.  If the read fails, we do not

+                        want the buffer head to continue to refer to the old

+                        block number, since the read, even if it fails, may have

+                        partially overwritten the buffer data (consider the case

+                        where block size exceeds sector size, and some but not

+                        all of the sectors are read successfully), and if the

+                        buffer were to be used subsequently with its partially

+                        erroneous contents, bad things could happen.

+                    */

+                    pHead->ulBlock = BBLK_INVALID;

+

+                    ret = RedIoRead(gbRedVolNum, ulBlock, 1U, gBufCtx.b.aabBuffer[bIdx]);

+

+                    if((ret == 0) && ((uFlags & BFLAG_META) != 0U))

+                    {

+                        if(!BufferIsValid(gBufCtx.b.aabBuffer[bIdx], uFlags))

+                        {

+                            /*  A corrupt metadata node is usually a critical

+                                error.  The master block is an exception since

+                                it might be invalid because the volume is not

+                                mounted; that condition is expected and should

+                                not result in an assertion.

+                            */

+                            CRITICAL_ASSERT((uFlags & BFLAG_META_MASTER) != 0U);

+                            ret = -RED_EIO;

+                        }

+                    }

+

+                  #ifdef REDCONF_ENDIAN_SWAP

+                    if(ret == 0)

+                    {

+                        BufferEndianSwap(gBufCtx.b.aabBuffer[bIdx], uFlags);

+                    }

+                  #endif

+                }

+                else

+                {

+                    RedMemSet(gBufCtx.b.aabBuffer[bIdx], 0U, REDCONF_BLOCK_SIZE);

+                }

+            }

+

+            if(ret == 0)

+            {

+                pHead->bVolNum = gbRedVolNum;

+                pHead->ulBlock = ulBlock;

+                pHead->uFlags = 0U;

+            }

+        }

+

+        /*  Reference the buffer, update its flags, and promote it to MRU.  This

+            happens both when BufferFind() found an existing buffer for the

+            block and when the LRU buffer was repurposed to create a buffer for

+            the block.

+        */

+        if(ret == 0)

+        {

+            BUFFERHEAD *pHead = &gBufCtx.aHead[bIdx];

+

+            pHead->bRefCount++;

+

+            if(pHead->bRefCount == 1U)

+            {

+                gBufCtx.uNumUsed++;

+            }

+

+            /*  BFLAG_NEW tells this function to zero the buffer instead of

+                reading it from disk; it has no meaning later on, and thus is

+                not saved.

+            */

+            pHead->uFlags |= (uFlags & (~BFLAG_NEW));

+

+            BufferMakeMRU(bIdx);

+

+            *ppBuffer = gBufCtx.b.aabBuffer[bIdx];

+        }

+    }

+

+    return ret;

+}

+

+

+/** @brief Release a buffer.

+

+    @param pBuffer  The buffer to release.

+ */

+void RedBufferPut(

+    const void *pBuffer)

+{

+    uint8_t     bIdx;

+

+    if(!BufferToIdx(pBuffer, &bIdx))

+    {

+        REDERROR();

+    }

+    else

+    {

+        REDASSERT(gBufCtx.aHead[bIdx].bRefCount > 0U);

+        gBufCtx.aHead[bIdx].bRefCount--;

+

+        if(gBufCtx.aHead[bIdx].bRefCount == 0U)

+        {

+            REDASSERT(gBufCtx.uNumUsed > 0U);

+            gBufCtx.uNumUsed--;

+        }

+    }

+}

+

+

+#if REDCONF_READ_ONLY == 0

+/** @brief Flush all buffers for the active volume in the given range of blocks.

+

+    @param ulBlockStart Starting block number to flush.

+    @param ulBlockCount Count of blocks, starting at @p ulBlockStart, to flush.

+                        Must not be zero.

+

+    @return A negated ::REDSTATUS code indicating the operation result.

+

+    @retval 0           Operation was successful.

+    @retval -RED_EIO    A disk I/O error occurred.

+    @retval -RED_EINVAL Invalid parameters.

+*/

+REDSTATUS RedBufferFlush(

+    uint32_t    ulBlockStart,

+    uint32_t    ulBlockCount)

+{

+    REDSTATUS   ret = 0;

+

+    if(    (ulBlockStart >= gpRedVolume->ulBlockCount)

+        || ((gpRedVolume->ulBlockCount - ulBlockStart) < ulBlockCount)

+        || (ulBlockCount == 0U))

+    {

+        REDERROR();

+        ret = -RED_EINVAL;

+    }

+    else

+    {

+        uint8_t bIdx;

+

+        for(bIdx = 0U; bIdx < REDCONF_BUFFER_COUNT; bIdx++)

+        {

+            BUFFERHEAD *pHead = &gBufCtx.aHead[bIdx];

+

+            if(    (pHead->bVolNum == gbRedVolNum)

+                && (pHead->ulBlock != BBLK_INVALID)

+                && ((pHead->uFlags & BFLAG_DIRTY) != 0U)

+                && (pHead->ulBlock >= ulBlockStart)

+                && (pHead->ulBlock < (ulBlockStart + ulBlockCount)))

+            {

+                ret = BufferWrite(bIdx);

+

+                if(ret == 0)

+                {

+                    pHead->uFlags &= (~BFLAG_DIRTY);

+                }

+                else

+                {

+                    break;

+                }

+            }

+        }

+    }

+

+    return ret;

+}

+

+

+/** @brief Mark a buffer dirty

+

+    @param pBuffer  The buffer to mark dirty.

+*/

+void RedBufferDirty(

+    const void *pBuffer)

+{

+    uint8_t     bIdx;

+

+    if(!BufferToIdx(pBuffer, &bIdx))

+    {

+        REDERROR();

+    }

+    else

+    {

+        REDASSERT(gBufCtx.aHead[bIdx].bRefCount > 0U);

+

+        gBufCtx.aHead[bIdx].uFlags |= BFLAG_DIRTY;

+    }

+}

+

+

+/** @brief Branch a buffer, marking it dirty and assigning a new block number.

+

+    @param pBuffer      The buffer to branch.

+    @param ulBlockNew   The new block number for the buffer.

+*/

+void RedBufferBranch(

+    const void *pBuffer,

+    uint32_t    ulBlockNew)

+{

+    uint8_t     bIdx;

+

+    if(    !BufferToIdx(pBuffer, &bIdx)

+        || (ulBlockNew >= gpRedVolume->ulBlockCount))

+    {

+        REDERROR();

+    }

+    else

+    {

+        BUFFERHEAD *pHead = &gBufCtx.aHead[bIdx];

+

+        REDASSERT(pHead->bRefCount > 0U);

+        REDASSERT((pHead->uFlags & BFLAG_DIRTY) == 0U);

+

+        pHead->uFlags |= BFLAG_DIRTY;

+        pHead->ulBlock = ulBlockNew;

+    }

+}

+

+

+#if (REDCONF_API_POSIX == 1) || FORMAT_SUPPORTED

+/** @brief Discard a buffer, releasing it and marking it invalid.

+

+    @param pBuffer  The buffer to discard.

+*/

+void RedBufferDiscard(

+    const void *pBuffer)

+{

+    uint8_t     bIdx;

+

+    if(!BufferToIdx(pBuffer, &bIdx))

+    {

+        REDERROR();

+    }

+    else

+    {

+        REDASSERT(gBufCtx.aHead[bIdx].bRefCount == 1U);

+        REDASSERT(gBufCtx.uNumUsed > 0U);

+

+        gBufCtx.aHead[bIdx].bRefCount = 0U;

+        gBufCtx.aHead[bIdx].ulBlock = BBLK_INVALID;

+

+        gBufCtx.uNumUsed--;

+

+        BufferMakeLRU(bIdx);

+    }

+}

+#endif

+#endif /* REDCONF_READ_ONLY == 0 */

+

+

+/** @brief Discard a range of buffers, marking them invalid.

+

+    @param ulBlockStart The starting block number to discard

+    @param ulBlockCount The number of blocks, starting at @p ulBlockStart, to

+                        discard.  Must not be zero.

+

+    @return A negated ::REDSTATUS code indicating the operation result.

+

+    @retval 0           Operation was successful.

+    @retval -RED_EINVAL Invalid parameters.

+    @retval -RED_EBUSY  A block in the desired range is referenced.

+*/

+REDSTATUS RedBufferDiscardRange(

+    uint32_t    ulBlockStart,

+    uint32_t    ulBlockCount)

+{

+    REDSTATUS   ret = 0;

+

+    if(    (ulBlockStart >= gpRedVolume->ulBlockCount)

+        || ((gpRedVolume->ulBlockCount - ulBlockStart) < ulBlockCount)

+        || (ulBlockCount == 0U))

+    {

+        REDERROR();

+        ret = -RED_EINVAL;

+    }

+    else

+    {

+        uint8_t bIdx;

+

+        for(bIdx = 0U; bIdx < REDCONF_BUFFER_COUNT; bIdx++)

+        {

+            BUFFERHEAD *pHead = &gBufCtx.aHead[bIdx];

+

+            if(    (pHead->bVolNum == gbRedVolNum)

+                && (pHead->ulBlock != BBLK_INVALID)

+                && (pHead->ulBlock >= ulBlockStart)

+                && (pHead->ulBlock < (ulBlockStart + ulBlockCount)))

+            {

+                if(pHead->bRefCount == 0U)

+                {

+                    pHead->ulBlock = BBLK_INVALID;

+

+                    BufferMakeLRU(bIdx);

+                }

+                else

+                {

+                    /*  This should never happen.  There are three general cases

+                        when this function is used:

+

+                        1) Discarding every block, as happens during unmount

+                           and at the end of format.  There should no longer be

+                           any referenced buffers at those points.

+                        2) Discarding a block which has become free.  All

+                           buffers for such blocks should be put or branched

+                           beforehand.

+                        3) Discarding of blocks that were just written straight

+                           to disk, leaving stale data in the buffer.  The write

+                           code should never reference buffers for these blocks,

+                           since they would not be needed or used.

+                    */

+                    CRITICAL_ERROR();

+                    ret = -RED_EBUSY;

+                    break;

+                }

+            }

+        }

+    }

+

+    return ret;

+}

+

+

+/** Determine whether a metadata buffer is valid.

+

+    This includes checking its signature, CRC, and sequence number.

+

+    @param pbBuffer Pointer to the metadata buffer to validate.

+    @param uFlags   The buffer flags provided by the caller.  Used to determine

+                    the expected signature.

+

+    @return Whether the metadata buffer is valid.

+

+    @retval true    The metadata buffer is valid.

+    @retval false   The metadata buffer is invalid.

+*/

+static bool BufferIsValid(

+    const uint8_t  *pbBuffer,

+    uint16_t        uFlags)

+{

+    bool            fValid;

+

+    if((pbBuffer == NULL) || ((uFlags & BFLAG_MASK) != uFlags))

+    {

+        REDERROR();

+        fValid = false;

+    }

+    else

+    {

+        NODEHEADER  buf;

+        uint16_t    uMetaFlags = uFlags & BFLAG_META_MASK;

+

+        /*  Casting pbBuffer to (NODEHEADER *) would run afoul MISRA-C:2012

+            R11.3, so instead copy the fields out.

+        */

+        RedMemCpy(&buf.ulSignature, &pbBuffer[NODEHEADER_OFFSET_SIG], sizeof(buf.ulSignature));

+        RedMemCpy(&buf.ulCRC,       &pbBuffer[NODEHEADER_OFFSET_CRC], sizeof(buf.ulCRC));

+        RedMemCpy(&buf.ullSequence, &pbBuffer[NODEHEADER_OFFSET_SEQ], sizeof(buf.ullSequence));

+

+      #ifdef REDCONF_ENDIAN_SWAP

+        buf.ulCRC = RedRev32(buf.ulCRC);

+        buf.ulSignature = RedRev32(buf.ulSignature);

+        buf.ullSequence = RedRev64(buf.ullSequence);

+      #endif

+

+        /*  Make sure the signature is correct for the type of metadata block

+            requested by the caller.

+        */

+        switch(buf.ulSignature)

+        {

+            case META_SIG_MASTER:

+                fValid = (uMetaFlags == BFLAG_META_MASTER);

+                break;

+          #if REDCONF_IMAP_EXTERNAL == 1

+            case META_SIG_IMAP:

+                fValid = (uMetaFlags == BFLAG_META_IMAP);

+                break;

+          #endif

+            case META_SIG_INODE:

+                fValid = (uMetaFlags == BFLAG_META_INODE);

+                break;

+          #if DINDIR_POINTERS > 0U

+            case META_SIG_DINDIR:

+                fValid = (uMetaFlags == BFLAG_META_DINDIR);

+                break;

+          #endif

+          #if REDCONF_DIRECT_POINTERS < INODE_ENTRIES

+            case META_SIG_INDIR:

+                fValid = (uMetaFlags == BFLAG_META_INDIR);

+                break;

+          #endif

+            default:

+                fValid = false;

+                break;

+        }

+

+        if(fValid)

+        {

+            uint32_t ulComputedCrc;

+

+            /*  Check for disk corruption by comparing the stored CRC with one

+                computed from the data.

+

+                Also check the sequence number: if it is greater than the

+                current sequence number, the block is from a previous format

+                or the disk is writing blocks out of order.  During mount,

+                before the metaroots have been read, the sequence number will

+                be unknown, and the check is skipped.

+            */

+            ulComputedCrc = RedCrcNode(pbBuffer);

+            if(buf.ulCRC != ulComputedCrc)

+            {

+                fValid = false;

+            }

+            else if(gpRedVolume->fMounted && (buf.ullSequence >= gpRedVolume->ullSequence))

+            {

+                fValid = false;

+            }

+            else

+            {

+                /*  Buffer is valid.  No action, fValid is already true.

+                */

+            }

+        }

+    }

+

+    return fValid;

+}

+

+

+/** @brief Derive the index of the buffer.

+

+    @param pBuffer  The buffer to derive the index of.

+    @param pbIdx    On success, populated with the index of the buffer.

+

+    @return Boolean indicating result.

+

+    @retval true    Success.

+    @retval false   Failure.  @p pBuffer is not a valid buffer pointer.

+*/

+static bool BufferToIdx(

+    const void *pBuffer,

+    uint8_t    *pbIdx)

+{

+    bool        fRet = false;

+

+    if((pBuffer != NULL) && (pbIdx != NULL))

+    {

+        uint8_t bIdx;

+

+        /*  pBuffer should be a pointer to one of the block buffers.

+

+            A good compiler should optimize this loop into a bounds check and an

+            alignment check, although GCC has been observed to not do so; if the

+            number of buffers is small, it should not make much difference.  The

+            alternative is to use pointer comparisons, but this both deviates

+            from MISRA-C:2012 and involves undefined behavior.

+        */

+        for(bIdx = 0U; bIdx < REDCONF_BUFFER_COUNT; bIdx++)

+        {

+            if(pBuffer == &gBufCtx.b.aabBuffer[bIdx][0U])

+            {

+                break;

+            }

+        }

+

+        if(    (bIdx < REDCONF_BUFFER_COUNT)

+            && (gBufCtx.aHead[bIdx].ulBlock != BBLK_INVALID)

+            && (gBufCtx.aHead[bIdx].bVolNum == gbRedVolNum))

+        {

+            *pbIdx = bIdx;

+            fRet = true;

+        }

+    }

+

+    return fRet;

+}

+

+

+#if REDCONF_READ_ONLY == 0

+/** @brief Write out a dirty buffer.

+

+    @param bIdx The index of the buffer to write.

+

+    @return A negated ::REDSTATUS code indicating the operation result.

+

+    @retval 0           Operation was successful.

+    @retval -RED_EIO    A disk I/O error occurred.

+    @retval -RED_EINVAL Invalid parameters.

+*/

+static REDSTATUS BufferWrite(

+    uint8_t     bIdx)

+{

+    REDSTATUS   ret = 0;

+

+    if(bIdx < REDCONF_BUFFER_COUNT)

+    {

+        const BUFFERHEAD *pHead = &gBufCtx.aHead[bIdx];

+

+        REDASSERT((pHead->uFlags & BFLAG_DIRTY) != 0U);

+

+        if((pHead->uFlags & BFLAG_META) != 0U)

+        {

+            ret = BufferFinalize(gBufCtx.b.aabBuffer[bIdx], pHead->uFlags);

+        }

+

+        if(ret == 0)

+        {

+            ret = RedIoWrite(pHead->bVolNum, pHead->ulBlock, 1U, gBufCtx.b.aabBuffer[bIdx]);

+

+          #ifdef REDCONF_ENDIAN_SWAP

+            BufferEndianSwap(gBufCtx.b.aabBuffer[bIdx], pHead->uFlags);

+          #endif

+        }

+    }

+    else

+    {

+        REDERROR();

+        ret = -RED_EINVAL;

+    }

+

+    return ret;

+}

+

+

+/** @brief Finalize a metadata buffer.

+

+    This updates the CRC and the sequence number.  It also sets the signature,

+    though this is only truly needed if the buffer is new.

+

+    @param pbBuffer Pointer to the metadata buffer to finalize.

+    @param uFlags   The associated buffer flags.  Used to determine the expected

+                    signature.

+

+    @return A negated ::REDSTATUS code indicating the operation result.

+

+    @retval 0           Operation was successful.

+    @retval -RED_EINVAL Invalid parameter; or maximum sequence number reached.

+*/

+static REDSTATUS BufferFinalize(

+    uint8_t    *pbBuffer,

+    uint16_t    uFlags)

+{

+    REDSTATUS   ret = 0;

+

+    if((pbBuffer == NULL) || ((uFlags & BFLAG_MASK) != uFlags))

+    {

+        REDERROR();

+        ret = -RED_EINVAL;

+    }

+    else

+    {

+        uint32_t ulSignature;

+

+        switch(uFlags & BFLAG_META_MASK)

+        {

+            case BFLAG_META_MASTER:

+                ulSignature = META_SIG_MASTER;

+                break;

+          #if REDCONF_IMAP_EXTERNAL == 1

+            case BFLAG_META_IMAP:

+                ulSignature = META_SIG_IMAP;

+                break;

+          #endif

+            case BFLAG_META_INODE:

+                ulSignature = META_SIG_INODE;

+                break;

+          #if DINDIR_POINTERS > 0U

+            case BFLAG_META_DINDIR:

+                ulSignature = META_SIG_DINDIR;

+                break;

+          #endif

+          #if REDCONF_DIRECT_POINTERS < INODE_ENTRIES

+            case BFLAG_META_INDIR:

+                ulSignature = META_SIG_INDIR;

+                break;

+          #endif

+            default:

+                ulSignature = 0U;

+                break;

+        }

+

+        if(ulSignature == 0U)

+        {

+            REDERROR();

+            ret = -RED_EINVAL;

+        }

+        else

+        {

+            uint64_t ullSeqNum = gpRedVolume->ullSequence;

+

+            ret = RedVolSeqNumIncrement();

+            if(ret == 0)

+            {

+                uint32_t ulCrc;

+

+                RedMemCpy(&pbBuffer[NODEHEADER_OFFSET_SIG], &ulSignature, sizeof(ulSignature));

+                RedMemCpy(&pbBuffer[NODEHEADER_OFFSET_SEQ], &ullSeqNum, sizeof(ullSeqNum));

+

+              #ifdef REDCONF_ENDIAN_SWAP

+                BufferEndianSwap(pbBuffer, uFlags);

+              #endif

+

+                ulCrc = RedCrcNode(pbBuffer);

+              #ifdef REDCONF_ENDIAN_SWAP

+                ulCrc = RedRev32(ulCrc);

+              #endif

+                RedMemCpy(&pbBuffer[NODEHEADER_OFFSET_CRC], &ulCrc, sizeof(ulCrc));

+            }

+        }

+    }

+

+    return ret;

+}

+#endif /* REDCONF_READ_ONLY == 0 */

+

+

+#ifdef REDCONF_ENDIAN_SWAP

+/** @brief Swap the byte order of a metadata buffer

+

+    Does nothing if the buffer is not a metadata node.  Also does nothing for

+    meta roots, which don't go through the buffers anyways.

+

+    @param pBuffer  Pointer to the metadata buffer to swap

+    @param uFlags   The associated buffer flags.  Used to determin the type of

+                    metadata node.

+*/

+static void BufferEndianSwap(

+    void       *pBuffer,

+    uint16_t    uFlags)

+{

+    if((pBuffer == NULL) || ((uFlags & BFLAG_MASK) != uFlags))

+    {

+        REDERROR();

+    }

+    else if((uFlags & BFLAG_META_MASK) != 0)

+    {

+        BufferEndianSwapHeader(pBuffer);

+

+        switch(uFlags & BFLAG_META_MASK)

+        {

+            case BFLAG_META_MASTER:

+                BufferEndianSwapMaster(pBuffer);

+                break;

+            case BFLAG_META_INODE:

+                BufferEndianSwapInode(pBuffer);

+                break;

+          #if DINDIR_POINTERS > 0U

+            case BFLAG_META_DINDIR:

+                BufferEndianSwapIndir(pBuffer);

+                break;

+          #endif

+          #if REDCONF_DIRECT_POINTERS < INODE_ENTRIES

+            case BFLAG_META_INDIR:

+                BufferEndianSwapIndir(pBuffer);

+                break;

+          #endif

+            default:

+                break;

+        }

+    }

+    else

+    {

+        /*  File data buffers do not need to be swapped.

+        */

+    }

+}

+

+

+/** @brief Swap the byte order of a metadata node header

+

+    @param pHeader  Pointer to the metadata node header to swap

+*/

+static void BufferEndianSwapHeader(

+    NODEHEADER *pHeader)

+{

+    if(pHeader == NULL)

+    {

+        REDERROR();

+    }

+    else

+    {

+        pHeader->ulSignature = RedRev32(pHeader->ulSignature);

+        pHeader->ulCRC = RedRev32(pHeader->ulCRC);

+        pHeader->ullSequence = RedRev64(pHeader->ullSequence);

+    }

+}

+

+

+/** @brief Swap the byte order of a master block

+

+    @param pMaster  Pointer to the master block to swap

+*/

+static void BufferEndianSwapMaster(

+    MASTERBLOCK *pMaster)

+{

+    if(pMaster == NULL)

+    {

+        REDERROR();

+    }

+    else

+    {

+        pMaster->ulVersion = RedRev32(pMaster->ulVersion);

+        pMaster->ulFormatTime = RedRev32(pMaster->ulFormatTime);

+        pMaster->ulInodeCount = RedRev32(pMaster->ulInodeCount);

+        pMaster->ulBlockCount = RedRev32(pMaster->ulBlockCount);

+        pMaster->uMaxNameLen = RedRev16(pMaster->uMaxNameLen);

+        pMaster->uDirectPointers = RedRev16(pMaster->uDirectPointers);

+        pMaster->uIndirectPointers = RedRev16(pMaster->uIndirectPointers);

+    }

+}

+

+

+/** @brief Swap the byte order of an inode

+

+    @param pInode   Pointer to the inode to swap

+*/

+static void BufferEndianSwapInode(

+    INODE  *pInode)

+{

+    if(pInode == NULL)

+    {

+        REDERROR();

+    }

+    else

+    {

+        uint32_t ulIdx;

+

+        pInode->ullSize = RedRev64(pInode->ullSize);

+

+      #if REDCONF_INODE_BLOCKS == 1

+        pInode->ulBlocks = RedRev32(pInode->ulBlocks);

+      #endif

+

+      #if REDCONF_INODE_TIMESTAMPS == 1

+        pInode->ulATime = RedRev32(pInode->ulATime);

+        pInode->ulMTime = RedRev32(pInode->ulMTime);

+        pInode->ulCTime = RedRev32(pInode->ulCTime);

+      #endif

+

+        pInode->uMode = RedRev16(pInode->uMode);

+

+      #if (REDCONF_API_POSIX == 1) && (REDCONF_API_POSIX_LINK == 1)

+        pInode->uNLink = RedRev16(pInode->uNLink);

+      #endif

+

+      #if REDCONF_API_POSIX == 1

+        pInode->ulPInode = RedRev32(pInode->ulPInode);

+      #endif

+

+        for(ulIdx = 0; ulIdx < INODE_ENTRIES; ulIdx++)

+        {

+            pInode->aulEntries[ulIdx] = RedRev32(pInode->aulEntries[ulIdx]);

+        }

+    }

+}

+

+

+#if REDCONF_DIRECT_POINTERS < INODE_ENTRIES

+/** @brief Swap the byte order of an indirect or double indirect node

+

+    @param pIndir   Pointer to the node to swap

+*/

+static void BufferEndianSwapIndir(

+    INDIR  *pIndir)

+{

+    if(pIndir == NULL)

+    {

+        REDERROR();

+    }

+    else

+    {

+        uint32_t ulIdx;

+

+        pIndir->ulInode = RedRev32(pIndir->ulInode);

+

+        for(ulIdx = 0; ulIdx < INDIR_ENTRIES; ulIdx++)

+        {

+            pIndir->aulEntries[ulIdx] = RedRev32(pIndir->aulEntries[ulIdx]);

+        }

+    }

+}

+

+#endif /* REDCONF_DIRECT_POINTERS < INODE_ENTRIES */

+#endif /* #ifdef REDCONF_ENDIAN_SWAP */

+

+

+/** @brief Mark a buffer as least recently used.

+

+    @param bIdx The index of the buffer to make LRU.

+*/

+static void BufferMakeLRU(

+    uint8_t bIdx)

+{

+    if(bIdx >= REDCONF_BUFFER_COUNT)

+    {

+        REDERROR();

+    }

+    else if(bIdx != gBufCtx.abMRU[REDCONF_BUFFER_COUNT - 1U])

+    {

+        uint8_t bMruIdx;

+

+        /*  Find the current position of the buffer in the MRU array.  We do not

+            need to check the last slot, since we already know from the above

+            check that the index is not there.

+        */

+        for(bMruIdx = 0U; bMruIdx < (REDCONF_BUFFER_COUNT - 1U); bMruIdx++)

+        {

+            if(bIdx == gBufCtx.abMRU[bMruIdx])

+            {

+                break;

+            }

+        }

+

+        if(bMruIdx < (REDCONF_BUFFER_COUNT - 1U))

+        {

+            /*  Move the buffer index to the back of the MRU array, making it

+                the LRU buffer.

+            */

+            RedMemMove(&gBufCtx.abMRU[bMruIdx], &gBufCtx.abMRU[bMruIdx + 1U], REDCONF_BUFFER_COUNT - ((uint32_t)bMruIdx + 1U));

+            gBufCtx.abMRU[REDCONF_BUFFER_COUNT - 1U] = bIdx;

+        }

+        else

+        {

+            REDERROR();

+        }

+    }

+    else

+    {

+        /*  Buffer already LRU, nothing to do.

+        */

+    }

+}

+

+

+/** @brief Mark a buffer as most recently used.

+

+    @param bIdx The index of the buffer to make MRU.

+*/

+static void BufferMakeMRU(

+    uint8_t bIdx)

+{

+    if(bIdx >= REDCONF_BUFFER_COUNT)

+    {

+        REDERROR();

+    }

+    else if(bIdx != gBufCtx.abMRU[0U])

+    {

+        uint8_t bMruIdx;

+

+        /*  Find the current position of the buffer in the MRU array.  We do not

+            need to check the first slot, since we already know from the above

+            check that the index is not there.

+        */

+        for(bMruIdx = 1U; bMruIdx < REDCONF_BUFFER_COUNT; bMruIdx++)

+        {

+            if(bIdx == gBufCtx.abMRU[bMruIdx])

+            {

+                break;

+            }

+        }

+

+        if(bMruIdx < REDCONF_BUFFER_COUNT)

+        {

+            /*  Move the buffer index to the front of the MRU array, making it

+                the MRU buffer.

+            */

+            RedMemMove(&gBufCtx.abMRU[1U], &gBufCtx.abMRU[0U], bMruIdx);

+            gBufCtx.abMRU[0U] = bIdx;

+        }

+        else

+        {

+            REDERROR();

+        }

+    }

+    else

+    {

+        /*  Buffer already MRU, nothing to do.

+        */

+    }

+}

+

+

+/** @brief Find a block in the buffers.

+

+    @param ulBlock  The block number to find.

+    @param pbIdx    If the block is buffered (true is returned), populated with

+                    the index of the buffer.

+

+    @return Boolean indicating whether or not the block is buffered.

+

+    @retval true    @p ulBlock is buffered, and its index has been stored in

+                    @p pbIdx.

+    @retval false   @p ulBlock is not buffered.

+*/

+static bool BufferFind(

+    uint32_t ulBlock,

+    uint8_t *pbIdx)

+{

+    bool     ret = false;

+

+    if((ulBlock >= gpRedVolume->ulBlockCount) || (pbIdx == NULL))

+    {

+        REDERROR();

+    }

+    else

+    {

+        uint8_t bIdx;

+

+        for(bIdx = 0U; bIdx < REDCONF_BUFFER_COUNT; bIdx++)

+        {

+            const BUFFERHEAD *pHead = &gBufCtx.aHead[bIdx];

+

+            if((pHead->bVolNum == gbRedVolNum) && (pHead->ulBlock == ulBlock))

+            {

+                *pbIdx = bIdx;

+                ret = true;

+                break;

+            }

+        }

+    }

+

+    return ret;

+}

+

diff --git a/FreeRTOS-Plus/Source/Reliance-Edge/core/driver/core.c b/FreeRTOS-Plus/Source/Reliance-Edge/core/driver/core.c
new file mode 100644
index 0000000..22c44f4
--- /dev/null
+++ b/FreeRTOS-Plus/Source/Reliance-Edge/core/driver/core.c
@@ -0,0 +1,1921 @@
+/*             ----> DO NOT REMOVE THE FOLLOWING NOTICE <----

+

+                   Copyright (c) 2014-2015 Datalight, Inc.

+                       All Rights Reserved Worldwide.

+

+    This program is free software; you can redistribute it and/or modify

+    it under the terms of the GNU General Public License as published by

+    the Free Software Foundation; use version 2 of the License.

+

+    This program is distributed in the hope that it will be useful,

+    but "AS-IS," WITHOUT ANY WARRANTY; without even the implied warranty

+    of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the

+    GNU General Public License for more details.

+

+    You should have received a copy of the GNU General Public License along

+    with this program; if not, write to the Free Software Foundation, Inc.,

+    51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.

+*/

+/*  Businesses and individuals that for commercial or other reasons cannot

+    comply with the terms of the GPLv2 license may obtain a commercial license

+    before incorporating Reliance Edge into proprietary software for

+    distribution in any form.  Visit http://www.datalight.com/reliance-edge for

+    more information.

+*/

+/** @file

+    @brief Implements the entry-points to the core file system.

+*/

+#include <redfs.h>

+#include <redcoreapi.h>

+#include <redcore.h>

+

+

+/*  Minimum number of blocks needed for metadata on any volume: the master

+    block (1), the two metaroots (2), and one doubly-allocated inode (2),

+    resulting in 1 + 2 + 2 = 5.

+*/

+#define MINIMUM_METADATA_BLOCKS (5U)

+

+

+#if (REDCONF_READ_ONLY == 0) && (REDCONF_API_POSIX == 1)

+static REDSTATUS CoreCreate(uint32_t ulPInode, const char *pszName, bool fDir, uint32_t *pulInode);

+#endif

+#if (REDCONF_READ_ONLY == 0) && (REDCONF_API_POSIX == 1) && (REDCONF_API_POSIX_LINK == 1)

+static REDSTATUS CoreLink(uint32_t ulPInode, const char *pszName, uint32_t ulInode);

+#endif

+#if (REDCONF_READ_ONLY == 0) && (REDCONF_API_POSIX == 1) && ((REDCONF_API_POSIX_UNLINK == 1) || (REDCONF_API_POSIX_RMDIR == 1))

+static REDSTATUS CoreUnlink(uint32_t ulPInode, const char *pszName);

+#endif

+#if (REDCONF_READ_ONLY == 0) && (REDCONF_API_POSIX == 1) && (REDCONF_API_POSIX_RENAME == 1)

+static REDSTATUS CoreRename(uint32_t ulSrcPInode, const char *pszSrcName, uint32_t ulDstPInode, const char *pszDstName);

+#endif

+#if REDCONF_READ_ONLY == 0

+static REDSTATUS CoreFileWrite(uint32_t ulInode, uint64_t ullStart, uint32_t *pulLen, const void *pBuffer);

+#endif

+#if TRUNCATE_SUPPORTED

+static REDSTATUS CoreFileTruncate(uint32_t ulInode, uint64_t ullSize);

+#endif

+

+

+VOLUME gaRedVolume[REDCONF_VOLUME_COUNT];

+static COREVOLUME gaCoreVol[REDCONF_VOLUME_COUNT];

+

+const VOLCONF  * CONST_IF_ONE_VOLUME gpRedVolConf = &gaRedVolConf[0U];

+VOLUME         * CONST_IF_ONE_VOLUME gpRedVolume = &gaRedVolume[0U];

+COREVOLUME     * CONST_IF_ONE_VOLUME gpRedCoreVol = &gaCoreVol[0U];

+METAROOT       *gpRedMR = &gaCoreVol[0U].aMR[0U];

+

+CONST_IF_ONE_VOLUME uint8_t gbRedVolNum;

+

+

+/** @brief Initialize the Reliance Edge file system driver.

+

+    Prepares the Reliance Edge file system driver to be used.  Must be the first

+    Reliance Edge function to be invoked: no volumes can be mounted until the

+    driver has been initialized.

+

+    If this function is called when the Reliance Edge driver is already

+    initialized, the behavior is undefined.

+

+    @return A negated ::REDSTATUS code indicating the operation result.

+

+    @retval 0   Operation was successful.

+*/

+REDSTATUS RedCoreInit(void)

+{

+    REDSTATUS       ret = 0;

+    uint8_t         bVolNum;

+  #if REDCONF_OUTPUT == 1

+    static uint8_t  bSignedOn = 0U; /* Whether the sign on has been printed. */

+

+    if(bSignedOn == 0U)

+    {

+        RedSignOn();

+        bSignedOn = 1U;

+    }

+  #else

+    /*  Call RedSignOn() even when output is disabled, to force the copyright

+        text to be referenced and pulled into the program data.

+    */

+    RedSignOn();

+  #endif

+

+    RedMemSet(gaRedVolume, 0U, sizeof(gaRedVolume));

+    RedMemSet(gaCoreVol, 0U, sizeof(gaCoreVol));

+

+    RedBufferInit();

+

+    for(bVolNum = 0U; bVolNum < REDCONF_VOLUME_COUNT; bVolNum++)

+    {

+        VOLUME         *pVol = &gaRedVolume[bVolNum];

+        COREVOLUME     *pCoreVol = &gaCoreVol[bVolNum];

+        const VOLCONF  *pVolConf = &gaRedVolConf[bVolNum];

+

+        if(    (pVolConf->ulSectorSize < SECTOR_SIZE_MIN)

+            || ((REDCONF_BLOCK_SIZE % pVolConf->ulSectorSize) != 0U)

+            || (pVolConf->ulInodeCount == 0U))

+        {

+            ret = -RED_EINVAL;

+        }

+      #if REDCONF_API_POSIX == 1

+        else if(pVolConf->pszPathPrefix == NULL)

+        {

+            ret = -RED_EINVAL;

+        }

+        else

+        {

+          #if REDCONF_VOLUME_COUNT > 1U

+            uint8_t bCmpVol;

+

+            /*  Ensure there are no duplicate path prefixes.  Check against all

+                previous volumes, which are already verified.

+            */

+            for(bCmpVol = 0U; bCmpVol < bVolNum; bCmpVol++)

+            {

+                const char *pszCmpPathPrefix = gaRedVolConf[bCmpVol].pszPathPrefix;

+

+                if(RedStrCmp(pVolConf->pszPathPrefix, pszCmpPathPrefix) == 0)

+                {

+                    ret = -RED_EINVAL;

+                    break;

+                }

+            }

+          #endif

+        }

+      #endif

+

+        if(ret == 0)

+        {

+            pVol->bBlockSectorShift = 0U;

+            while((pVolConf->ulSectorSize << pVol->bBlockSectorShift) < REDCONF_BLOCK_SIZE)

+            {

+                pVol->bBlockSectorShift++;

+            }

+

+            /*  This should always be true since the block size is confirmed to

+                be a power of two (checked at compile time) and above we ensured

+                that (REDCONF_BLOCK_SIZE % pVolConf->ulSectorSize) == 0.

+            */

+            REDASSERT((pVolConf->ulSectorSize << pVol->bBlockSectorShift) == REDCONF_BLOCK_SIZE);

+

+            pVol->ulBlockCount = (uint32_t)(pVolConf->ullSectorCount >> pVol->bBlockSectorShift);

+

+            if(pVol->ulBlockCount < MINIMUM_METADATA_BLOCKS)

+            {

+                ret = -RED_EINVAL;

+            }

+            else

+            {

+              #if REDCONF_READ_ONLY == 0

+                pVol->ulTransMask = REDCONF_TRANSACT_DEFAULT;

+              #endif

+

+                pVol->ullMaxInodeSize = INODE_SIZE_MAX;

+

+                /*  To understand the following code, note that the fixed-

+                    location metadata is located at the start of the disk, in

+                    the following order:

+

+                    - Master block (1 block)

+                    - Metaroots (2 blocks)

+                    - External imap blocks (variable * 2 blocks)

+                    - Inode blocks (pVolConf->ulInodeCount * 2 blocks)

+                */

+

+                /*  The imap needs bits for all inode and allocable blocks.  If

+                    that bitmap will fit into the metaroot, the inline imap is

+                    used and there are no imap nodes on disk.  The minus 3 is

+                    there since the imap does not include bits for the master

+                    block or metaroots.

+                */

+                pCoreVol->fImapInline = (pVol->ulBlockCount - 3U) <= METAROOT_ENTRIES;

+

+                if(pCoreVol->fImapInline)

+                {

+                  #if REDCONF_IMAP_INLINE == 1

+                    pCoreVol->ulInodeTableStartBN = 3U;

+                  #else

+                    ret = -RED_EINVAL;

+                  #endif

+                }

+                else

+                {

+                  #if REDCONF_IMAP_EXTERNAL == 1

+                    pCoreVol->ulImapStartBN = 3U;

+

+                    /*  The imap does not include bits for itself, so add two to

+                        the number of imap entries for the two blocks of each

+                        imap node.  This allows us to divide up the remaining

+                        space, making sure to round up so all data blocks are

+                        covered.

+                    */

+                    pCoreVol->ulImapNodeCount =

+                        ((pVol->ulBlockCount - 3U) + ((IMAPNODE_ENTRIES + 2U) - 1U)) / (IMAPNODE_ENTRIES + 2U);

+

+                    pCoreVol->ulInodeTableStartBN = pCoreVol->ulImapStartBN + (pCoreVol->ulImapNodeCount * 2U);

+                  #else

+                    ret = -RED_EINVAL;

+                  #endif

+                }

+            }

+        }

+

+        if(ret == 0)

+        {

+            pCoreVol->ulFirstAllocableBN = pCoreVol->ulInodeTableStartBN + (pVolConf->ulInodeCount * 2U);

+

+            if(pCoreVol->ulFirstAllocableBN > pVol->ulBlockCount)

+            {

+                /*  We can get here if there is not enough space for the number

+                    of configured inodes.

+                */

+                ret = -RED_EINVAL;

+            }

+            else

+            {

+                pVol->ulBlocksAllocable = pVol->ulBlockCount - pCoreVol->ulFirstAllocableBN;

+            }

+        }

+

+        if(ret != 0)

+        {

+            break;

+        }

+    }

+

+    /*  Make sure the configured endianness is correct.

+    */

+    if(ret == 0)

+    {

+        uint16_t    uValue = 0xFF00U;

+        uint8_t     abBytes[2U];

+

+        RedMemCpy(abBytes, &uValue, sizeof(abBytes));

+

+      #if REDCONF_ENDIAN_BIG == 1

+        if(abBytes[0U] != 0xFFU)

+      #else

+        if(abBytes[0U] != 0x00U)

+      #endif

+        {

+            ret = -RED_EINVAL;

+        }

+    }

+

+    if(ret == 0)

+    {

+        ret = RedOsClockInit();

+

+      #if REDCONF_TASK_COUNT > 1U

+        if(ret == 0)

+        {

+            ret = RedOsMutexInit();

+

+            if(ret != 0)

+            {

+                (void)RedOsClockUninit();

+            }

+        }

+      #endif

+    }

+

+    return ret;

+}

+

+

+/** @brief Uninitialize the Reliance Edge file system driver.

+

+    Tears down the Reliance Edge file system driver.  Cannot be used until all

+    Reliance Edge volumes are unmounted.  A subsequent call to RedCoreInit()

+    will initialize the driver again.

+

+    The behavior of calling this function when the core is already uninitialized

+    is undefined.

+

+    @return A negated ::REDSTATUS code indicating the operation result.

+

+    @retval 0           Operation was successful.

+    @retval -RED_EBUSY  At least one volume is still mounted.

+*/

+REDSTATUS RedCoreUninit(void)

+{

+    REDSTATUS ret;

+

+  #if REDCONF_TASK_COUNT > 1U

+    ret = RedOsMutexUninit();

+

+    if(ret == 0)

+  #endif

+    {

+        ret = RedOsClockUninit();

+    }

+

+    return ret;

+}

+

+

+/** @brief Set the current volume.

+

+    All core APIs operate on the current volume.  This call must precede all

+    core accesses.

+

+    @param bVolNum  The volume number to access.

+

+    @return A negated ::REDSTATUS code indicating the operation result.

+

+    @retval 0           Operation was successful.

+    @retval -RED_EINVAL @p bVolNum is an invalid volume number.

+*/

+REDSTATUS RedCoreVolSetCurrent(

+    uint8_t     bVolNum)

+{

+    REDSTATUS   ret;

+

+    if(bVolNum >= REDCONF_VOLUME_COUNT)

+    {

+        ret = -RED_EINVAL;

+    }

+    else

+    {

+      #if REDCONF_VOLUME_COUNT > 1U

+        gbRedVolNum = bVolNum;

+        gpRedVolConf = &gaRedVolConf[bVolNum];

+        gpRedVolume = &gaRedVolume[bVolNum];

+        gpRedCoreVol = &gaCoreVol[bVolNum];

+        gpRedMR = &gpRedCoreVol->aMR[gpRedCoreVol->bCurMR];

+      #endif

+

+        ret = 0;

+    }

+

+    return ret;

+}

+

+

+#if FORMAT_SUPPORTED

+/** @brief Format a file system volume.

+

+    Uses the statically defined volume configuration.  After calling this

+    function, the volume needs to be mounted -- see RedCoreVolMount().

+

+    An error is returned if the volume is mounted.

+

+    @return A negated ::REDSTATUS code indicating the operation result.

+

+    @retval 0           Operation was successful.

+    @retval -RED_EBUSY  Volume is mounted.

+    @retval -RED_EIO    A disk I/O error occurred.

+*/

+REDSTATUS RedCoreVolFormat(void)

+{

+    return RedVolFormat();

+}

+#endif /* FORMAT_SUPPORTED */

+

+

+/** @brief Mount a file system volume.

+

+    Prepares the file system volume to be accessed.  Mount will fail if the

+    volume has never been formatted, or if the on-disk format is inconsistent

+    with the compile-time configuration.

+

+    If the volume is already mounted, the behavior is undefined.

+

+    @return A negated ::REDSTATUS code indicating the operation result.

+

+    @retval 0           Operation was successful.

+    @retval -RED_EIO    Volume not formatted, improperly formatted, or corrupt.

+*/

+REDSTATUS RedCoreVolMount(void)

+{

+    return RedVolMount();

+}

+

+

+/** @brief Unmount a file system volume.

+

+    This function discards the in-memory state for the file system and marks it

+    as unmounted.  Subsequent attempts to access the volume will fail until the

+    volume is mounted again.

+

+    If unmount automatic transaction points are enabled, this function will

+    commit a transaction point prior to unmounting.  If unmount automatic

+    transaction points are disabled, this function will unmount without

+    transacting, effectively discarding the working state.

+

+    If the volume is already unmounted, the behavior is undefined.

+

+    @return A negated ::REDSTATUS code indicating the operation result.

+

+    @retval 0           Operation was successful.

+    @retval -RED_EIO    I/O error during unmount automatic transaction point.

+*/

+REDSTATUS RedCoreVolUnmount(void)

+{

+    REDSTATUS ret = 0;

+

+  #if REDCONF_READ_ONLY == 0

+    if(!gpRedVolume->fReadOnly && ((gpRedVolume->ulTransMask & RED_TRANSACT_UMOUNT) != 0U))

+    {

+        ret = RedVolTransact();

+    }

+  #endif

+

+    if(ret == 0)

+    {

+        ret = RedBufferDiscardRange(0U, gpRedVolume->ulBlockCount);

+    }

+

+    if(ret == 0)

+    {

+        ret = RedOsBDevClose(gbRedVolNum);

+    }

+

+    if(ret == 0)

+    {

+        gpRedVolume->fMounted = false;

+    }

+

+    return ret;

+}

+

+

+#if REDCONF_READ_ONLY == 0

+/** @brief Commit a transaction point.

+

+    Reliance Edge is a transactional file system.  All modifications, of both

+    metadata and filedata, are initially working state.  A transaction point

+    is a process whereby the working state atomically becomes the committed

+    state, replacing the previous committed state.  Whenever Reliance Edge is

+    mounted, including after power loss, the state of the file system after

+    mount is the most recent committed state.  Nothing from the committed

+    state is ever missing, and nothing from the working state is ever included.

+

+    @return A negated ::REDSTATUS code indicating the operation result.

+

+    @retval 0           Operation was successful.

+    @retval -RED_EINVAL The volume is not mounted.

+    @retval -RED_EIO    A disk I/O error occurred.

+    @retval -RED_EROFS  The file system volume is read-only.

+*/

+REDSTATUS RedCoreVolTransact(void)

+{

+    REDSTATUS ret;

+

+    if(!gpRedVolume->fMounted)

+    {

+        ret = -RED_EINVAL;

+    }

+    else if(gpRedVolume->fReadOnly)

+    {

+        ret = -RED_EROFS;

+    }

+    else

+    {

+        ret = RedVolTransact();

+    }

+

+    return ret;

+}

+#endif /* REDCONF_READ_ONLY == 0 */

+

+

+#if REDCONF_API_POSIX == 1

+/** @brief Query file system status information.

+

+    @param pStatFS  The buffer to populate with volume information.

+

+    @return A negated ::REDSTATUS code indicating the operation result.

+

+    @retval -RED_EINVAL Volume is not mounted; or @p pStatFS is `NULL`.

+*/

+REDSTATUS RedCoreVolStat(

+    REDSTATFS  *pStatFS)

+{

+    REDSTATUS   ret;

+

+    if((pStatFS == NULL) || (!gpRedVolume->fMounted))

+    {

+        ret = -RED_EINVAL;

+    }

+    else

+    {

+        RedMemSet(pStatFS, 0U, sizeof(*pStatFS));

+

+        pStatFS->f_bsize = REDCONF_BLOCK_SIZE;

+        pStatFS->f_frsize = REDCONF_BLOCK_SIZE;

+        pStatFS->f_blocks = gpRedVolume->ulBlockCount;

+      #if RESERVED_BLOCKS > 0U

+        pStatFS->f_bfree = (gpRedMR->ulFreeBlocks > RESERVED_BLOCKS) ? (gpRedMR->ulFreeBlocks - RESERVED_BLOCKS) : 0U;

+      #else

+        pStatFS->f_bfree = gpRedMR->ulFreeBlocks;

+      #endif

+        pStatFS->f_bavail = pStatFS->f_bfree;

+        pStatFS->f_files = gpRedVolConf->ulInodeCount;

+        pStatFS->f_ffree = gpRedMR->ulFreeInodes;

+        pStatFS->f_favail = gpRedMR->ulFreeInodes;

+

+        pStatFS->f_flag = RED_ST_NOSUID;

+      #if REDCONF_READ_ONLY == 0

+        if(gpRedVolume->fReadOnly)

+      #endif

+        {

+            pStatFS->f_flag |= RED_ST_RDONLY;

+        }

+

+        pStatFS->f_namemax = REDCONF_NAME_MAX;

+        pStatFS->f_maxfsize = INODE_SIZE_MAX;

+        pStatFS->f_dev = gbRedVolNum;

+

+        ret = 0;

+    }

+

+    return ret;

+}

+#endif /* REDCONF_API_POSIX == 1 */

+

+

+#if (REDCONF_READ_ONLY == 0) && ((REDCONF_API_POSIX == 1) || (REDCONF_API_FSE_TRANSMASKSET == 1))

+/** @brief Update the transaction mask.

+

+    The following events are available when using the FSE API:

+

+    - #RED_TRANSACT_UMOUNT

+    - #RED_TRANSACT_WRITE

+    - #RED_TRANSACT_TRUNCATE

+    - #RED_TRANSACT_VOLFULL

+

+    The following events are available when using the POSIX-like API:

+

+    - #RED_TRANSACT_UMOUNT

+    - #RED_TRANSACT_CREAT

+    - #RED_TRANSACT_UNLINK

+    - #RED_TRANSACT_MKDIR

+    - #RED_TRANSACT_RENAME

+    - #RED_TRANSACT_LINK

+    - #RED_TRANSACT_CLOSE

+    - #RED_TRANSACT_WRITE

+    - #RED_TRANSACT_FSYNC

+    - #RED_TRANSACT_TRUNCATE

+    - #RED_TRANSACT_VOLFULL

+

+    The #RED_TRANSACT_MANUAL macro (by itself) may be used to disable all

+    automatic transaction events.  The #RED_TRANSACT_MASK macro is a bitmask of

+    all transaction flags, excluding those representing excluded functionality.

+

+    Attempting to enable events for excluded functionality will result in an

+    error.

+

+    @param ulEventMask  A bitwise-OR'd mask of automatic transaction events to

+                        be set as the current transaction mode.

+

+    @return A negated ::REDSTATUS code indicating the operation result.

+

+    @retval 0           Operation was successful.

+    @retval -RED_EINVAL The volume is not mounted; or @p ulEventMask contains

+                        invalid bits.

+    @retval -RED_EROFS  The file system volume is read-only.

+*/

+REDSTATUS RedCoreTransMaskSet(

+    uint32_t  ulEventMask)

+{

+    REDSTATUS ret;

+

+    if(!gpRedVolume->fMounted || ((ulEventMask & RED_TRANSACT_MASK) != ulEventMask))

+    {

+        ret = -RED_EINVAL;

+    }

+    else if(gpRedVolume->fReadOnly)

+    {

+        ret = -RED_EROFS;

+    }

+    else

+    {

+        gpRedVolume->ulTransMask = ulEventMask;

+        ret = 0;

+    }

+

+    return ret;

+}

+#endif

+

+

+#if (REDCONF_API_POSIX == 1) || (REDCONF_API_FSE_TRANSMASKGET == 1)

+/** @brief Read the transaction mask.

+

+    If the volume is read-only, the returned event mask is always zero.

+

+    @param pulEventMask Populated with a bitwise-OR'd mask of automatic

+                        transaction events which represent the current

+                        transaction mode for the volume.

+

+    @return A negated ::REDSTATUS code indicating the operation result.

+

+    @retval 0           Operation was successful.

+    @retval -RED_EINVAL The volume is not mounted; or @p pulEventMask is `NULL`.

+*/

+REDSTATUS RedCoreTransMaskGet(

+    uint32_t *pulEventMask)

+{

+    REDSTATUS ret;

+

+    if(!gpRedVolume->fMounted || (pulEventMask == NULL))

+    {

+        ret = -RED_EINVAL;

+    }

+    else

+    {

+      #if REDCONF_READ_ONLY == 1

+        *pulEventMask = 0U;

+      #else

+        *pulEventMask = gpRedVolume->ulTransMask;

+      #endif

+        ret = 0;

+    }

+

+    return ret;

+}

+#endif

+

+

+#if (REDCONF_READ_ONLY == 0) && (REDCONF_API_POSIX == 1)

+/** @brief Create a file or directory.

+

+    @param ulPInode The inode number of the parent directory.

+    @param pszName  A null-terminated name for the new inode.

+    @param fDir     Whether to create a directory (true) or file (false).

+    @param pulInode On successful return, populated with the inode number of the

+                    new file or directory.

+

+    @return A negated ::REDSTATUS code indicating the operation result.

+

+    @retval 0                   Operation was successful.

+    @retval -RED_EINVAL         The volume is not mounted; or @p pszName is not

+                                a valid name; or @p pulInode is `NULL`.

+    @retval -RED_EIO            A disk I/O error occurred.

+    @retval -RED_EROFS          The file system volume is read-only.

+    @retval -RED_ENOTDIR        @p ulPInode is not a directory.

+    @retval -RED_EBADF          @p ulPInode is not a valid inode.

+    @retval -RED_ENOSPC         There is not enough space on the volume to

+                                createthe new directory entry; or the directory

+                                is full.

+    @retval -RED_ENFILE         No available inode slots.

+    @retval -RED_ENAMETOOLONG   @p pszName is too long.

+    @retval -RED_EEXIST         @p pszName already exists in @p ulPInode.

+*/

+REDSTATUS RedCoreCreate(

+    uint32_t    ulPInode,

+    const char *pszName,

+    bool        fDir,

+    uint32_t   *pulInode)

+{

+    REDSTATUS   ret;

+

+    if(!gpRedVolume->fMounted)

+    {

+        ret = -RED_EINVAL;

+    }

+    else if(gpRedVolume->fReadOnly)

+    {

+        ret = -RED_EROFS;

+    }

+    else

+    {

+        ret = CoreCreate(ulPInode, pszName, fDir, pulInode);

+

+        if(    (ret == -RED_ENOSPC)

+            && ((gpRedVolume->ulTransMask & RED_TRANSACT_VOLFULL) != 0U)

+            && (gpRedCoreVol->ulAlmostFreeBlocks > 0U))

+        {

+            ret = RedVolTransact();

+

+            if(ret == 0)

+            {

+                ret = CoreCreate(ulPInode, pszName, fDir, pulInode);

+            }

+        }

+

+        if(ret == 0)

+        {

+            if(fDir && ((gpRedVolume->ulTransMask & RED_TRANSACT_MKDIR) != 0U))

+            {

+                ret = RedVolTransact();

+            }

+            else if(!fDir && ((gpRedVolume->ulTransMask & RED_TRANSACT_CREAT) != 0U))

+            {

+                ret = RedVolTransact();

+            }

+            else

+            {

+                /*  No automatic transaction for this operation.

+                */

+            }

+        }

+    }

+

+    return ret;

+}

+

+

+/** @brief Create a file or directory.

+

+    @param ulPInode The inode number of the parent directory.

+    @param pszName  A null-terminated name for the new inode.

+    @param fDir     Whether to create a directory (true) or file (false).

+    @param pulInode On successful return, populated with the inode number of the

+                    new file or directory.

+

+    @return A negated ::REDSTATUS code indicating the operation result.

+

+    @retval 0                   Operation was successful.

+    @retval -RED_EIO            A disk I/O error occurred.

+    @retval -RED_EROFS          The file system volume is read-only.

+    @retval -RED_ENOTDIR        @p ulPInode is not a directory.

+    @retval -RED_EBADF          @p ulPInode is not a valid inode.

+    @retval -RED_ENOSPC         There is not enough space on the volume to

+                                create the new directory entry; or the directory

+                                is full.

+    @retval -RED_ENFILE         No available inode slots.

+    @retval -RED_ENAMETOOLONG   @p pszName is too long.

+    @retval -RED_EEXIST         @p pszName already exists in @p ulPInode.

+*/

+static REDSTATUS CoreCreate(

+    uint32_t    ulPInode,

+    const char *pszName,

+    bool        fDir,

+    uint32_t   *pulInode)

+{

+    REDSTATUS   ret;

+

+    if(pulInode == NULL)

+    {

+        ret = -RED_EINVAL;

+    }

+    else if(gpRedVolume->fReadOnly)

+    {

+        ret = -RED_EROFS;

+    }

+    else

+    {

+        CINODE pino;

+

+        pino.ulInode = ulPInode;

+        ret = RedInodeMount(&pino, FTYPE_DIR, false);

+

+        if(ret == 0)

+        {

+            CINODE ino;

+

+            ino.ulInode = INODE_INVALID;

+            ret = RedInodeCreate(&ino, ulPInode, fDir ? RED_S_IFDIR : RED_S_IFREG);

+

+            if(ret == 0)

+            {

+                ret = RedInodeBranch(&pino);

+

+                if(ret == 0)

+                {

+                    ret = RedDirEntryCreate(&pino, pszName, ino.ulInode);

+                }

+

+                if(ret == 0)

+                {

+                    *pulInode = ino.ulInode;

+                }

+                else

+                {

+                    REDSTATUS ret2;

+

+                    ret2 = RedInodeFree(&ino);

+                    CRITICAL_ASSERT(ret2 == 0);

+                }

+

+                RedInodePut(&ino, 0U);

+            }

+

+            RedInodePut(&pino, (ret == 0) ? (uint8_t)(IPUT_UPDATE_MTIME | IPUT_UPDATE_CTIME) : 0U);

+        }

+    }

+

+    return ret;

+}

+#endif /* (REDCONF_READ_ONLY == 0) && (REDCONF_API_POSIX == 1) */

+

+

+#if (REDCONF_READ_ONLY == 0) && (REDCONF_API_POSIX == 1) && (REDCONF_API_POSIX_LINK == 1)

+/** @brief Create a hard link.

+

+    This creates an additional name (link) for @p ulInode.  The new name refers

+    to the same file with the same contents.  If a name is deleted, but the

+    underlying file has other names, the file continues to exist.  The link

+    count (accessible via RedCoreStat()) indicates the number of names that a

+    file has.  All of a file's names are on equal footing: there is nothing

+    special about the original name.

+

+    If @p ulInode names a directory, the operation will fail.

+

+    @param ulPInode The inode number of the parent directory.

+    @param pszName  The null-terminated name for the new link.

+    @param ulInode  The inode to create a hard link to.

+

+    @return A negated ::REDSTATUS code indicating the operation result.

+

+    @retval 0                   Operation was successful.

+    @retval -RED_EBADF          @p ulPInode is not a valid inode; or @p ulInode

+                                is not a valid inode.

+    @retval -RED_EEXIST         @p pszName resolves to an existing file.

+    @retval -RED_EINVAL         The volume is not mounted; or @p pszName is

+                                `NULL`.

+    @retval -RED_EIO            A disk I/O error occurred.

+    @retval -RED_EMLINK         Creating the link would exceed the maximum link

+                                count of @p ulInode.

+    @retval -RED_ENAMETOOLONG   Attempting to create a link with a name that

+                                exceeds the maximum name length.

+    @retval -RED_ENOSPC         There is insufficient free space to expand the

+                                directory that would contain the link.

+    @retval -RED_ENOTDIR        @p ulPInode is not a directory.

+    @retval -RED_EPERM          @p ulInode is a directory.

+    @retval -RED_EROFS          The requested link requires writing in a

+                                directory on a read-only file system.

+*/

+REDSTATUS RedCoreLink(

+    uint32_t    ulPInode,

+    const char *pszName,

+    uint32_t    ulInode)

+{

+    REDSTATUS   ret;

+

+    if(!gpRedVolume->fMounted)

+    {

+        ret = -RED_EINVAL;

+    }

+    else if(gpRedVolume->fReadOnly)

+    {

+        ret = -RED_EROFS;

+    }

+    else

+    {

+        ret = CoreLink(ulPInode, pszName, ulInode);

+

+        if(    (ret == -RED_ENOSPC)

+            && ((gpRedVolume->ulTransMask & RED_TRANSACT_VOLFULL) != 0U)

+            && (gpRedCoreVol->ulAlmostFreeBlocks > 0U))

+        {

+            ret = RedVolTransact();

+

+            if(ret == 0)

+            {

+                ret = CoreLink(ulPInode, pszName, ulInode);

+            }

+        }

+

+        if((ret == 0) && ((gpRedVolume->ulTransMask & RED_TRANSACT_LINK) != 0U))

+        {

+            ret = RedVolTransact();

+        }

+    }

+

+    return ret;

+}

+

+

+/** @brief Create a hard link.

+

+    @param ulPInode The inode number of the parent directory.

+    @param pszName  The null-terminated name for the new link.

+    @param ulInode  The inode to create a hard link to.

+

+    @return A negated ::REDSTATUS code indicating the operation result.

+

+    @retval 0                   Operation was successful.

+    @retval -RED_EBADF          @p ulPInode is not a valid inode; or @p ulInode

+                                is not a valid inode.

+    @retval -RED_EEXIST         @p pszName resolves to an existing file.

+    @retval -RED_EIO            A disk I/O error occurred.

+    @retval -RED_EMLINK         Creating the link would exceed the maximum link

+                                count of @p ulInode.

+    @retval -RED_ENAMETOOLONG   Attempting to create a link with a name that

+                                exceeds the maximum name length.

+    @retval -RED_ENOSPC         There is insufficient free space to expand the

+                                directory that would contain the link.

+    @retval -RED_ENOTDIR        @p ulPInode is not a directory.

+    @retval -RED_EPERM          @p ulInode is a directory.

+    @retval -RED_EROFS          The requested link requires writing in a

+                                directory on a read-only file system.

+*/

+static REDSTATUS CoreLink(

+    uint32_t    ulPInode,

+    const char *pszName,

+    uint32_t    ulInode)

+{

+    REDSTATUS   ret;

+

+    if(gpRedVolume->fReadOnly)

+    {

+        ret = -RED_EROFS;

+    }

+    else

+    {

+        CINODE pino;

+

+        pino.ulInode = ulPInode;

+        ret = RedInodeMount(&pino, FTYPE_DIR, false);

+

+        if(ret == 0)

+        {

+            CINODE ino;

+

+            ino.ulInode = ulInode;

+            ret = RedInodeMount(&ino, FTYPE_FILE, false);

+

+            /*  POSIX specifies EPERM as the errno thrown when link() is given a

+                directory.  Switch the errno returned if EISDIR was the return

+                value.

+            */

+            if(ret == -RED_EISDIR)

+            {

+                ret = -RED_EPERM;

+            }

+

+            if(ret == 0)

+            {

+                if(ino.pInodeBuf->uNLink == UINT16_MAX)

+                {

+                    ret = -RED_EMLINK;

+                }

+                else

+                {

+                    ret = RedInodeBranch(&pino);

+                }

+

+                if(ret == 0)

+                {

+                    ret = RedInodeBranch(&ino);

+                }

+

+                if(ret == 0)

+                {

+                    ret = RedDirEntryCreate(&pino, pszName, ino.ulInode);

+                }

+

+                if(ret == 0)

+                {

+                    ino.pInodeBuf->uNLink++;

+                }

+

+                RedInodePut(&ino, (ret == 0) ? IPUT_UPDATE_CTIME : 0U);

+            }

+

+            RedInodePut(&pino, (ret == 0) ? (uint8_t)(IPUT_UPDATE_MTIME | IPUT_UPDATE_CTIME) : 0U);

+        }

+    }

+

+    return ret;

+}

+#endif /* (REDCONF_READ_ONLY == 0) && (REDCONF_API_POSIX == 1) && (REDCONF_API_POSIX_LINK == 1) */

+

+

+#if (REDCONF_READ_ONLY == 0) && (REDCONF_API_POSIX == 1) && ((REDCONF_API_POSIX_UNLINK == 1) || (REDCONF_API_POSIX_RMDIR == 1))

+/** @brief Delete a file or directory.

+

+    The given name is deleted and the link count of the corresponding inode is

+    decremented.  If the link count falls to zero (no remaining hard links),

+    the inode will be deleted.

+

+    If the path names a directory which is not empty, the unlink will fail.

+

+    If the deletion frees data in the committed state, it will not return to

+    free space until after a transaction point.  Similarly, if the inode was

+    part of the committed state, the inode slot will not be available until

+    after a transaction point.

+

+    This function can fail when the disk is full.  To fix this, transact and

+    try again: Reliance Edge guarantees that it is possible to delete at least

+    one file or directory after a transaction point.  If disk full automatic

+    transactions are enabled, this will happen automatically.

+

+    @param ulPInode The inode number of the parent directory.

+    @param pszName  The null-terminated name of the file or directory to

+                    delete.

+

+    @return A negated ::REDSTATUS code indicating the operation result.

+

+    @retval 0                   Operation was successful.

+    @retval -RED_EBADF          @p ulPInode is not a valid inode.

+    @retval -RED_EINVAL         The volume is not mounted; or @p pszName is

+                                `NULL`.

+    @retval -RED_EIO            A disk I/O error occurred.

+    @retval -RED_ENAMETOOLONG   @p pszName is too long.

+    @retval -RED_ENOENT         @p pszName does not name an existing file or

+                                directory.

+    @retval -RED_ENOTDIR        @p ulPInode is not a directory.

+    @retval -RED_ENOSPC         The file system does not have enough space to

+                                modify the parent directory to perform the

+                                deletion.

+    @retval -RED_ENOTEMPTY      The inode refered to by @p pszName is a

+                                directory which is not empty.

+*/

+REDSTATUS RedCoreUnlink(

+    uint32_t    ulPInode,

+    const char *pszName)

+{

+    REDSTATUS   ret;

+

+    if(!gpRedVolume->fMounted)

+    {

+        ret = -RED_EINVAL;

+    }

+    else if(gpRedVolume->fReadOnly)

+    {

+        ret = -RED_EROFS;

+    }

+    else

+    {

+        ret = CoreUnlink(ulPInode, pszName);

+

+        if(    (ret == -RED_ENOSPC)

+            && ((gpRedVolume->ulTransMask & RED_TRANSACT_VOLFULL) != 0U)

+            && (gpRedCoreVol->ulAlmostFreeBlocks > 0U))

+        {

+            ret = RedVolTransact();

+

+            if(ret == 0)

+            {

+                ret = CoreUnlink(ulPInode, pszName);

+            }

+        }

+

+        if((ret == 0) && ((gpRedVolume->ulTransMask & RED_TRANSACT_UNLINK) != 0U))

+        {

+            ret = RedVolTransact();

+        }

+    }

+

+    return ret;

+}

+

+

+/** @brief Delete a file or directory.

+

+    @param ulPInode The inode number of the parent directory.

+    @param pszName  The null-terminated name of the file or directory to

+                    delete.

+

+    @return A negated ::REDSTATUS code indicating the operation result.

+

+    @retval 0                   Operation was successful.

+    @retval -RED_EBADF          @p ulPInode is not a valid inode.

+    @retval -RED_EIO            A disk I/O error occurred.

+    @retval -RED_ENAMETOOLONG   @p pszName is too long.

+    @retval -RED_ENOENT         @p pszName does not name an existing file or

+                                directory.

+    @retval -RED_ENOTDIR        @p ulPInode is not a directory.

+    @retval -RED_ENOSPC         The file system does not have enough space to

+                                modify the parent directory to perform the

+                                deletion.

+    @retval -RED_ENOTEMPTY      The inode refered to by @p pszName is a

+                                directory which is not empty.

+*/

+static REDSTATUS CoreUnlink(

+    uint32_t    ulPInode,

+    const char *pszName)

+{

+    REDSTATUS   ret;

+

+    if(gpRedVolume->fReadOnly)

+    {

+        ret = -RED_EROFS;

+    }

+    else

+    {

+        CINODE pino;

+

+        pino.ulInode = ulPInode;

+        ret = RedInodeMount(&pino, FTYPE_DIR, false);

+

+        if(ret == 0)

+        {

+            uint32_t ulDeleteIdx;

+            uint32_t ulInode;

+

+            ret = RedDirEntryLookup(&pino, pszName, &ulDeleteIdx, &ulInode);

+

+            if(ret == 0)

+            {

+                ret = RedInodeBranch(&pino);

+            }

+

+            if(ret == 0)

+            {

+                CINODE ino;

+

+                ino.ulInode = ulInode;

+                ret = RedInodeMount(&ino, FTYPE_EITHER, false);

+

+                if(ret == 0)

+                {

+                    if(ino.fDirectory && (ino.pInodeBuf->ullSize > 0U))

+                    {

+                        ret = -RED_ENOTEMPTY;

+                    }

+                    else

+                    {

+                      #if RESERVED_BLOCKS > 0U

+                        gpRedCoreVol->fUseReservedBlocks = true;

+                      #endif

+

+                        ret = RedDirEntryDelete(&pino, ulDeleteIdx);

+

+                      #if RESERVED_BLOCKS > 0U

+                        gpRedCoreVol->fUseReservedBlocks = false;

+                      #endif

+

+                        if(ret == 0)

+                        {

+                            /*  If the inode is deleted, buffers are needed to

+                                read all of the indirects and free the data

+                                blocks.  Before doing that, to reduce the

+                                minimum number of buffers needed to complete the

+                                unlink, release the parent directory inode

+                                buffers which are no longer needed.

+                            */

+                            RedInodePutCoord(&pino);

+

+                            ret = RedInodeLinkDec(&ino);

+                            CRITICAL_ASSERT(ret == 0);

+                        }

+                    }

+

+                    RedInodePut(&ino, (ret == 0) ? IPUT_UPDATE_CTIME : 0U);

+                }

+            }

+

+            RedInodePut(&pino, (ret == 0) ? (uint8_t)(IPUT_UPDATE_MTIME | IPUT_UPDATE_CTIME) : 0U);

+        }

+    }

+

+    return ret;

+}

+#endif /* (REDCONF_READ_ONLY == 0) && (REDCONF_API_POSIX == 1) && ((REDCONF_API_POSIX_UNLINK == 1) || (REDCONF_API_POSIX_RMDIR == 1)) */

+

+

+#if REDCONF_API_POSIX == 1

+/** @brief Look up the inode number of a file or directory.

+

+    @param ulPInode The inode number of the parent directory.

+    @param pszName  The null-terminated name of the file or directory to look

+                    up.

+    @param pulInode On successful return, populated with the inode number named

+                    by @p pszName.

+

+    @return A negated ::REDSTATUS code indicating the operation result.

+

+    @retval 0               Operation was successful.

+    @retval -RED_EBADF      @p ulPInode is not a valid inode.

+    @retval -RED_EINVAL     The volume is not mounted; @p pszName is `NULL`; or

+                            @p pulInode is `NULL`.

+    @retval -RED_EIO        A disk I/O error occurred.

+    @retval -RED_ENOENT     @p pszName does not name an existing file or directory.

+    @retval -RED_ENOTDIR    @p ulPInode is not a directory.

+*/

+REDSTATUS RedCoreLookup(

+    uint32_t    ulPInode,

+    const char *pszName,

+    uint32_t   *pulInode)

+{

+    REDSTATUS   ret;

+

+    if((pulInode == NULL) || !gpRedVolume->fMounted)

+    {

+        ret = -RED_EINVAL;

+    }

+    else

+    {

+        CINODE ino;

+

+        ino.ulInode = ulPInode;

+        ret = RedInodeMount(&ino, FTYPE_DIR, false);

+

+        if(ret == 0)

+        {

+            ret = RedDirEntryLookup(&ino, pszName, NULL, pulInode);

+

+            RedInodePut(&ino, 0U);

+        }

+    }

+

+    return ret;

+}

+#endif /* REDCONF_API_POSIX == 1 */

+

+

+#if (REDCONF_READ_ONLY == 0) && (REDCONF_API_POSIX == 1) && (REDCONF_API_POSIX_RENAME == 1)

+/** @brief Rename a file or directory.

+

+    If @p pszDstName names an existing file or directory, the behavior depends

+    on the configuration.  If #REDCONF_RENAME_ATOMIC is false, and if the

+    destination name exists, this function always fails with -RED_EEXIST.

+

+    If #REDCONF_RENAME_ATOMIC is true, and if the new name exists, then in one

+    atomic operation, the destination name is unlinked and the source name is

+    renamed to the destination name.  Both names must be of the same type (both

+    files or both directories).  As with RedCoreUnlink(), if the destination

+    name is a directory, it must be empty.  The major exception to this

+    behavior is that if both names are links to the same inode, then the rename

+    does nothing and both names continue to exist.

+

+    If the rename deletes the old destination, it may free data in the

+    committed state, which will not return to free space until after a

+    transaction point.  Similarly, if the deleted inode was part of the

+    committed state, the inode slot will not be available until after a

+    transaction point.

+

+    @param ulSrcPInode  The inode number of the parent directory of the file or

+                        directory to rename.

+    @param pszSrcName   The name of the file or directory to rename.

+    @param ulDstPInode  The new parent directory inode number of the file or

+                        directory after the rename.

+    @param pszNewPath   The new name of the file or directory after the rename.

+

+    @return A negated ::REDSTATUS code indicating the operation result.

+

+    @retval 0                   Operation was successful.

+    @retval -RED_EBADF          @p ulSrcPInode is not a valid inode number; or

+                                @p ulDstPInode is not a valid inode number.

+    @retval -RED_EEXIST         #REDCONF_RENAME_POSIX is false and the

+                                destination name exists.

+    @retval -RED_EINVAL         The volume is not mounted; @p pszSrcName is

+                                `NULL`; or @p pszDstName is `NULL`.

+    @retval -RED_EIO            A disk I/O error occurred.

+    @retval -RED_EISDIR         The destination name exists and is a directory,

+                                and the source name is a non-directory.

+    @retval -RED_ENAMETOOLONG   Either @p pszSrcName or @p pszDstName is longer

+                                than #REDCONF_NAME_MAX.

+    @retval -RED_ENOENT         The source name is not an existing entry; or

+                                either @p pszSrcName or @p pszDstName point to

+                                an empty string.

+    @retval -RED_ENOTDIR        @p ulSrcPInode is not a directory; or

+                                @p ulDstPInode is not a directory; or the source

+                                name is a directory and the destination name is

+                                a file.

+    @retval -RED_ENOTEMPTY      The destination name is a directory which is not

+                                empty.

+    @retval -RED_ENOSPC         The file system does not have enough space to

+                                extend the @p ulDstPInode directory.

+    @retval -RED_EROFS          The directory to be removed resides on a

+                                read-only file system.

+*/

+REDSTATUS RedCoreRename(

+    uint32_t    ulSrcPInode,

+    const char *pszSrcName,

+    uint32_t    ulDstPInode,

+    const char *pszDstName)

+{

+    REDSTATUS   ret;

+

+    if(!gpRedVolume->fMounted)

+    {

+        ret = -RED_EINVAL;

+    }

+    else if(gpRedVolume->fReadOnly)

+    {

+        ret = -RED_EROFS;

+    }

+    else

+    {

+        ret = CoreRename(ulSrcPInode, pszSrcName, ulDstPInode, pszDstName);

+

+        if(    (ret == -RED_ENOSPC)

+            && ((gpRedVolume->ulTransMask & RED_TRANSACT_VOLFULL) != 0U)

+            && (gpRedCoreVol->ulAlmostFreeBlocks > 0U))

+        {

+            ret = RedVolTransact();

+

+            if(ret == 0)

+            {

+                ret = CoreRename(ulSrcPInode, pszSrcName, ulDstPInode, pszDstName);

+            }

+        }

+

+        if((ret == 0) && ((gpRedVolume->ulTransMask & RED_TRANSACT_RENAME) != 0U))

+        {

+            ret = RedVolTransact();

+        }

+    }

+

+    return ret;

+}

+

+

+/** @brief Rename a file or directory.

+

+    @param ulSrcPInode  The inode number of the parent directory of the file or

+                        directory to rename.

+    @param pszSrcName   The name of the file or directory to rename.

+    @param ulDstPInode  The new parent directory inode number of the file or

+                        directory after the rename.

+    @param pszNewPath   The new name of the file or directory after the rename.

+

+    @return A negated ::REDSTATUS code indicating the operation result.

+

+    @retval 0                   Operation was successful.

+    @retval -RED_EBADF          @p ulSrcPInode is not a valid inode number; or

+                                @p ulDstPInode is not a valid inode number.

+    @retval -RED_EEXIST         #REDCONF_RENAME_POSIX is false and the

+                                destination name exists.

+    @retval -RED_EIO            A disk I/O error occurred.

+    @retval -RED_EISDIR         The destination name exists and is a directory,

+                                and the source name is a non-directory.

+    @retval -RED_ENAMETOOLONG   Either @p pszSrcName or @p pszDstName is longer

+                                than #REDCONF_NAME_MAX.

+    @retval -RED_ENOENT         The source name is not an existing entry; or

+                                either @p pszSrcName or @p pszDstName point to

+                                an empty string.

+    @retval -RED_ENOTDIR        @p ulSrcPInode is not a directory; or

+                                @p ulDstPInode is not a directory; or the source

+                                name is a directory and the destination name is

+                                a file.

+    @retval -RED_ENOTEMPTY      The destination name is a directory which is not

+                                empty.

+    @retval -RED_ENOSPC         The file system does not have enough space to

+                                extend the @p ulDstPInode directory.

+    @retval -RED_EROFS          The directory to be removed resides on a

+                                read-only file system.

+*/

+static REDSTATUS CoreRename(

+    uint32_t    ulSrcPInode,

+    const char *pszSrcName,

+    uint32_t    ulDstPInode,

+    const char *pszDstName)

+{

+    REDSTATUS   ret;

+

+    if(gpRedVolume->fReadOnly)

+    {

+        ret = -RED_EROFS;

+    }

+    else

+    {

+        bool    fUpdateTimestamps = false;

+        CINODE  SrcPInode;

+

+        SrcPInode.ulInode = ulSrcPInode;

+        ret = RedInodeMount(&SrcPInode, FTYPE_DIR, true);

+

+        if(ret == 0)

+        {

+            CINODE  DstPInode;

+            CINODE *pDstPInode;

+

+            if(ulSrcPInode == ulDstPInode)

+            {

+                pDstPInode = &SrcPInode;

+            }

+            else

+            {

+                pDstPInode = &DstPInode;

+                DstPInode.ulInode = ulDstPInode;

+                ret = RedInodeMount(pDstPInode, FTYPE_DIR, true);

+            }

+

+            if(ret == 0)

+            {

+                /*  Initialize these to zero so we can unconditionally put them,

+                    even if RedDirEntryRename() fails before mounting them.

+                */

+                CINODE SrcInode = {0U};

+                CINODE DstInode = {0U};

+

+                ret = RedDirEntryRename(&SrcPInode, pszSrcName, &SrcInode, pDstPInode, pszDstName, &DstInode);

+

+              #if REDCONF_RENAME_ATOMIC == 1

+                if((ret == 0) && (DstInode.ulInode != INODE_INVALID) && (DstInode.ulInode != SrcInode.ulInode))

+                {

+                    /*  If the inode is deleted, buffers are needed to read all

+                        of the indirects and free the data blocks.  Before doing

+                        that, to reduce the minimum number of buffers needed to

+                        complete the rename, release parent directory inode

+                        buffers which are no longer needed.

+                    */

+                    RedInodePutCoord(&SrcPInode);

+                    RedInodePutCoord(pDstPInode);

+

+                    ret = RedInodeLinkDec(&DstInode);

+                    CRITICAL_ASSERT(ret == 0);

+                }

+

+                if((ret == 0) && (DstInode.ulInode != SrcInode.ulInode))

+              #else

+                if(ret == 0)

+              #endif

+                {

+                    fUpdateTimestamps = true;

+                }

+

+              #if REDCONF_RENAME_ATOMIC == 1

+                RedInodePut(&DstInode, 0U);

+              #endif

+

+                /*  POSIX says updating ctime for the source inode is optional,

+                    but searching around it looks like this is common for Linux

+                    and other Unix file systems.

+                */

+                RedInodePut(&SrcInode, fUpdateTimestamps ? IPUT_UPDATE_CTIME : 0U);

+                RedInodePut(pDstPInode, fUpdateTimestamps ? (uint8_t)(IPUT_UPDATE_MTIME | IPUT_UPDATE_CTIME) : 0U);

+            }

+        }

+

+        RedInodePut(&SrcPInode, fUpdateTimestamps ? (uint8_t)(IPUT_UPDATE_MTIME | IPUT_UPDATE_CTIME) : 0U);

+    }

+

+    return ret;

+}

+#endif /* (REDCONF_READ_ONLY == 0) && (REDCONF_API_POSIX == 1) && (REDCONF_API_POSIX_RENAME == 1) */

+

+

+#if REDCONF_API_POSIX == 1

+/** @brief Get the status of a file or directory.

+

+    See the ::REDSTAT type for the details of the information returned.

+

+    @param ulInode  The inode number of the file or directory whose information

+                    is to be retrieved.

+    @param pStat    Pointer to a ::REDSTAT buffer to populate.

+

+    @return A negated ::REDSTATUS code indicating the operation result.

+

+    @retval 0           Operation was successful.

+    @retval -RED_EBADF  @p ulInode is not a valid inode.

+    @retval -RED_EINVAL The volume is not mounted; @p pStat is `NULL`.

+    @retval -RED_EIO    A disk I/O error occurred.

+*/

+REDSTATUS RedCoreStat(

+    uint32_t    ulInode,

+    REDSTAT    *pStat)

+{

+    REDSTATUS   ret;

+

+    if(!gpRedVolume->fMounted || (pStat == NULL))

+    {

+        ret = -RED_EINVAL;

+    }

+    else

+    {

+        CINODE ino;

+

+        ino.ulInode = ulInode;

+        ret = RedInodeMount(&ino, FTYPE_EITHER, false);

+        if(ret == 0)

+        {

+            RedMemSet(pStat, 0U, sizeof(*pStat));

+

+            pStat->st_dev = gbRedVolNum;

+            pStat->st_ino = ulInode;

+            pStat->st_mode = ino.pInodeBuf->uMode;

+          #if REDCONF_API_POSIX_LINK == 1

+            pStat->st_nlink = ino.pInodeBuf->uNLink;

+          #else

+            pStat->st_nlink = 1U;

+          #endif

+            pStat->st_size = ino.pInodeBuf->ullSize;

+          #if REDCONF_INODE_TIMESTAMPS == 1

+            pStat->st_atime = ino.pInodeBuf->ulATime;

+            pStat->st_mtime = ino.pInodeBuf->ulMTime;

+            pStat->st_ctime = ino.pInodeBuf->ulCTime;

+          #endif

+          #if REDCONF_INODE_BLOCKS == 1

+            pStat->st_blocks = ino.pInodeBuf->ulBlocks;

+          #endif

+

+            RedInodePut(&ino, 0U);

+        }

+    }

+

+    return ret;

+}

+#endif /* REDCONF_API_POSIX == 1 */

+

+

+#if REDCONF_API_FSE == 1

+/** @brief Get the size of a file.

+

+    @param ulInode  The inode number of the file whose size is to be retrieved.

+    @param pullSize On successful exit, populated with the file size.

+

+    @return A negated ::REDSTATUS code indicating the operation result.

+

+    @retval 0           Operation was successful.

+    @retval -RED_EBADF  @p ulInode is not a valid inode.

+    @retval -RED_EINVAL The volume is not mounted; @p pullSize is `NULL`.

+    @retval -RED_EIO    A disk I/O error occurred.

+    @retval -RED_EISDIR @p ulInode is a directory inode.

+*/

+REDSTATUS RedCoreFileSizeGet(

+    uint32_t    ulInode,

+    uint64_t   *pullSize)

+{

+    REDSTATUS   ret;

+

+    if(!gpRedVolume->fMounted || (pullSize == NULL))

+    {

+        ret = -RED_EINVAL;

+    }

+    else

+    {

+        CINODE ino;

+

+        ino.ulInode = ulInode;

+        ret = RedInodeMount(&ino, FTYPE_FILE, false);

+        if(ret == 0)

+        {

+            *pullSize = ino.pInodeBuf->ullSize;

+

+            RedInodePut(&ino, 0U);

+        }

+    }

+

+    return ret;

+}

+#endif /* REDCONF_API_FSE == 1 */

+

+

+/** @brief Read from a file.

+

+    Data which has not yet been written, but which is before the end-of-file

+    (sparse data), shall read as zeroes.  A short read -- where the number of

+    bytes read is less than requested -- indicates that the requested read was

+    partially or, if zero bytes were read, entirely beyond the end-of-file.

+

+    If @p ullStart is at or beyond the maximum file size, it is treated like

+    any other read entirely beyond the end-of-file: no data is read and

+    @p pulLen is populated with zero.

+

+    @param ulInode  The inode number of the file to read.

+    @param ullStart The file offset to read from.

+    @param pulLen   On entry, contains the number of bytes to read; on

+                    successful exit, contains the number of bytes actually

+                    read.

+    @param pBuffer  The buffer to populate with the data read.  Must be big

+                    enough for the read request.

+

+    @return A negated ::REDSTATUS code indicating the operation result.

+

+    @retval 0           Operation was successful.

+    @retval -RED_EBADF  @p ulInode is not a valid inode number.

+    @retval -RED_EINVAL The volume is not mounted; or @p pBuffer is `NULL`.

+    @retval -RED_EIO    A disk I/O error occurred.

+    @retval -RED_EISDIR The inode is a directory inode.

+*/

+REDSTATUS RedCoreFileRead(

+    uint32_t    ulInode,

+    uint64_t    ullStart,

+    uint32_t   *pulLen,

+    void       *pBuffer)

+{

+    REDSTATUS   ret;

+

+    if(!gpRedVolume->fMounted || (pulLen == NULL))

+    {

+        ret = -RED_EINVAL;

+    }

+    else

+    {

+      #if (REDCONF_ATIME == 1) && (REDCONF_READ_ONLY == 0)

+        bool    fUpdateAtime = (*pulLen > 0U) && !gpRedVolume->fReadOnly;

+      #else

+        bool    fUpdateAtime = false;

+      #endif

+        CINODE  ino;

+

+        ino.ulInode = ulInode;

+        ret = RedInodeMount(&ino, FTYPE_FILE, fUpdateAtime);

+        if(ret == 0)

+        {

+            ret = RedInodeDataRead(&ino, ullStart, pulLen, pBuffer);

+

+          #if (REDCONF_ATIME == 1) && (REDCONF_READ_ONLY == 0)

+            RedInodePut(&ino, ((ret == 0) && fUpdateAtime) ? IPUT_UPDATE_ATIME : 0U);

+          #else

+            RedInodePut(&ino, 0U);

+          #endif

+        }

+    }

+

+    return ret;

+}

+

+

+#if REDCONF_READ_ONLY == 0

+/** @brief Write to a file.

+

+    If the write extends beyond the end-of-file, the file size will be

+    increased.

+

+    A short write -- where the number of bytes written is less than requested

+    -- indicates either that the file system ran out of space but was still

+    able to write some of the request; or that the request would have caused

+    the file to exceed the maximum file size, but some of the data could be

+    written prior to the file size limit.

+

+    If an error is returned, either none of the data was written or a critical

+    error occurred (like an I/O error) and the file system volume will be

+    read-only.

+

+    @param ulInode  The file number of the file to write.

+    @param ullStart The file offset to write at.

+    @param pulLen   On entry, the number of bytes to write; on successful exit,

+                    the number of bytes actually written.

+    @param pBuffer  The buffer containing the data to be written.  Must big

+                    enough for the write request.

+

+    @return A negated ::REDSTATUS code indicating the operation result.

+

+    @retval 0           Operation was successful.

+    @retval -RED_EBADF  @p ulInode is not a valid file number.

+    @retval -RED_EFBIG  No data can be written to the given file offset since

+                        the resulting file size would exceed the maximum file

+                        size.

+    @retval -RED_EINVAL The volume is not mounted; or @p pBuffer is `NULL`.

+    @retval -RED_EIO    A disk I/O error occurred.

+    @retval -RED_EISDIR The inode is a directory inode.

+    @retval -RED_ENOSPC No data can be written because there is insufficient

+                        free space.

+    @retval -RED_EROFS  The file system volume is read-only.

+*/

+REDSTATUS RedCoreFileWrite(

+    uint32_t    ulInode,

+    uint64_t    ullStart,

+    uint32_t   *pulLen,

+    const void *pBuffer)

+{

+    REDSTATUS   ret;

+

+    if(!gpRedVolume->fMounted)

+    {

+        ret = -RED_EINVAL;

+    }

+    else if(gpRedVolume->fReadOnly)

+    {

+        ret = -RED_EROFS;

+    }

+    else

+    {

+        ret = CoreFileWrite(ulInode, ullStart, pulLen, pBuffer);

+

+        if(    (ret == -RED_ENOSPC)

+            && ((gpRedVolume->ulTransMask & RED_TRANSACT_VOLFULL) != 0U)

+            && (gpRedCoreVol->ulAlmostFreeBlocks > 0U))

+        {

+            ret = RedVolTransact();

+

+            if(ret == 0)

+            {

+                ret = CoreFileWrite(ulInode, ullStart, pulLen, pBuffer);

+            }

+        }

+

+        if((ret == 0) && ((gpRedVolume->ulTransMask & RED_TRANSACT_WRITE) != 0U))

+        {

+            ret = RedVolTransact();

+        }

+    }

+

+    return ret;

+}

+

+

+/** @brief Write to a file.

+

+    @param ulInode  The file number of the file to write.

+    @param ullStart The file offset to write at.

+    @param pulLen   On entry, the number of bytes to write; on successful exit,

+                    the number of bytes actually written.

+    @param pBuffer  The buffer containing the data to be written.  Must big

+                    enough for the write request.

+

+    @return A negated ::REDSTATUS code indicating the operation result.

+

+    @retval 0           Operation was successful.

+    @retval -RED_EBADF  @p ulInode is not a valid file number.

+    @retval -RED_EFBIG  No data can be written to the given file offset since

+                        the resulting file size would exceed the maximum file

+                        size.

+    @retval -RED_EIO    A disk I/O error occurred.

+    @retval -RED_EISDIR The inode is a directory inode.

+    @retval -RED_ENOSPC No data can be written because there is insufficient

+                        free space.

+    @retval -RED_EROFS  The file system volume is read-only.

+*/

+static REDSTATUS CoreFileWrite(

+    uint32_t    ulInode,

+    uint64_t    ullStart,

+    uint32_t   *pulLen,

+    const void *pBuffer)

+{

+    REDSTATUS   ret;

+

+    if(gpRedVolume->fReadOnly)

+    {

+        ret = -RED_EROFS;

+    }

+    else

+    {

+        CINODE ino;

+

+        ino.ulInode = ulInode;

+        ret = RedInodeMount(&ino, FTYPE_FILE, true);

+        if(ret == 0)

+        {

+            ret = RedInodeDataWrite(&ino, ullStart, pulLen, pBuffer);

+

+            RedInodePut(&ino, (ret == 0) ? (uint8_t)(IPUT_UPDATE_MTIME | IPUT_UPDATE_CTIME) : 0U);

+        }

+    }

+

+    return ret;

+}

+#endif /* REDCONF_READ_ONLY == 0 */

+

+

+#if TRUNCATE_SUPPORTED

+/** @brief Set the file size.

+

+    Allows the file size to be increased, decreased, or to remain the same.  If

+    the file size is increased, the new area is sparse (will read as zeroes).

+    If the file size is decreased, the data beyond the new end-of-file will

+    return to free space once it is no longer part of the committed state

+    (either immediately or after the next transaction point).

+

+    @param ulInode  The inode of the file to truncate.

+    @param ullSize  The new file size, in bytes.

+

+    @return A negated ::REDSTATUS code indicating the operation result.

+

+    @retval 0           Operation was successful.

+    @retval -RED_EBADF  @p ulInode is not a valid inode number.

+    @retval -RED_EFBIG  @p ullSize exceeds the maximum file size.

+    @retval -RED_EINVAL The volume is not mounted.

+    @retval -RED_EIO    A disk I/O error occurred.

+    @retval -RED_EISDIR The inode is a directory inode.

+    @retval -RED_ENOSPC Insufficient free space to perform the truncate.

+    @retval -RED_EROFS  The file system volume is read-only.

+*/

+REDSTATUS RedCoreFileTruncate(

+    uint32_t    ulInode,

+    uint64_t    ullSize)

+{

+    REDSTATUS   ret;

+

+    if(!gpRedVolume->fMounted)

+    {

+        ret = -RED_EINVAL;

+    }

+    else if(gpRedVolume->fReadOnly)

+    {

+        ret = -RED_EROFS;

+    }

+    else

+    {

+        ret = CoreFileTruncate(ulInode, ullSize);

+

+        if(    (ret == -RED_ENOSPC)

+            && ((gpRedVolume->ulTransMask & RED_TRANSACT_VOLFULL) != 0U)

+            && (gpRedCoreVol->ulAlmostFreeBlocks > 0U))

+        {

+            ret = RedVolTransact();

+

+            if(ret == 0)

+            {

+                ret = CoreFileTruncate(ulInode, ullSize);

+            }

+        }

+

+        if((ret == 0) && ((gpRedVolume->ulTransMask & RED_TRANSACT_TRUNCATE) != 0U))

+        {

+            ret = RedVolTransact();

+        }

+    }

+

+    return ret;

+}

+

+

+/** @brief Set the file size.

+

+    @param ulInode  The inode of the file to truncate.

+    @param ullSize  The new file size, in bytes.

+

+    @return A negated ::REDSTATUS code indicating the operation result.

+

+    @retval 0           Operation was successful.

+    @retval -RED_EBADF  @p ulInode is not a valid inode number.

+    @retval -RED_EFBIG  @p ullSize exceeds the maximum file size.

+    @retval -RED_EIO    A disk I/O error occurred.

+    @retval -RED_EISDIR The inode is a directory inode.

+    @retval -RED_ENOSPC Insufficient free space to perform the truncate.

+    @retval -RED_EROFS  The file system volume is read-only.

+*/

+static REDSTATUS CoreFileTruncate(

+    uint32_t    ulInode,

+    uint64_t    ullSize)

+{

+    REDSTATUS   ret;

+

+    if(gpRedVolume->fReadOnly)

+    {

+        ret = -RED_EROFS;

+    }

+    else

+    {

+        CINODE      ino;

+

+        ino.ulInode = ulInode;

+        ret = RedInodeMount(&ino, FTYPE_FILE, true);

+        if(ret == 0)

+        {

+          #if RESERVED_BLOCKS > 0U

+            gpRedCoreVol->fUseReservedBlocks = (ullSize < ino.pInodeBuf->ullSize);

+          #endif

+

+            ret = RedInodeDataTruncate(&ino, ullSize);

+

+          #if RESERVED_BLOCKS > 0U

+            gpRedCoreVol->fUseReservedBlocks = false;

+          #endif

+

+            RedInodePut(&ino, (ret == 0) ? (uint8_t)(IPUT_UPDATE_MTIME | IPUT_UPDATE_CTIME) : 0U);

+        }

+    }

+

+    return ret;

+}

+#endif /* TRUNCATE_SUPPORTED */

+

+

+#if (REDCONF_API_POSIX == 1) && (REDCONF_API_POSIX_READDIR == 1)

+/** @brief Read from a directory.

+

+    If files are added to the directory after it is opened, the new files may

+    or may not be returned by this function.  If files are deleted, the deleted

+    files will not be returned.

+

+    @param ulInode  The directory inode to read from.

+    @param pulPos   A token which stores the position within the directory.  To

+                    read from the beginning of the directory, populate with

+                    zero.

+    @param pszName  Pointer to a buffer which must be big enough to store a

+                    maximum size name, including a null terminator.  On

+                    successful exit, populated with the name of the next

+                    directory entry.

+    @param pulInode On successful return, populated with the inode number of the

+                    next directory entry.

+

+    @return A negated ::REDSTATUS code indicating the operation result.

+

+    @retval 0               Operation was successful.

+    @retval -RED_EBADF      @p ulInode is not a valid inode number.

+    @retval -RED_EINVAL     The volume is not mounted.

+    @retval -RED_EIO        A disk I/O error occurred.

+    @retval -RED_ENOENT     There are no more entries in the directory.

+    @retval -RED_ENOTDIR    @p ulInode refers to a file.

+*/

+REDSTATUS RedCoreDirRead(

+    uint32_t    ulInode,

+    uint32_t   *pulPos,

+    char       *pszName,

+    uint32_t   *pulInode)

+{

+    REDSTATUS   ret;

+

+    if(!gpRedVolume->fMounted)

+    {

+        ret = -RED_EINVAL;

+    }

+    else

+    {

+        CINODE ino;

+

+        ino.ulInode = ulInode;

+        ret = RedInodeMount(&ino, FTYPE_DIR, false);

+

+        if(ret == 0)

+        {

+            ret = RedDirEntryRead(&ino, pulPos, pszName, pulInode);

+

+          #if (REDCONF_ATIME == 1) && (REDCONF_READ_ONLY == 0)

+            if((ret == 0) && !gpRedVolume->fReadOnly)

+            {

+                ret = RedInodeBranch(&ino);

+            }

+

+            RedInodePut(&ino, ((ret == 0) && !gpRedVolume->fReadOnly) ? IPUT_UPDATE_ATIME : 0U);

+          #else

+            RedInodePut(&ino, 0U);

+          #endif

+        }

+    }

+

+    return ret;

+}

+#endif /* (REDCONF_API_POSIX == 1) && (REDCONF_API_POSIX_READDIR == 1) */

+

diff --git a/FreeRTOS-Plus/Source/Reliance-Edge/core/driver/dir.c b/FreeRTOS-Plus/Source/Reliance-Edge/core/driver/dir.c
new file mode 100644
index 0000000..66b5072
--- /dev/null
+++ b/FreeRTOS-Plus/Source/Reliance-Edge/core/driver/dir.c
@@ -0,0 +1,950 @@
+/*             ----> DO NOT REMOVE THE FOLLOWING NOTICE <----

+

+                   Copyright (c) 2014-2015 Datalight, Inc.

+                       All Rights Reserved Worldwide.

+

+    This program is free software; you can redistribute it and/or modify

+    it under the terms of the GNU General Public License as published by

+    the Free Software Foundation; use version 2 of the License.

+

+    This program is distributed in the hope that it will be useful,

+    but "AS-IS," WITHOUT ANY WARRANTY; without even the implied warranty

+    of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the

+    GNU General Public License for more details.

+

+    You should have received a copy of the GNU General Public License along

+    with this program; if not, write to the Free Software Foundation, Inc.,

+    51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.

+*/

+/*  Businesses and individuals that for commercial or other reasons cannot

+    comply with the terms of the GPLv2 license may obtain a commercial license

+    before incorporating Reliance Edge into proprietary software for

+    distribution in any form.  Visit http://www.datalight.com/reliance-edge for

+    more information.

+*/

+/** @file

+    @brief Implements directory operations.

+*/

+#include <redfs.h>

+

+#if REDCONF_API_POSIX == 1

+

+#include <redcore.h>

+

+

+#define DIR_INDEX_INVALID   UINT32_MAX

+

+#if (REDCONF_NAME_MAX % 4U) != 0U

+#define DIRENT_PADDING      (4U - (REDCONF_NAME_MAX % 4U))

+#else

+#define DIRENT_PADDING      (0U)

+#endif

+#define DIRENT_SIZE         (4U + REDCONF_NAME_MAX + DIRENT_PADDING)

+#define DIRENTS_PER_BLOCK   (REDCONF_BLOCK_SIZE / DIRENT_SIZE)

+#define DIRENTS_MAX         (uint32_t)REDMIN(UINT32_MAX, UINT64_SUFFIX(1) * INODE_DATA_BLOCKS * DIRENTS_PER_BLOCK)

+

+

+/** @brief On-disk directory entry.

+*/

+typedef struct

+{

+    /** The inode number that the directory entry points at.  If the directory

+        entry is available, this holds INODE_INVALID.

+    */

+    uint32_t    ulInode;

+

+    /** The name of the directory entry.  For names shorter than

+        REDCONF_NAME_MAX, unused bytes in the array are zeroed.  For names of

+        the maximum length, the string is not null terminated.

+    */

+    char        acName[REDCONF_NAME_MAX];

+

+  #if DIRENT_PADDING > 0U

+    /** Unused padding so that ulInode is always aligned on a four-byte

+        boundary.

+    */

+    uint8_t     abPadding[DIRENT_PADDING];

+  #endif

+} DIRENT;

+

+

+#if (REDCONF_READ_ONLY == 0) && (REDCONF_API_POSIX_RENAME == 1)

+static REDSTATUS DirCyclicRenameCheck(uint32_t ulSrcInode, const CINODE *pDstPInode);

+#endif

+#if REDCONF_READ_ONLY == 0

+static REDSTATUS DirEntryWrite(CINODE *pPInode, uint32_t ulIdx, uint32_t ulInode, const char *pszName, uint32_t ulNameLen);

+static uint64_t DirEntryIndexToOffset(uint32_t ulIdx);

+#endif

+static uint32_t DirOffsetToEntryIndex(uint64_t ullOffset);

+

+

+#if REDCONF_READ_ONLY == 0

+/** @brief Create a new entry in a directory.

+

+    @param pPInode      A pointer to the cached inode structure of the directory

+                        to which the new entry will be added.

+    @param pszName      The name to be given to the new entry, terminated by a

+                        null or a path separator.

+    @param ulInode      The inode number the new name will point at.

+

+    @return A negated ::REDSTATUS code indicating the operation result.

+

+    @retval 0                   Operation was successful.

+    @retval -RED_EIO            A disk I/O error occurred.

+    @retval -RED_ENOSPC         There is not enough space on the volume to

+                                create the new directory entry; or the directory

+                                is full.

+    @retval -RED_ENOTDIR        @p pPInode is not a directory.

+    @retval -RED_ENAMETOOLONG   @p pszName is too long.

+    @retval -RED_EEXIST         @p pszName already exists in @p ulPInode.

+    @retval -RED_EINVAL         @p pPInode is not a mounted dirty cached inode

+                                structure; or @p pszName is not a valid name.

+*/

+REDSTATUS RedDirEntryCreate(

+    CINODE     *pPInode,

+    const char *pszName,

+    uint32_t    ulInode)

+{

+    REDSTATUS   ret;

+

+    if(!CINODE_IS_DIRTY(pPInode) || (pszName == NULL) || !INODE_IS_VALID(ulInode))

+    {

+        ret = -RED_EINVAL;

+    }

+    else if(!pPInode->fDirectory)

+    {

+        ret = -RED_ENOTDIR;

+    }

+    else

+    {

+        uint32_t ulNameLen = RedNameLen(pszName);

+

+        if(ulNameLen == 0U)

+        {

+            ret = -RED_EINVAL;

+        }

+        else if(ulNameLen > REDCONF_NAME_MAX)

+        {

+            ret = -RED_ENAMETOOLONG;

+        }

+        else

+        {

+            uint32_t ulEntryIdx;

+

+            ret = RedDirEntryLookup(pPInode, pszName, &ulEntryIdx, NULL);

+            if(ret == 0)

+            {

+                ret = -RED_EEXIST;

+            }

+            else if(ret == -RED_ENOENT)

+            {

+                if(ulEntryIdx == DIR_INDEX_INVALID)

+                {

+                    ret = -RED_ENOSPC;

+                }

+                else

+                {

+                    ret = 0;

+                }

+            }

+            else

+            {

+                /*  Unexpected error, no action.

+                */

+            }

+

+            if(ret == 0)

+            {

+                ret = DirEntryWrite(pPInode, ulEntryIdx, ulInode, pszName, ulNameLen);

+            }

+        }

+    }

+

+    return ret;

+}

+#endif /* REDCONF_READ_ONLY == 0 */

+

+

+#if DELETE_SUPPORTED

+/** @brief Delete an existing directory entry.

+

+    @param pPInode      A pointer to the cached inode structure of the directory

+                        containing the entry to be deleted.

+    @param ulDeleteIdx  Position within the directory of the entry to be

+                        deleted.

+

+    @return A negated ::REDSTATUS code indicating the operation result.

+

+    @retval 0               Operation was successful.

+    @retval -RED_EIO        A disk I/O error occurred.

+    @retval -RED_ENOSPC     The file system does not have enough space to modify

+                            the parent directory to perform the deletion.

+    @retval -RED_ENOTDIR    @p pPInode is not a directory.

+    @retval -RED_EINVAL     @p pPInode is not a mounted dirty cached inode

+                            structure; or @p ulIdx is out of range.

+*/

+REDSTATUS RedDirEntryDelete(

+    CINODE     *pPInode,

+    uint32_t    ulDeleteIdx)

+{

+    REDSTATUS   ret = 0;

+

+    if(!CINODE_IS_DIRTY(pPInode) || (ulDeleteIdx >= DIRENTS_MAX))

+    {

+        ret = -RED_EINVAL;

+    }

+    else if(!pPInode->fDirectory)

+    {

+        ret = -RED_ENOTDIR;

+    }

+    else if((DirEntryIndexToOffset(ulDeleteIdx) + DIRENT_SIZE) == pPInode->pInodeBuf->ullSize)

+    {

+        uint32_t ulTruncIdx = ulDeleteIdx;

+        bool     fDone = false;

+

+        /*  We are deleting the last dirent in the directory, so search

+            backwards to find the last populated dirent, allowing us to truncate

+            the directory to that point.

+        */

+        while((ret == 0) && (ulTruncIdx > 0U) && !fDone)

+        {

+            ret = RedInodeDataSeekAndRead(pPInode, ulTruncIdx / DIRENTS_PER_BLOCK);

+

+            if(ret == 0)

+            {

+                const DIRENT *pDirents = CAST_CONST_DIRENT_PTR(pPInode->pbData);

+                uint32_t      ulBlockIdx = (ulTruncIdx - 1U) % DIRENTS_PER_BLOCK;

+

+                do

+                {

+                    if(pDirents[ulBlockIdx].ulInode != INODE_INVALID)

+                    {

+                        fDone = true;

+                        break;

+                    }

+

+                    ulTruncIdx--;

+                    ulBlockIdx--;

+                } while(ulBlockIdx != UINT32_MAX);

+            }

+            else if(ret == -RED_ENODATA)

+            {

+                ret = 0;

+

+                REDASSERT((ulTruncIdx % DIRENTS_PER_BLOCK) == 0U);

+                ulTruncIdx -= DIRENTS_PER_BLOCK;

+            }

+            else

+            {

+                /*  Unexpected error, loop will terminate; nothing else

+                    to be done.

+                */

+            }

+        }

+

+        /*  Truncate the directory, deleting the requested entry and any empty

+            dirents at the end of the directory.

+        */

+        if(ret == 0)

+        {

+            ret = RedInodeDataTruncate(pPInode, DirEntryIndexToOffset(ulTruncIdx));

+        }

+    }

+    else

+    {

+        /*  The dirent to delete is not the last entry in the directory, so just

+            zero it.

+        */

+        ret = DirEntryWrite(pPInode, ulDeleteIdx, INODE_INVALID, "", 0U);

+    }

+

+    return ret;

+}

+#endif /* DELETE_SUPPORTED */

+

+

+/** @brief Perform a case-sensitive search of a directory for a given name.

+

+    If found, then position of the entry within the directory and the inode

+    number it points to are returned.  As an optimization for directory entry

+    creation, in the case where the requested entry does not exist, the position

+    of the first available (unused) entry is returned.

+

+    @param pPInode      A pointer to the cached inode structure of the directory

+                        to search.

+    @param pszName      The name of the desired entry, terminated by either a

+                        null or a path separator.

+    @param pulEntryIdx  On successful return, meaning that the desired entry

+                        exists, populated with the position of the entry.  If

+                        returning an -RED_ENOENT error, populated with the

+                        position of the first available entry, or set to

+                        DIR_INDEX_INVALID if the directory is full.  Optional.

+    @param pulInode     On successful return, populated with the inode number

+                        that the name points to.  Optional; may be `NULL`.

+

+    @return A negated ::REDSTATUS code indicating the operation result.

+

+    @retval 0                   Operation was successful.

+    @retval -RED_EIO            A disk I/O error occurred.

+    @retval -RED_ENOENT         @p pszName does not name an existing file or

+                                directory.

+    @retval -RED_ENOTDIR        @p pPInode is not a directory.

+    @retval -RED_EINVAL         @p pPInode is not a mounted cached inode

+                                structure; or @p pszName is not a valid name; or

+                                @p pulEntryIdx is `NULL`.

+    @retval -RED_ENAMETOOLONG   @p pszName is too long.

+*/

+REDSTATUS RedDirEntryLookup(

+    CINODE     *pPInode,

+    const char *pszName,

+    uint32_t   *pulEntryIdx,

+    uint32_t   *pulInode)

+{

+    REDSTATUS   ret = 0;

+

+    if(!CINODE_IS_MOUNTED(pPInode) || (pszName == NULL))

+    {

+        ret = -RED_EINVAL;

+    }

+    else if(!pPInode->fDirectory)

+    {

+        ret = -RED_ENOTDIR;

+    }

+    else

+    {

+        uint32_t ulNameLen = RedNameLen(pszName);

+

+        if(ulNameLen == 0U)

+        {

+            ret = -RED_EINVAL;

+        }

+        else if(ulNameLen > REDCONF_NAME_MAX)

+        {

+            ret = -RED_ENAMETOOLONG;

+        }

+        else

+        {

+            uint32_t    ulIdx = 0U;

+            uint32_t    ulDirentCount = DirOffsetToEntryIndex(pPInode->pInodeBuf->ullSize);

+            uint32_t    ulFreeIdx = DIR_INDEX_INVALID;  /* Index of first free dirent. */

+

+            /*  Loop over the directory blocks, searching each block for a

+                dirent that matches the given name.

+            */

+            while((ret == 0) && (ulIdx < ulDirentCount))

+            {

+                ret = RedInodeDataSeekAndRead(pPInode, ulIdx / DIRENTS_PER_BLOCK);

+

+                if(ret == 0)

+                {

+                    const DIRENT *pDirents = CAST_CONST_DIRENT_PTR(pPInode->pbData);

+                    uint32_t      ulBlockLastIdx = REDMIN(DIRENTS_PER_BLOCK, ulDirentCount - ulIdx);

+                    uint32_t      ulBlockIdx;

+

+                    for(ulBlockIdx = 0U; ulBlockIdx < ulBlockLastIdx; ulBlockIdx++)

+                    {

+                        const DIRENT *pDirent = &pDirents[ulBlockIdx];

+

+                        if(pDirent->ulInode != INODE_INVALID)

+                        {

+                            /*  The name in the dirent will not be null

+                                terminated if it is of the maximum length, so

+                                use a bounded string compare and then make sure

+                                there is nothing more to the name.

+                            */

+                            if(    (RedStrNCmp(pDirent->acName, pszName, ulNameLen) == 0)

+                                && ((ulNameLen == REDCONF_NAME_MAX) || (pDirent->acName[ulNameLen] == '\0')))

+                            {

+                                /*  Found a matching dirent, stop and return its

+                                    information.

+                                */

+                                if(pulInode != NULL)

+                                {

+                                    *pulInode = pDirent->ulInode;

+

+                                  #ifdef REDCONF_ENDIAN_SWAP

+                                    *pulInode = RedRev32(*pulInode);

+                                  #endif

+                                }

+

+                                ulIdx += ulBlockIdx;

+                                break;

+                            }

+                        }

+                        else if(ulFreeIdx == DIR_INDEX_INVALID)

+                        {

+                            ulFreeIdx = ulIdx + ulBlockIdx;

+                        }

+                        else

+                        {

+                            /*  The directory entry is free, but we already found a free one, so there's

+                                nothing to do here.

+                            */

+                        }

+                    }

+

+                    if(ulBlockIdx < ulBlockLastIdx)

+                    {

+                        /*  If we broke out of the for loop, we found a matching

+                            dirent and can stop the search.

+                        */

+                        break;

+                    }

+

+                    ulIdx += ulBlockLastIdx;

+                }

+                else if(ret == -RED_ENODATA)

+                {

+                    if(ulFreeIdx == DIR_INDEX_INVALID)

+                    {

+                        ulFreeIdx = ulIdx;

+                    }

+

+                    ret = 0;

+                    ulIdx += DIRENTS_PER_BLOCK;

+                }

+                else

+                {

+                    /*  Unexpected error, let the loop terminate, no action

+                        here.

+                    */

+                }

+            }

+

+            if(ret == 0)

+            {

+                /*  If we made it all the way to the end of the directory

+                    without stopping, then the given name does not exist in the

+                    directory.

+                */

+                if(ulIdx == ulDirentCount)

+                {

+                    /*  If the directory had no sparse dirents, then the first

+                        free dirent is beyond the end of the directory.  If the

+                        directory is already the maximum size, then there is no

+                        free dirent.

+                    */

+                    if((ulFreeIdx == DIR_INDEX_INVALID) && (ulDirentCount < DIRENTS_MAX))

+                    {

+                        ulFreeIdx = ulDirentCount;

+                    }

+

+                    ulIdx = ulFreeIdx;

+

+                    ret = -RED_ENOENT;

+                }

+

+                if(pulEntryIdx != NULL)

+                {

+                    *pulEntryIdx = ulIdx;

+                }

+            }

+        }

+    }

+

+    return ret;

+}

+

+

+#if (REDCONF_API_POSIX_READDIR == 1) || (REDCONF_CHECKER == 1)

+/** @brief Read the next entry from a directory, given a starting index.

+

+    @param pInode   A pointer to the cached inode structure of the directory to

+                    read from.

+    @param pulIdx   On entry, the directory index to start reading from.  On

+                    successful return, populated with the directory index to use

+                    for subsequent reads.  On -RED_ENOENT return, populated with

+                    the directory index immediately following the last valid

+                    one.

+    @param pszName  On successful return, populated with the name of the next

+                    directory entry.  Buffer must be at least

+                    REDCONF_NAME_MAX + 1 in size, to store the maximum name

+                    length plus a null terminator.

+    @param pulInode On successful return, populated with the inode number

+                    pointed at by the next directory entry.

+

+    @return A negated ::REDSTATUS code indicating the operation result.

+

+    @retval 0               Operation was successful.

+    @retval -RED_EIO        A disk I/O error occurred.

+    @retval -RED_ENOENT     There are no more entries in the directory.

+    @retval -RED_ENOTDIR    @p pPInode is not a directory.

+    @retval -RED_EINVAL     @p pPInode is not a mounted cached inode structure;

+                            or @p pszName is `NULL`; or @p pulIdx is `NULL`; or

+                            @p pulInode is `NULL`.

+*/

+REDSTATUS RedDirEntryRead(

+    CINODE     *pPInode,

+    uint32_t   *pulIdx,

+    char       *pszName,

+    uint32_t   *pulInode)

+{

+    REDSTATUS   ret = 0;

+

+    if(!CINODE_IS_MOUNTED(pPInode) || (pulIdx == NULL) || (pszName == NULL) || (pulInode == NULL))

+    {

+        ret = -RED_EINVAL;

+    }

+    else if(!pPInode->fDirectory)

+    {

+        ret = -RED_ENOTDIR;

+    }

+    else

+    {

+        uint32_t ulIdx = *pulIdx;

+        uint32_t ulDirentCount = DirOffsetToEntryIndex(pPInode->pInodeBuf->ullSize);

+

+        /*  Starting either at the beginning of the directory or where we left

+            off, loop over the directory blocks, searching each block for a

+            non-sparse dirent to return as the next entry in the directory.

+        */

+        while((ret == 0) && (ulIdx < ulDirentCount))

+        {

+            uint32_t ulBlockOffset = ulIdx / DIRENTS_PER_BLOCK;

+

+            ret = RedInodeDataSeekAndRead(pPInode, ulBlockOffset);

+

+            if(ret == 0)

+            {

+                const DIRENT *pDirents = CAST_CONST_DIRENT_PTR(pPInode->pbData);

+                uint32_t      ulBlockLastIdx = REDMIN(DIRENTS_PER_BLOCK, ulDirentCount - (ulBlockOffset * DIRENTS_PER_BLOCK));

+                uint32_t      ulBlockIdx;

+

+                for(ulBlockIdx = ulIdx % DIRENTS_PER_BLOCK; ulBlockIdx < ulBlockLastIdx; ulBlockIdx++)

+                {

+                    if(pDirents[ulBlockIdx].ulInode != INODE_INVALID)

+                    {

+                        *pulIdx = ulIdx + 1U;

+                        RedStrNCpy(pszName, pDirents[ulBlockIdx].acName, REDCONF_NAME_MAX);

+                        pszName[REDCONF_NAME_MAX] = '\0';

+

+                        *pulInode = pDirents[ulBlockIdx].ulInode;

+

+                      #ifdef REDCONF_ENDIAN_SWAP

+                        *pulInode = RedRev32(*pulInode);

+                      #endif

+                        break;

+                    }

+

+                    ulIdx++;

+                }

+

+                if(ulBlockIdx < ulBlockLastIdx)

+                {

+                    REDASSERT(ulIdx <= ulDirentCount);

+                    break;

+                }

+            }

+            else if(ret == -RED_ENODATA)

+            {

+                ulIdx += DIRENTS_PER_BLOCK - (ulIdx % DIRENTS_PER_BLOCK);

+                ret = 0;

+            }

+            else

+            {

+                /*  Unexpected error, loop will terminate; nothing else to do.

+                */

+            }

+

+            REDASSERT(ulIdx <= ulDirentCount);

+        }

+

+        if((ret == 0) && (ulIdx >= ulDirentCount))

+        {

+            *pulIdx = ulDirentCount;

+            ret = -RED_ENOENT;

+        }

+    }

+

+    return ret;

+}

+#endif

+

+

+#if (REDCONF_READ_ONLY == 0) && (REDCONF_API_POSIX_RENAME == 1)

+/** Rename a directory entry.

+

+    @param pSrcPInode   The inode of the directory containing @p pszSrcName.

+    @param pszSrcName   The name of the directory entry to be renamed.

+    @param pSrcInode    On successful return, populated with the inode of the

+                        source entry.

+    @param pDstPInode   The inode of the directory in which @p pszDstName will

+                        be created or replaced.

+    @param pszDstName   The name of the directory entry to be created or

+                        replaced.

+    @param pDstInode    On successful return, if the destination previously

+                        existed, populated with the inode previously pointed to

+                        by the destination.  This may be the same as the source

+                        inode.  If the destination did not exist, populated with

+                        INODE_INVALID.

+

+    @return A negated ::REDSTATUS code indicating the operation result.

+

+    @retval 0                   Operation was successful.

+    @retval -RED_EEXIST         #REDCONF_RENAME_ATOMIC is false and the

+                                destination name exists.

+    @retval -RED_EINVAL         @p pSrcPInode is not a mounted dirty cached

+                                inode structure; or @p pSrcInode is `NULL`; or

+                                @p pszSrcName is not a valid name; or

+                                @p pDstPInode is not a mounted dirty cached

+                                inode structure; or @p pDstInode is `NULL`; or

+                                @p pszDstName is not a valid name.

+    @retval -RED_EIO            A disk I/O error occurred.

+    @retval -RED_EISDIR         The destination name exists and is a directory,

+                                and the source name is a non-directory.

+    @retval -RED_ENAMETOOLONG   Either @p pszSrcName or @p pszDstName is longer

+                                than #REDCONF_NAME_MAX.

+    @retval -RED_ENOENT         The source name is not an existing entry; or

+                                either @p pszSrcName or @p pszDstName point to

+                                an empty string.

+    @retval -RED_ENOTDIR        @p pSrcPInode is not a directory; or

+                                @p pDstPInode is not a directory; or the source

+                                name is a directory and the destination name is

+                                a file.

+    @retval -RED_ENOTEMPTY      The destination name is a directory which is not

+                                empty.

+    @retval -RED_ENOSPC         The file system does not have enough space to

+                                extend the @p ulDstPInode directory.

+    @retval -RED_EROFS          The directory to be removed resides on a

+                                read-only file system.

+*/

+REDSTATUS RedDirEntryRename(

+    CINODE     *pSrcPInode,

+    const char *pszSrcName,

+    CINODE     *pSrcInode,

+    CINODE     *pDstPInode,

+    const char *pszDstName,

+    CINODE     *pDstInode)

+{

+    REDSTATUS   ret;

+

+    if(    !CINODE_IS_DIRTY(pSrcPInode)

+        || (pszSrcName == NULL)

+        || (pSrcInode == NULL)

+        || !CINODE_IS_DIRTY(pDstPInode)

+        || (pszDstName == NULL)

+        || (pDstInode == NULL))

+    {

+        ret = -RED_EINVAL;

+    }

+    else if(!pSrcPInode->fDirectory || !pDstPInode->fDirectory)

+    {

+        ret = -RED_ENOTDIR;

+    }

+    else

+    {

+        uint32_t ulDstIdx = 0U; /* Init'd to quiet warnings. */

+        uint32_t ulSrcIdx;

+

+        /*  Look up the source and destination names.

+        */

+        ret = RedDirEntryLookup(pSrcPInode, pszSrcName, &ulSrcIdx, &pSrcInode->ulInode);

+

+        if(ret == 0)

+        {

+            ret = RedDirEntryLookup(pDstPInode, pszDstName, &ulDstIdx, &pDstInode->ulInode);

+

+            if(ret == -RED_ENOENT)

+            {

+                if(ulDstIdx == DIR_INDEX_INVALID)

+                {

+                    ret = -RED_ENOSPC;

+                }

+                else

+                {

+                  #if REDCONF_RENAME_ATOMIC == 1

+                    pDstInode->ulInode = INODE_INVALID;

+                  #endif

+                    ret = 0;

+                }

+            }

+          #if REDCONF_RENAME_ATOMIC == 0

+            else if(ret == 0)

+            {

+                ret = -RED_EEXIST;

+            }

+            else

+            {

+                /*  Nothing to do here, just propagate the error.

+                */

+            }

+          #endif

+        }

+

+      #if REDCONF_RENAME_ATOMIC == 1

+        /*  If both names point to the same inode, POSIX says to do nothing to

+            either name.

+        */

+        if((ret == 0) && (pSrcInode->ulInode != pDstInode->ulInode))

+      #else

+        if(ret == 0)

+      #endif

+        {

+            ret = RedInodeMount(pSrcInode, FTYPE_EITHER, true);

+

+          #if REDCONF_RENAME_ATOMIC == 1

+            if((ret == 0) && (pDstInode->ulInode != INODE_INVALID))

+            {

+                /*  Source and destination must be the same type (file/dir).

+                */

+                ret = RedInodeMount(pDstInode, pSrcInode->fDirectory ? FTYPE_DIR : FTYPE_FILE, true);

+

+                /*  If renaming directories, the destination must be empty.

+                */

+                if((ret == 0) && pDstInode->fDirectory && (pDstInode->pInodeBuf->ullSize > 0U))

+                {

+                    ret = -RED_ENOTEMPTY;

+                }

+            }

+          #endif

+

+            /*  If we are renaming a directory, make sure the rename isn't

+                cyclic (e.g., renaming "foo" into "foo/bar").

+            */

+            if((ret == 0) && pSrcInode->fDirectory)

+            {

+                ret = DirCyclicRenameCheck(pSrcInode->ulInode, pDstPInode);

+            }

+

+            if(ret == 0)

+            {

+                ret = DirEntryWrite(pDstPInode, ulDstIdx, pSrcInode->ulInode, pszDstName, RedNameLen(pszDstName));

+            }

+

+            if(ret == 0)

+            {

+                ret = RedDirEntryDelete(pSrcPInode, ulSrcIdx);

+

+                if(ret == -RED_ENOSPC)

+                {

+                    REDSTATUS ret2;

+

+                    /*  If there was not enough space to branch the parent

+                        directory inode and data block containin the source

+                        entry, revert destination directory entry to its

+                        previous state.

+                    */

+                  #if REDCONF_RENAME_ATOMIC == 1

+                    if(pDstInode->ulInode != INODE_INVALID)

+                    {

+                        ret2 = DirEntryWrite(pDstPInode, ulDstIdx, pDstInode->ulInode, pszDstName, RedNameLen(pszDstName));

+                    }

+                    else

+                  #endif

+                    {

+                        ret2 = RedDirEntryDelete(pDstPInode, ulDstIdx);

+                    }

+

+                    if(ret2 != 0)

+                    {

+                        ret = ret2;

+                        CRITICAL_ERROR();

+                    }

+                }

+            }

+

+            if(ret == 0)

+            {

+                pSrcInode->pInodeBuf->ulPInode = pDstPInode->ulInode;

+            }

+        }

+    }

+

+    return ret;

+}

+

+

+/** @brief Check for a cyclic rename.

+

+    A cyclic rename is renaming a directory into a subdirectory of itself.  For

+    example, renaming "a" into "a/b/c/d" is cyclic.  These renames must not be

+    allowed since they would corrupt the directory tree.

+

+    @param ulSrcInode   The inode number of the directory being renamed.

+    @param pDstPInode   A pointer to the cached inode structure of the directory

+                        into which the source is being renamed.

+

+    @return A negated ::REDSTATUS code indicating the operation result.

+

+    @retval 0               Operation was successful.

+    @retval -RED_EIO        A disk I/O error occurred.

+    @retval -RED_EINVAL     The rename is cyclic; or invalid parameters.

+    @retval -RED_ENOTDIR    @p pDstPInode is not a directory.

+*/

+static REDSTATUS DirCyclicRenameCheck(

+    uint32_t        ulSrcInode,

+    const CINODE   *pDstPInode)

+{

+    REDSTATUS       ret = 0;

+

+    if(!INODE_IS_VALID(ulSrcInode) || !CINODE_IS_MOUNTED(pDstPInode))

+    {

+        REDERROR();

+        ret = -RED_EINVAL;

+    }

+    else if(ulSrcInode == pDstPInode->ulInode)

+    {

+        ret = -RED_EINVAL;

+    }

+    else if(!pDstPInode->fDirectory)

+    {

+        ret = -RED_ENOTDIR;

+    }

+    else

+    {

+        CINODE NextParent;

+        /*  Used to prevent infinite loop in case of corrupted directory

+            structure.

+        */

+        uint32_t ulIteration = 0U;

+

+        NextParent.ulInode = pDstPInode->pInodeBuf->ulPInode;

+

+        while(     (NextParent.ulInode != ulSrcInode)

+                && (NextParent.ulInode != INODE_ROOTDIR)

+                && (NextParent.ulInode != INODE_INVALID)

+                && (ulIteration < gpRedVolConf->ulInodeCount))

+        {

+            ret = RedInodeMount(&NextParent, FTYPE_DIR, false);

+            if(ret != 0)

+            {

+                break;

+            }

+

+            NextParent.ulInode = NextParent.pInodeBuf->ulPInode;

+

+            RedInodePut(&NextParent, 0U);

+

+            ulIteration++;

+        }

+

+        if((ret == 0) && (ulIteration == gpRedVolConf->ulInodeCount))

+        {

+            CRITICAL_ERROR();

+            ret = -RED_EFUBAR;

+        }

+

+        if((ret == 0) && (ulSrcInode == NextParent.ulInode))

+        {

+            ret = -RED_EINVAL;

+        }

+    }

+

+    return ret;

+}

+#endif /* (REDCONF_READ_ONLY == 0) && (REDCONF_API_POSIX_RENAME == 1) */

+

+

+#if REDCONF_READ_ONLY == 0

+/** @brief Update the contents of a directory entry.

+

+    @param pPInode      A pointer to the cached inode structure of the directory

+                        whose entry is being written.

+    @param ulIdx        The index of the directory entry to write.

+    @param ulInode      The inode number the directory entry is to point at.

+    @param pszName      The name of the directory entry.

+    @param ulNameLen    The length of @p pszName.

+

+    @return A negated ::REDSTATUS code indicating the operation result.

+

+    @retval 0               Operation was successful.

+    @retval -RED_EIO        A disk I/O error occurred.

+    @retval -RED_ENOSPC     There is not enough space on the volume to write the

+                            directory entry.

+    @retval -RED_ENOTDIR    @p pPInode is not a directory.

+    @retval -RED_EINVAL     Invalid parameters.

+*/

+static REDSTATUS DirEntryWrite(

+    CINODE     *pPInode,

+    uint32_t    ulIdx,

+    uint32_t    ulInode,

+    const char *pszName,

+    uint32_t    ulNameLen)

+{

+    REDSTATUS   ret;

+

+    if(    !CINODE_IS_DIRTY(pPInode)

+        || (ulIdx >= DIRENTS_MAX)

+        || (!INODE_IS_VALID(ulInode) && (ulInode != INODE_INVALID))

+        || (pszName == NULL)

+        || (ulNameLen > REDCONF_NAME_MAX)

+        || ((ulNameLen == 0U) != (ulInode == INODE_INVALID)))

+    {

+        REDERROR();

+        ret = -RED_EINVAL;

+    }

+    else if(!pPInode->fDirectory)

+    {

+        ret = -RED_ENOTDIR;

+    }

+    else

+    {

+        uint64_t        ullOffset = DirEntryIndexToOffset(ulIdx);

+        uint32_t        ulLen = DIRENT_SIZE;

+        static DIRENT   de;

+

+        RedMemSet(&de, 0U, sizeof(de));

+

+        de.ulInode = ulInode;

+

+      #ifdef REDCONF_ENDIAN_SWAP

+        de.ulInode = RedRev32(de.ulInode);

+      #endif

+

+        RedStrNCpy(de.acName, pszName, ulNameLen);

+

+        ret = RedInodeDataWrite(pPInode, ullOffset, &ulLen, &de);

+    }

+

+    return ret;

+}

+

+

+/** @brief Convert a directory entry index to a byte offset.

+

+    @param ulIdx    Directory entry index.

+

+    @return Byte offset in the directory corresponding with ulIdx.

+*/

+static uint64_t DirEntryIndexToOffset(

+    uint32_t ulIdx)

+{

+    uint32_t ulBlock = ulIdx / DIRENTS_PER_BLOCK;

+    uint32_t ulOffsetInBlock = ulIdx % DIRENTS_PER_BLOCK;

+    uint64_t ullOffset;

+

+    REDASSERT(ulIdx < DIRENTS_MAX);

+

+    ullOffset = (uint64_t)ulBlock << BLOCK_SIZE_P2;

+    ullOffset += (uint64_t)ulOffsetInBlock * DIRENT_SIZE;

+

+    return ullOffset;

+}

+#endif /* REDCONF_READ_ONLY == 0 */

+

+

+/** @brief Convert a byte offset to a directory entry index.

+

+    @param ullOffset    Byte offset in the directory.

+

+    @return Directory entry index corresponding with @p ullOffset.

+*/

+static uint32_t DirOffsetToEntryIndex(

+    uint64_t ullOffset)

+{

+    uint32_t ulIdx;

+

+    REDASSERT(ullOffset < INODE_SIZE_MAX);

+    REDASSERT(((uint32_t)(ullOffset & (REDCONF_BLOCK_SIZE - 1U)) % DIRENT_SIZE) == 0U);

+

+    /*  Avoid doing any 64-bit divides.

+    */

+    ulIdx = (uint32_t)(ullOffset >> BLOCK_SIZE_P2) * DIRENTS_PER_BLOCK;

+    ulIdx += (uint32_t)(ullOffset & (REDCONF_BLOCK_SIZE - 1U)) / DIRENT_SIZE;

+

+    return ulIdx;

+}

+

+

+#endif /* REDCONF_API_POSIX == 1 */

+

diff --git a/FreeRTOS-Plus/Source/Reliance-Edge/core/driver/format.c b/FreeRTOS-Plus/Source/Reliance-Edge/core/driver/format.c
new file mode 100644
index 0000000..8fe8f14
--- /dev/null
+++ b/FreeRTOS-Plus/Source/Reliance-Edge/core/driver/format.c
@@ -0,0 +1,235 @@
+/*             ----> DO NOT REMOVE THE FOLLOWING NOTICE <----

+

+                   Copyright (c) 2014-2015 Datalight, Inc.

+                       All Rights Reserved Worldwide.

+

+    This program is free software; you can redistribute it and/or modify

+    it under the terms of the GNU General Public License as published by

+    the Free Software Foundation; use version 2 of the License.

+

+    This program is distributed in the hope that it will be useful,

+    but "AS-IS," WITHOUT ANY WARRANTY; without even the implied warranty

+    of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the

+    GNU General Public License for more details.

+

+    You should have received a copy of the GNU General Public License along

+    with this program; if not, write to the Free Software Foundation, Inc.,

+    51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.

+*/

+/*  Businesses and individuals that for commercial or other reasons cannot

+    comply with the terms of the GPLv2 license may obtain a commercial license

+    before incorporating Reliance Edge into proprietary software for

+    distribution in any form.  Visit http://www.datalight.com/reliance-edge for

+    more information.

+*/

+/** @file

+    @brief Implements the Reliance Edge file system formatter.

+*/

+#include <redfs.h>

+#include <redcoreapi.h>

+#include <redcore.h>

+

+#if FORMAT_SUPPORTED

+

+

+/** @brief Format a file system volume.

+

+    @return A negated ::REDSTATUS code indicating the operation result.

+

+    @retval 0           Operation was successful.

+    @retval -RED_EBUSY  Volume is mounted.

+    @retval -RED_EIO    A disk I/O error occurred.

+*/

+REDSTATUS RedVolFormat(void)

+{

+    REDSTATUS   ret;

+

+    if(gpRedVolume->fMounted)

+    {

+        ret = -RED_EBUSY;

+    }

+    else

+    {

+        ret = RedOsBDevOpen(gbRedVolNum, BDEV_O_RDWR);

+    }

+

+    if(ret == 0)

+    {

+        MASTERBLOCK    *pMB;

+        REDSTATUS       ret2;

+

+        /*  Overwrite the master block with zeroes, so that if formatting is

+            interrupted, the volume will not be mountable.

+        */

+        ret = RedBufferGet(BLOCK_NUM_MASTER, BFLAG_NEW | BFLAG_DIRTY, CAST_VOID_PTR_PTR(&pMB));

+

+        if(ret == 0)

+        {

+            ret = RedBufferFlush(BLOCK_NUM_MASTER, 1U);

+

+            RedBufferDiscard(pMB);

+        }

+

+        if(ret == 0)

+        {

+            ret = RedIoFlush(gbRedVolNum);

+        }

+

+      #if REDCONF_IMAP_EXTERNAL == 1

+        if((ret == 0) && !gpRedCoreVol->fImapInline)

+        {

+            uint32_t ulImapBlock;

+            uint32_t ulImapBlockLimit = gpRedCoreVol->ulImapStartBN + (gpRedCoreVol->ulImapNodeCount * 2U);

+            uint16_t uImapFlags = (uint16_t)((uint32_t)BFLAG_META_IMAP | BFLAG_NEW | BFLAG_DIRTY);

+

+            /*  Technically it is only necessary to create one copy of each imap

+                node (the copy the metaroot points at), but creating them both

+                avoids headaches during disk image analysis from stale imaps

+                left over from previous formats.

+            */

+            for(ulImapBlock = gpRedCoreVol->ulImapStartBN; ulImapBlock < ulImapBlockLimit; ulImapBlock++)

+            {

+                IMAPNODE   *pImap;

+

+                ret = RedBufferGet(ulImapBlock, uImapFlags, CAST_VOID_PTR_PTR(&pImap));

+                if(ret != 0)

+                {

+                    break;

+                }

+

+                RedBufferPut(pImap);

+            }

+        }

+      #endif

+

+        /*  Write the first metaroot.

+        */

+        if(ret == 0)

+        {

+            RedMemSet(gpRedMR, 0U, sizeof(*gpRedMR));

+

+            gpRedMR->ulFreeBlocks = gpRedVolume->ulBlocksAllocable;

+          #if REDCONF_API_POSIX == 1

+            gpRedMR->ulFreeInodes = gpRedVolConf->ulInodeCount;

+          #endif

+            gpRedMR->ulAllocNextBlock = gpRedCoreVol->ulFirstAllocableBN;

+

+            /*  The branched flag is typically set automatically when bits in

+                the imap change.  It is set here explicitly because the imap has

+                only been initialized, not changed.

+            */

+            gpRedCoreVol->fBranched = true;

+

+            ret = RedVolTransact();

+        }

+

+      #if REDCONF_API_POSIX == 1

+        /*  Create the root directory.

+        */

+        if(ret == 0)

+        {

+            CINODE rootdir;

+

+            rootdir.ulInode = INODE_ROOTDIR;

+            ret = RedInodeCreate(&rootdir, INODE_INVALID, RED_S_IFDIR);

+

+            if(ret == 0)

+            {

+                RedInodePut(&rootdir, 0U);

+            }

+        }

+      #endif

+

+      #if REDCONF_API_FSE == 1

+        /*  The FSE API does not support creating or deletes files, so all the

+            inodes are created during setup.

+        */

+        if(ret == 0)

+        {

+            uint32_t ulInodeIdx;

+

+            for(ulInodeIdx = 0U; ulInodeIdx < gpRedVolConf->ulInodeCount; ulInodeIdx++)

+            {

+                CINODE ino;

+

+                ino.ulInode = INODE_FIRST_FREE + ulInodeIdx;

+                ret = RedInodeCreate(&ino, INODE_INVALID, RED_S_IFREG);

+

+                if(ret == 0)

+                {

+                    RedInodePut(&ino, 0U);

+                }

+            }

+        }

+      #endif

+

+        /*  Write the second metaroot.

+        */

+        if(ret == 0)

+        {

+            ret = RedVolTransact();

+        }

+

+        /*  Populate and write out the master block.

+        */

+        if(ret == 0)

+        {

+            ret = RedBufferGet(BLOCK_NUM_MASTER, (uint16_t)((uint32_t)BFLAG_META_MASTER | BFLAG_NEW | BFLAG_DIRTY), CAST_VOID_PTR_PTR(&pMB));

+        }

+

+        if(ret == 0)

+        {

+            pMB->ulVersion = RED_DISK_LAYOUT_VERSION;

+            RedStrNCpy(pMB->acBuildNum, RED_BUILD_NUMBER, sizeof(pMB->acBuildNum));

+            pMB->ulFormatTime = RedOsClockGetTime();

+            pMB->ulInodeCount = gpRedVolConf->ulInodeCount;

+            pMB->ulBlockCount = gpRedVolume->ulBlockCount;

+            pMB->uMaxNameLen = REDCONF_NAME_MAX;

+            pMB->uDirectPointers = REDCONF_DIRECT_POINTERS;

+            pMB->uIndirectPointers = REDCONF_INDIRECT_POINTERS;

+            pMB->bBlockSizeP2 = BLOCK_SIZE_P2;

+

+          #if REDCONF_API_POSIX == 1

+            pMB->bFlags |= MBFLAG_API_POSIX;

+          #endif

+          #if REDCONF_INODE_TIMESTAMPS == 1

+            pMB->bFlags |= MBFLAG_INODE_TIMESTAMPS;

+          #endif

+          #if REDCONF_INODE_BLOCKS == 1

+            pMB->bFlags |= MBFLAG_INODE_BLOCKS;

+          #endif

+          #if (REDCONF_API_POSIX == 1) && (REDCONF_API_POSIX_LINK == 1)

+            pMB->bFlags |= MBFLAG_INODE_NLINK;

+          #endif

+

+            ret = RedBufferFlush(BLOCK_NUM_MASTER, 1U);

+

+            RedBufferPut(pMB);

+        }

+

+        if(ret == 0)

+        {

+            ret = RedIoFlush(gbRedVolNum);

+        }

+

+        ret2 = RedOsBDevClose(gbRedVolNum);

+        if(ret == 0)

+        {

+            ret = ret2;

+        }

+    }

+

+    /*  Discard the buffers so a subsequent format will not run into blocks it

+        does not expect.

+    */

+    if(ret == 0)

+    {

+        ret = RedBufferDiscardRange(0U, gpRedVolume->ulBlockCount);

+    }

+

+    return ret;

+}

+

+

+#endif /* FORMAT_SUPPORTED */

+

diff --git a/FreeRTOS-Plus/Source/Reliance-Edge/core/driver/imap.c b/FreeRTOS-Plus/Source/Reliance-Edge/core/driver/imap.c
new file mode 100644
index 0000000..6375988
--- /dev/null
+++ b/FreeRTOS-Plus/Source/Reliance-Edge/core/driver/imap.c
@@ -0,0 +1,348 @@
+/*             ----> DO NOT REMOVE THE FOLLOWING NOTICE <----

+

+                   Copyright (c) 2014-2015 Datalight, Inc.

+                       All Rights Reserved Worldwide.

+

+    This program is free software; you can redistribute it and/or modify

+    it under the terms of the GNU General Public License as published by

+    the Free Software Foundation; use version 2 of the License.

+

+    This program is distributed in the hope that it will be useful,

+    but "AS-IS," WITHOUT ANY WARRANTY; without even the implied warranty

+    of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the

+    GNU General Public License for more details.

+

+    You should have received a copy of the GNU General Public License along

+    with this program; if not, write to the Free Software Foundation, Inc.,

+    51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.

+*/

+/*  Businesses and individuals that for commercial or other reasons cannot

+    comply with the terms of the GPLv2 license may obtain a commercial license

+    before incorporating Reliance Edge into proprietary software for

+    distribution in any form.  Visit http://www.datalight.com/reliance-edge for

+    more information.

+*/

+/** @file

+    @brief Implements allocation routines.

+

+    This module implements routines for working with the imap, a bitmap which

+    tracks which blocks are allocated or free.  Some of the functionality is

+    delegated to imapinline.c and imapextern.c.

+*/

+#include <redfs.h>

+#include <redcore.h>

+

+

+/** @brief Get the allocation bit of a block from either metaroot.

+

+    Will pass the call down either to the inline imap or to the external imap

+    implementation, whichever is appropriate for the current volume.

+

+    @param bMR          The metaroot index: either 0 or 1.

+    @param ulBlock      The block number to query.

+    @param pfAllocated  On successful return, populated with the allocation bit

+                        of the block.

+

+    @return A negated ::REDSTATUS code indicating the operation result.

+

+    @retval 0           Operation was successful.

+    @retval -RED_EINVAL @p bMR is out of range; or @p ulBlock is out of range;

+                        or @p pfAllocated is `NULL`.

+    @retval -RED_EIO    A disk I/O error occurred.

+*/

+REDSTATUS RedImapBlockGet(

+    uint8_t     bMR,

+    uint32_t    ulBlock,

+    bool       *pfAllocated)

+{

+    REDSTATUS   ret;

+

+    if(    (bMR > 1U)

+        || (ulBlock < gpRedCoreVol->ulInodeTableStartBN)

+        || (ulBlock >= gpRedVolume->ulBlockCount)

+        || (pfAllocated == NULL))

+    {

+        REDERROR();

+        ret = -RED_EINVAL;

+    }

+    else

+    {

+      #if (REDCONF_IMAP_INLINE == 1) && (REDCONF_IMAP_EXTERNAL == 1)

+        if(gpRedCoreVol->fImapInline)

+        {

+            ret = RedImapIBlockGet(bMR, ulBlock, pfAllocated);

+        }

+        else

+        {

+            ret = RedImapEBlockGet(bMR, ulBlock, pfAllocated);

+        }

+      #elif REDCONF_IMAP_INLINE == 1

+        ret = RedImapIBlockGet(bMR, ulBlock, pfAllocated);

+      #else

+        ret = RedImapEBlockGet(bMR, ulBlock, pfAllocated);

+      #endif

+    }

+

+    return ret;

+}

+

+

+#if REDCONF_READ_ONLY == 0

+/** @brief Set the allocation bit of a block in the working metaroot.

+

+    Will pass the call down either to the inline imap or to the external imap

+    implementation, whichever is appropriate for the current volume.

+

+    @param ulBlock      The block number to allocate or free.

+    @param fAllocated   Whether to allocate the block (true) or free it (false).

+

+    @return A negated ::REDSTATUS code indicating the operation result.

+

+    @retval 0           Operation was successful.

+    @retval -RED_EINVAL @p ulBlock is out of range; or @p ulBlock is allocable

+                        and @p fAllocated is 1.

+    @retval -RED_EIO    A disk I/O error occurred.

+*/

+REDSTATUS RedImapBlockSet(

+    uint32_t    ulBlock,

+    bool        fAllocated)

+{

+    REDSTATUS   ret;

+

+    if(    (ulBlock < gpRedCoreVol->ulInodeTableStartBN)

+        || (ulBlock >= gpRedVolume->ulBlockCount))

+    {

+        REDERROR();

+        ret = -RED_EINVAL;

+    }

+    else if(    (ulBlock >= gpRedCoreVol->ulFirstAllocableBN)

+             && (    (fAllocated && (gpRedMR->ulFreeBlocks == 0U))

+                  || ((!fAllocated) && (gpRedMR->ulFreeBlocks >= gpRedVolume->ulBlocksAllocable))))

+    {

+        /*  Attempting either to free more blocks than are allocable, or

+            allocate a block when there are none available.  This could indicate

+            metadata corruption.

+        */

+        CRITICAL_ERROR();

+        ret = -RED_EFUBAR;

+    }

+    else

+    {

+      #if (REDCONF_IMAP_INLINE == 1) && (REDCONF_IMAP_EXTERNAL == 1)

+        if(gpRedCoreVol->fImapInline)

+        {

+            ret = RedImapIBlockSet(ulBlock, fAllocated);

+        }

+        else

+        {

+            ret = RedImapEBlockSet(ulBlock, fAllocated);

+        }

+      #elif REDCONF_IMAP_INLINE == 1

+        ret = RedImapIBlockSet(ulBlock, fAllocated);

+      #else

+        ret = RedImapEBlockSet(ulBlock, fAllocated);

+      #endif

+

+        /*  Any change to the allocation state of a block indicates that the

+            volume is now branched.

+        */

+        gpRedCoreVol->fBranched = true;

+    }

+

+    /*  If a block was marked as no longer in use, discard it from the buffers.

+    */

+    if((ret == 0) && (!fAllocated))

+    {

+        ret = RedBufferDiscardRange(ulBlock, 1U);

+        CRITICAL_ASSERT(ret == 0);

+    }

+

+    /*  Adjust the free/almost free block count if the block was allocable.

+    */

+    if((ret == 0) && (ulBlock >= gpRedCoreVol->ulFirstAllocableBN))

+    {

+        if(fAllocated)

+        {

+            gpRedMR->ulFreeBlocks--;

+        }

+        else

+        {

+            bool fWasAllocated;

+

+            /*  Whether the block became free or almost free depends on its

+                previous allocation state.  If it was used, then it is now

+                almost free.  Otherwise, it was new and is now free.

+            */

+            ret = RedImapBlockGet(1U - gpRedCoreVol->bCurMR, ulBlock, &fWasAllocated);

+            CRITICAL_ASSERT(ret == 0);

+

+            if(ret == 0)

+            {

+                if(fWasAllocated)

+                {

+                    gpRedCoreVol->ulAlmostFreeBlocks++;

+                }

+                else

+                {

+                    gpRedMR->ulFreeBlocks++;

+                }

+            }

+        }

+    }

+

+    return ret;

+}

+

+

+/** @brief Allocate one block.

+

+    @param pulBlock On successful return, populated with the allocated block

+                    number.

+

+    @return A negated ::REDSTATUS code indicating the operation result.

+

+    @retval 0           Operation was successful.

+    @retval -RED_EINVAL @p pulBlock is `NULL`.

+    @retval -RED_EIO    A disk I/O error occurred.

+    @retval -RED_ENOSPC Insufficient free space to perform the allocation.

+*/

+REDSTATUS RedImapAllocBlock(

+    uint32_t   *pulBlock)

+{

+    REDSTATUS   ret;

+

+    if(pulBlock == NULL)

+    {

+        REDERROR();

+        ret = -RED_EINVAL;

+    }

+    else if(gpRedMR->ulFreeBlocks == 0U)

+    {

+        ret = -RED_ENOSPC;

+    }

+    else

+    {

+        uint32_t ulStopBlock = gpRedMR->ulAllocNextBlock;

+        bool     fAllocated = false;

+

+        do

+        {

+            ALLOCSTATE state;

+

+            ret = RedImapBlockState(gpRedMR->ulAllocNextBlock, &state);

+            CRITICAL_ASSERT(ret == 0);

+

+            if(ret == 0)

+            {

+                if(state == ALLOCSTATE_FREE)

+                {

+                    ret = RedImapBlockSet(gpRedMR->ulAllocNextBlock, true);

+                    CRITICAL_ASSERT(ret == 0);

+

+                    *pulBlock = gpRedMR->ulAllocNextBlock;

+                    fAllocated = true;

+                }

+

+                /*  Increment the next block number, wrapping it when the end of

+                    the volume is reached.

+                */

+                gpRedMR->ulAllocNextBlock++;

+                if(gpRedMR->ulAllocNextBlock == gpRedVolume->ulBlockCount)

+                {

+                    gpRedMR->ulAllocNextBlock = gpRedCoreVol->ulFirstAllocableBN;

+                }

+            }

+        }

+        while((ret == 0) && !fAllocated && (gpRedMR->ulAllocNextBlock != ulStopBlock));

+

+        if((ret == 0) && !fAllocated)

+        {

+            /*  The free block count was already determined to be non-zero, no

+                error occurred while looking for free blocks, but no free blocks

+                were found.  This indicates metadata corruption.

+            */

+            CRITICAL_ERROR();

+            ret = -RED_EFUBAR;

+        }

+    }

+

+    return ret;

+}

+#endif /* REDCONF_READ_ONLY == 0 */

+

+

+/** @brief Get the allocation state of a block.

+

+    Takes into account the allocation bits from both metaroots, and returns one

+    of four possible allocation state values:

+

+    - ::ALLOCSTATE_FREE Free and may be allocated; writeable.

+    - ::ALLOCSTATE_USED In-use and transacted; not writeable.

+    - ::ALLOCSTATE_NEW In-use but not transacted; writeable.

+    - ::ALLOCSTATE_AFREE Will become free after a transaction; not writeable.

+

+    @param ulBlock  The block number to query.

+    @param pState   On successful return, populated with the state of the block.

+

+    @return A negated ::REDSTATUS code indicating the operation result.

+

+    @retval 0           Operation was successful.

+    @retval -RED_EINVAL @p ulBlock is out of range; or @p pState is `NULL`.

+    @retval -RED_EIO    A disk I/O error occurred.

+*/

+REDSTATUS RedImapBlockState(

+    uint32_t    ulBlock,

+    ALLOCSTATE *pState)

+{

+    REDSTATUS   ret;

+

+    if(    (ulBlock < gpRedCoreVol->ulInodeTableStartBN)

+        || (ulBlock >= gpRedVolume->ulBlockCount)

+        || (pState == NULL))

+    {

+        REDERROR();

+        ret = -RED_EINVAL;

+    }

+    else

+    {

+        bool fBitCurrent;

+

+        ret = RedImapBlockGet(gpRedCoreVol->bCurMR, ulBlock, &fBitCurrent);

+

+        if(ret == 0)

+        {

+            bool fBitOld;

+

+            ret = RedImapBlockGet(1U - gpRedCoreVol->bCurMR, ulBlock, &fBitOld);

+

+            if(ret == 0)

+            {

+                if(fBitCurrent)

+                {

+                    if(fBitOld)

+                    {

+                        *pState = ALLOCSTATE_USED;

+                    }

+                    else

+                    {

+                        *pState = ALLOCSTATE_NEW;

+                    }

+                }

+                else

+                {

+                    if(fBitOld)

+                    {

+                        *pState = ALLOCSTATE_AFREE;

+                    }

+                    else

+                    {

+                        *pState = ALLOCSTATE_FREE;

+                    }

+                }

+            }

+        }

+    }

+

+    return ret;

+}

+

diff --git a/FreeRTOS-Plus/Source/Reliance-Edge/core/driver/imapextern.c b/FreeRTOS-Plus/Source/Reliance-Edge/core/driver/imapextern.c
new file mode 100644
index 0000000..67fab47
--- /dev/null
+++ b/FreeRTOS-Plus/Source/Reliance-Edge/core/driver/imapextern.c
@@ -0,0 +1,316 @@
+/*             ----> DO NOT REMOVE THE FOLLOWING NOTICE <----

+

+                   Copyright (c) 2014-2015 Datalight, Inc.

+                       All Rights Reserved Worldwide.

+

+    This program is free software; you can redistribute it and/or modify

+    it under the terms of the GNU General Public License as published by

+    the Free Software Foundation; use version 2 of the License.

+

+    This program is distributed in the hope that it will be useful,

+    but "AS-IS," WITHOUT ANY WARRANTY; without even the implied warranty

+    of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the

+    GNU General Public License for more details.

+

+    You should have received a copy of the GNU General Public License along

+    with this program; if not, write to the Free Software Foundation, Inc.,

+    51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.

+*/

+/*  Businesses and individuals that for commercial or other reasons cannot

+    comply with the terms of the GPLv2 license may obtain a commercial license

+    before incorporating Reliance Edge into proprietary software for

+    distribution in any form.  Visit http://www.datalight.com/reliance-edge for

+    more information.

+*/

+/** @file

+    @brief Implements routines for the external imap.

+

+    The external imap is used on volumes that are too big for the imap bitmap

+    to be stored entirely in the metaroot, so instead the bitmap is stored in

+    imap nodes on disk, and the metaroot bitmap is used to toggle between imap

+    nodes.

+*/

+#include <redfs.h>

+

+#if REDCONF_IMAP_EXTERNAL == 1

+

+#include <redcore.h>

+

+

+#if REDCONF_READ_ONLY == 0

+static REDSTATUS ImapNodeBranch(uint32_t ulImapNode, IMAPNODE **ppImap);

+static bool ImapNodeIsBranched(uint32_t ulImapNode);

+#endif

+

+

+/** @brief Get the allocation bit of a block from the imap as it exists in

+           either metaroot.

+

+    @param bMR          The metaroot index: either 0 or 1.

+    @param ulBlock      The block number to query.

+    @param pfAllocated  On successful exit, populated with the allocation bit

+                        of the block.

+

+    @return A negated ::REDSTATUS code indicating the operation result.

+

+    @retval 0           Operation was successful.

+    @retval -RED_EINVAL @p bMR is out of range; or @p ulBlock is out of range;

+                        or @p pfAllocated is `NULL`.

+    @retval -RED_EIO    A disk I/O error occurred.

+*/

+REDSTATUS RedImapEBlockGet(

+    uint8_t     bMR,

+    uint32_t    ulBlock,

+    bool       *pfAllocated)

+{

+    REDSTATUS   ret;

+

+    if(    gpRedCoreVol->fImapInline

+        || (bMR > 1U)

+        || (ulBlock < gpRedCoreVol->ulInodeTableStartBN)

+        || (ulBlock >= gpRedVolume->ulBlockCount)

+        || (pfAllocated == NULL))

+    {

+        REDERROR();

+        ret = -RED_EINVAL;

+    }

+    else

+    {

+        uint32_t    ulOffset = ulBlock - gpRedCoreVol->ulInodeTableStartBN;

+        uint32_t    ulImapNode = ulOffset / IMAPNODE_ENTRIES;

+        uint8_t     bMRToRead = bMR;

+        IMAPNODE   *pImap;

+

+      #if REDCONF_READ_ONLY == 0

+        /*  If the imap node is not branched, then both copies of the imap are

+            identical.  If the old metaroot copy is requested, use the current

+            copy instead, since it is more likely to be buffered.

+        */

+        if(bMR == (1U - gpRedCoreVol->bCurMR))

+        {

+            if(!ImapNodeIsBranched(ulImapNode))

+            {

+                bMRToRead = 1U - bMR;

+            }

+        }

+      #endif

+

+        ret = RedBufferGet(RedImapNodeBlock(bMRToRead, ulImapNode), BFLAG_META_IMAP, CAST_VOID_PTR_PTR(&pImap));

+

+        if(ret == 0)

+        {

+            *pfAllocated = RedBitGet(pImap->abEntries, ulOffset % IMAPNODE_ENTRIES);

+

+            RedBufferPut(pImap);

+        }

+    }

+

+    return ret;

+}

+

+

+#if REDCONF_READ_ONLY == 0

+/** @brief Set the allocation bit of a block in the working-state imap.

+

+    @param ulBlock      The block number to allocate or free.

+    @param fAllocated   Whether to allocate the block (true) or free it (false).

+

+    @return A negated ::REDSTATUS code indicating the operation result.

+

+    @retval 0           Operation was successful.

+    @retval -RED_EINVAL @p ulBlock is out of range.

+    @retval -RED_EIO    A disk I/O error occurred.

+*/

+REDSTATUS RedImapEBlockSet(

+    uint32_t    ulBlock,

+    bool        fAllocated)

+{

+    REDSTATUS   ret;

+

+    if(    gpRedCoreVol->fImapInline

+        || (ulBlock < gpRedCoreVol->ulInodeTableStartBN)

+        || (ulBlock >= gpRedVolume->ulBlockCount))

+    {

+        REDERROR();

+        ret = -RED_EINVAL;

+    }

+    else

+    {

+        uint32_t    ulOffset = ulBlock - gpRedCoreVol->ulInodeTableStartBN;

+        uint32_t    ulImapNode = ulOffset / IMAPNODE_ENTRIES;

+        IMAPNODE   *pImap;

+

+        ret = ImapNodeBranch(ulImapNode, &pImap);

+

+        if(ret == 0)

+        {

+            uint32_t ulImapEntry = ulOffset % IMAPNODE_ENTRIES;

+

+            if(RedBitGet(pImap->abEntries, ulImapEntry) == fAllocated)

+            {

+                /*  The driver shouldn't ever set a bit in the imap to its

+                    current value.  That shouldn't ever be needed, and it

+                    indicates that the driver is doing unnecessary I/O, or

+                    that the imap is corrupt.

+                */

+                CRITICAL_ERROR();

+                ret = -RED_EFUBAR;

+            }

+            else if(fAllocated)

+            {

+                RedBitSet(pImap->abEntries, ulImapEntry);

+            }

+            else

+            {

+                RedBitClear(pImap->abEntries, ulImapEntry);

+            }

+

+            RedBufferPut(pImap);

+        }

+    }

+

+    return ret;

+}

+

+

+/** @brief Branch an imap node and get a buffer for it.

+

+    If the imap node is already branched, it can be overwritten in its current

+    location, and this function just gets it buffered dirty.  If the node is not

+    already branched, the metaroot must be updated to toggle the imap node to

+    its alternate location, thereby preserving the committed state copy of the

+    imap node.

+

+    @param ulImapNode   The imap node to branch and buffer.

+    @param ppImap       On successful return, populated with the imap node

+                        buffer, which will be marked dirty.

+

+    @return A negated ::REDSTATUS code indicating the operation result.

+

+    @retval 0           Operation was successful.

+    @retval -RED_EINVAL @p ulImapNode is out of range; or @p ppImap is `NULL`.

+    @retval -RED_EIO    A disk I/O error occurred.

+*/

+static REDSTATUS ImapNodeBranch(

+    uint32_t    ulImapNode,

+    IMAPNODE  **ppImap)

+{

+    REDSTATUS   ret;

+

+    if((ulImapNode >= gpRedCoreVol->ulImapNodeCount) || (ppImap == NULL))

+    {

+        REDERROR();

+        ret = -RED_EINVAL;

+    }

+    else if(ImapNodeIsBranched(ulImapNode))

+    {

+        /*  Imap node is already branched, so just get it buffered dirty.

+        */

+        ret = RedBufferGet(RedImapNodeBlock(gpRedCoreVol->bCurMR, ulImapNode), BFLAG_META_IMAP | BFLAG_DIRTY, CAST_VOID_PTR_PTR(ppImap));

+    }

+    else

+    {

+        uint32_t    ulBlockCurrent;

+        uint32_t    ulBlockOld;

+

+        /*  The metaroot currently points to the committed state imap node.

+            Toggle the metaroot to point at the alternate, writeable location.

+        */

+        if(RedBitGet(gpRedMR->abEntries, ulImapNode))

+        {

+            RedBitClear(gpRedMR->abEntries, ulImapNode);

+        }

+        else

+        {

+            RedBitSet(gpRedMR->abEntries, ulImapNode);

+        }

+

+        ulBlockCurrent = RedImapNodeBlock(gpRedCoreVol->bCurMR, ulImapNode);

+        ulBlockOld     = RedImapNodeBlock(1U - gpRedCoreVol->bCurMR, ulImapNode);

+

+        ret = RedBufferDiscardRange(ulBlockCurrent, 1U);

+

+        /*  Buffer the committed copy then reassign the block number to the

+            writeable location.  This also dirties the buffer.

+        */

+        if(ret == 0)

+        {

+            ret = RedBufferGet(ulBlockOld, BFLAG_META_IMAP, CAST_VOID_PTR_PTR(ppImap));

+

+            if(ret == 0)

+            {

+                RedBufferBranch(*ppImap, ulBlockCurrent);

+            }

+        }

+    }

+

+    return ret;

+}

+

+

+/** @brief Determine whether an imap node is branched.

+

+    If the imap node is branched, it can be overwritten in its current location.

+

+    @param ulImapNode   The imap node to examine.

+

+    @return Whether the imap node is branched.

+*/

+static bool ImapNodeIsBranched(

+    uint32_t    ulImapNode)

+{

+    bool        fNodeBitSetInMetaroot0 = RedBitGet(gpRedCoreVol->aMR[0U].abEntries, ulImapNode);

+    bool        fNodeBitSetInMetaroot1 = RedBitGet(gpRedCoreVol->aMR[1U].abEntries, ulImapNode);

+

+    /*  If the imap node is not branched, both metaroots will point to the same

+        copy of the node.

+    */

+    return fNodeBitSetInMetaroot0 != fNodeBitSetInMetaroot1;

+}

+#endif /* REDCONF_READ_ONLY == 0 */

+

+

+/** @brief Calculate the block number of the imap node location indicated by the

+           given metaroot.

+

+    An imap node has two locations on disk.  A bit in the metaroot bitmap

+    indicates which location is the valid one, according to that metaroot.  This

+    function returns the block number of the imap node which is valid in the

+    given metaroot.

+

+    @param bMR          Which metaroot to examine.

+    @param ulImapNode   The imap node for which to calculate the block number.

+

+    @return Block number of the imap node, as indicated by the given metaroot.

+*/

+uint32_t RedImapNodeBlock(

+    uint8_t     bMR,

+    uint32_t    ulImapNode)

+{

+    uint32_t    ulBlock;

+

+    REDASSERT(ulImapNode < gpRedCoreVol->ulImapNodeCount);

+

+    ulBlock = gpRedCoreVol->ulImapStartBN + (ulImapNode * 2U);

+

+    if(bMR > 1U)

+    {

+        REDERROR();

+    }

+    else if(RedBitGet(gpRedCoreVol->aMR[bMR].abEntries, ulImapNode))

+    {

+        /*  Bit is set, so point ulBlock at the second copy of the node.

+        */

+        ulBlock++;

+    }

+    else

+    {

+        /*  ulBlock already points at the first copy of the node.

+        */

+    }

+

+    return ulBlock;

+}

+

+#endif /* REDCONF_IMAP_EXTERNAL == 1 */

+

diff --git a/FreeRTOS-Plus/Source/Reliance-Edge/core/driver/imapinline.c b/FreeRTOS-Plus/Source/Reliance-Edge/core/driver/imapinline.c
new file mode 100644
index 0000000..0171ae7
--- /dev/null
+++ b/FreeRTOS-Plus/Source/Reliance-Edge/core/driver/imapinline.c
@@ -0,0 +1,133 @@
+/*             ----> DO NOT REMOVE THE FOLLOWING NOTICE <----

+

+                   Copyright (c) 2014-2015 Datalight, Inc.

+                       All Rights Reserved Worldwide.

+

+    This program is free software; you can redistribute it and/or modify

+    it under the terms of the GNU General Public License as published by

+    the Free Software Foundation; use version 2 of the License.

+

+    This program is distributed in the hope that it will be useful,

+    but "AS-IS," WITHOUT ANY WARRANTY; without even the implied warranty

+    of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the

+    GNU General Public License for more details.

+

+    You should have received a copy of the GNU General Public License along

+    with this program; if not, write to the Free Software Foundation, Inc.,

+    51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.

+*/

+/*  Businesses and individuals that for commercial or other reasons cannot

+    comply with the terms of the GPLv2 license may obtain a commercial license

+    before incorporating Reliance Edge into proprietary software for

+    distribution in any form.  Visit http://www.datalight.com/reliance-edge for

+    more information.

+*/

+/** @file

+    @brief Implements routines for the inline imap.

+

+    The inline imap is used on volumes that are small enough for the imap bitmap

+    to be entirely contained within the metaroot.

+*/

+#include <redfs.h>

+

+#if REDCONF_IMAP_INLINE == 1

+

+#include <redcore.h>

+

+

+/** @brief Get the allocation bit of a block from either metaroot.

+

+    @param bMR          The metaroot index: either 0 or 1.

+    @param ulBlock      The block number to query.

+    @param pfAllocated  On successful return, populated with the allocation bit

+                        of the block.

+

+    @return A negated ::REDSTATUS code indicating the operation result.

+

+    @retval 0           Operation was successful.

+    @retval -RED_EINVAL @p bMR is out of range; or @p ulBlock is out of range;

+                        @p pfAllocated is `NULL`; or the current volume does not

+                        use the inline imap.

+*/

+REDSTATUS RedImapIBlockGet(

+    uint8_t     bMR,

+    uint32_t    ulBlock,

+    bool       *pfAllocated)

+{

+    REDSTATUS   ret;

+

+    if(    (!gpRedCoreVol->fImapInline)

+        || (bMR > 1U)

+        || (ulBlock < gpRedCoreVol->ulInodeTableStartBN)

+        || (ulBlock >= gpRedVolume->ulBlockCount)

+        || (pfAllocated == NULL))

+    {

+        REDERROR();

+        ret = -RED_EINVAL;

+    }

+    else

+    {

+        *pfAllocated = RedBitGet(gpRedCoreVol->aMR[bMR].abEntries, ulBlock - gpRedCoreVol->ulInodeTableStartBN);

+        ret = 0;

+    }

+

+    return ret;

+}

+

+

+#if REDCONF_READ_ONLY == 0

+/** @brief Set the allocation bit of a block in the working metaroot.

+

+    @param ulBlock      The block number to allocate or free.

+    @param fAllocated   Whether to allocate the block (true) or free it (false).

+

+    @return A negated ::REDSTATUS code indicating the operation result.

+

+    @retval 0           Operation was successful.

+    @retval -RED_EINVAL @p ulBlock is out of range; or the current volume does

+                        not use the inline imap.

+*/

+REDSTATUS RedImapIBlockSet(

+    uint32_t    ulBlock,

+    bool        fAllocated)

+{

+    REDSTATUS   ret;

+

+    if(    (!gpRedCoreVol->fImapInline)

+        || (ulBlock < gpRedCoreVol->ulInodeTableStartBN)

+        || (ulBlock >= gpRedVolume->ulBlockCount))

+    {

+        REDERROR();

+        ret = -RED_EINVAL;

+    }

+    else

+    {

+        uint32_t ulOffset = ulBlock - gpRedCoreVol->ulInodeTableStartBN;

+

+        if(RedBitGet(gpRedMR->abEntries, ulOffset) == fAllocated)

+        {

+            /*  The driver shouldn't ever set a bit in the imap to its current

+                value.  This is more of a problem with the external imap, but it

+                is checked here for consistency.

+            */

+            CRITICAL_ERROR();

+            ret = -RED_EFUBAR;

+        }

+        else if(fAllocated)

+        {

+            RedBitSet(gpRedMR->abEntries, ulOffset);

+            ret = 0;

+        }

+        else

+        {

+            RedBitClear(gpRedMR->abEntries, ulOffset);

+            ret = 0;

+        }

+    }

+

+    return ret;

+}

+#endif

+

+#endif /* REDCONF_IMAP_INLINE == 1 */

+

diff --git a/FreeRTOS-Plus/Source/Reliance-Edge/core/driver/inode.c b/FreeRTOS-Plus/Source/Reliance-Edge/core/driver/inode.c
new file mode 100644
index 0000000..c8c7682
--- /dev/null
+++ b/FreeRTOS-Plus/Source/Reliance-Edge/core/driver/inode.c
@@ -0,0 +1,1120 @@
+/*             ----> DO NOT REMOVE THE FOLLOWING NOTICE <----

+

+                   Copyright (c) 2014-2015 Datalight, Inc.

+                       All Rights Reserved Worldwide.

+

+    This program is free software; you can redistribute it and/or modify

+    it under the terms of the GNU General Public License as published by

+    the Free Software Foundation; use version 2 of the License.

+

+    This program is distributed in the hope that it will be useful,

+    but "AS-IS," WITHOUT ANY WARRANTY; without even the implied warranty

+    of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the

+    GNU General Public License for more details.

+

+    You should have received a copy of the GNU General Public License along

+    with this program; if not, write to the Free Software Foundation, Inc.,

+    51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.

+*/

+/*  Businesses and individuals that for commercial or other reasons cannot

+    comply with the terms of the GPLv2 license may obtain a commercial license

+    before incorporating Reliance Edge into proprietary software for

+    distribution in any form.  Visit http://www.datalight.com/reliance-edge for

+    more information.

+*/

+/** @file

+    @brief Implements inode functions.

+*/

+#include <redfs.h>

+#include <redcore.h>

+

+

+#if REDCONF_READ_ONLY == 0

+static REDSTATUS InodeIsBranched(uint32_t ulInode, bool *pfIsBranched);

+#endif

+#if (REDCONF_READ_ONLY == 0) && (REDCONF_API_POSIX == 1)

+static REDSTATUS InodeFindFree(uint32_t *pulInode);

+#endif

+#if REDCONF_READ_ONLY == 0

+static REDSTATUS InodeGetWriteableCopy(uint32_t ulInode, uint8_t *pbWhich);

+#endif

+static REDSTATUS InodeGetCurrentCopy(uint32_t ulInode, uint8_t *pbWhich);

+#if REDCONF_READ_ONLY == 0

+static REDSTATUS InodeBitSet(uint32_t ulInode, uint8_t bWhich, bool fAllocated);

+#endif

+static uint32_t InodeBlock(uint32_t ulInode, uint8_t bWhich);

+

+

+/** @brief Mount an existing inode.

+

+    Will populate all fields of the cached inode structure, except those which

+    are populated during seek.

+

+    @param pInode   A pointer to the cached inode structure.  The

+                    pInode->ulInode field must already be initialized with the

+                    inode number to mount.  All other fields will be discarded.

+    @param type     The expected inode type.

+    @param fBranch  Whether to branch the inode.

+

+    @return A negated ::REDSTATUS code indicating the operation result.

+

+    @retval 0               Operation was successful.

+    @retval -RED_EINVAL     Invalid parameters.

+    @retval -RED_EROFS      @p fBranch is true but the driver is read-only.

+    @retval -RED_EIO        A disk I/O error occurred.

+    @retval -RED_EBADF      The inode number is free; or the inode number is not

+                            valid.

+    @retval -RED_EISDIR     @p type is ::FTYPE_FILE and the inode is a directory.

+    @retval -RED_ENOTDIR    @p type is ::FTYPE_DIR and the inode is a file.

+*/

+REDSTATUS RedInodeMount(

+    CINODE     *pInode,

+    FTYPE       type,

+    bool        fBranch)

+{

+    REDSTATUS   ret = 0;

+

+    if(pInode == NULL)

+    {

+        ret = -RED_EINVAL;

+    }

+    else if(!INODE_IS_VALID(pInode->ulInode))

+    {

+        ret = -RED_EBADF;

+    }

+  #if REDCONF_API_FSE == 1

+    else if(type == FTYPE_DIR)

+    {

+        REDERROR();

+        ret = -RED_EINVAL;

+    }

+  #endif

+  #if REDCONF_READ_ONLY == 1

+    else if(fBranch)

+    {

+        REDERROR();

+        ret = -RED_EROFS;

+    }

+  #endif

+    else

+    {

+        uint32_t ulInode = pInode->ulInode;

+        uint8_t  bWhich = 0U; /* Init'd to quiet warnings. */

+

+        RedMemSet(pInode, 0U, sizeof(*pInode));

+        pInode->ulInode = ulInode;

+

+        ret = InodeGetCurrentCopy(pInode->ulInode, &bWhich);

+

+        if(ret == 0)

+        {

+            ret = RedBufferGet(InodeBlock(pInode->ulInode, bWhich), BFLAG_META_INODE, CAST_VOID_PTR_PTR(&pInode->pInodeBuf));

+        }

+

+      #if REDCONF_READ_ONLY == 0

+        if(ret == 0)

+        {

+            ret = InodeIsBranched(pInode->ulInode, &pInode->fBranched);

+        }

+      #endif

+

+        if(ret == 0)

+        {

+            if(RED_S_ISREG(pInode->pInodeBuf->uMode))

+            {

+              #if REDCONF_API_POSIX == 1

+                pInode->fDirectory = false;

+

+                if(type == FTYPE_DIR)

+                {

+                    ret = -RED_ENOTDIR;

+                }

+              #endif

+            }

+          #if REDCONF_API_POSIX == 1

+            else if(RED_S_ISDIR(pInode->pInodeBuf->uMode))

+            {

+                pInode->fDirectory = true;

+

+                if(type == FTYPE_FILE)

+                {

+                    ret = -RED_EISDIR;

+                }

+            }

+          #endif

+            else

+            {

+                /*  Missing or unsupported inode type.

+                */

+                CRITICAL_ERROR();

+                ret = -RED_EFUBAR;

+            }

+        }

+

+      #if REDCONF_READ_ONLY == 0

+        if((ret == 0) && fBranch)

+        {

+            ret = RedInodeBranch(pInode);

+        }

+      #endif

+

+        if(ret != 0)

+        {

+            RedInodePut(pInode, 0U);

+        }

+    }

+

+    return ret;

+}

+

+

+#if (REDCONF_READ_ONLY == 0) && ((REDCONF_API_POSIX == 1) || FORMAT_SUPPORTED)

+/** @brief Create an inode.

+

+    @param pInode   Pointer to the cached inode structure.  If pInode->ulInode

+                    is #INODE_INVALID, a free inode will be found; otherwise,

+                    pInode->ulInode will be the inode number (an error will be

+                    returned if it is not free).

+    @param ulPInode The parent inode number.

+    @param uMode    The inode mode.

+

+    @return A negated ::REDSTATUS code indicating the operation result.

+

+    @retval 0           Operation was successful.

+    @retval -RED_EBADF  pInode->ulInode is an invalid inode number other than

+                        #INODE_INVALID.

+    @retval -RED_EINVAL Invalid parameters.

+    @retval -RED_EEXIST Tried to create an inode with an inode number that is

+                        already in use.

+    @retval -RED_ENFILE All inode slots are already in use.

+    @retval -RED_EIO    A disk I/O error occurred.

+*/

+REDSTATUS RedInodeCreate(

+    CINODE     *pInode,

+    uint32_t    ulPInode,

+    uint16_t    uMode)

+{

+    REDSTATUS   ret;

+

+  #if REDCONF_API_POSIX == 1

+    /*  ulPInode must be a valid inode number, unless we are creating the root

+        directory, in which case ulPInode must be INODE_INVALID (the root

+        directory has no parent).

+    */

+    if(    (pInode == NULL)

+        || (!INODE_IS_VALID(ulPInode) && ((ulPInode != INODE_INVALID) || (pInode->ulInode != INODE_ROOTDIR))))

+  #else

+    if(pInode == NULL)

+  #endif

+    {

+        REDERROR();

+        ret = -RED_EINVAL;

+    }

+    else

+    {

+        uint32_t ulInode = pInode->ulInode;

+

+        RedMemSet(pInode, 0U, sizeof(*pInode));

+

+      #if REDCONF_API_POSIX == 1

+        if(ulInode == INODE_INVALID)

+        {

+            /*  Caller requested that an inode number be allocated.  Search for

+                an unused inode number, error if there isn't one.

+            */

+            ret = InodeFindFree(&pInode->ulInode);

+        }

+        else

+      #endif

+        {

+            /*  Caller requested creation of a specific inode number.  Make sure

+                it's valid and doesn't already exist.

+            */

+            if(INODE_IS_VALID(ulInode))

+            {

+                bool fFree;

+

+                ret = RedInodeIsFree(ulInode, &fFree);

+                if(ret == 0)

+                {

+                    if(fFree)

+                    {

+                        pInode->ulInode = ulInode;

+                    }

+                    else

+                    {

+                        ret = -RED_EEXIST;

+                    }

+                }

+            }

+            else

+            {

+                ret = -RED_EBADF;

+            }

+        }

+

+        if(ret == 0)

+        {

+            uint8_t bWriteableWhich;

+

+            ret = InodeGetWriteableCopy(pInode->ulInode, &bWriteableWhich);

+

+            if(ret == 0)

+            {

+                ret = RedBufferGet(InodeBlock(pInode->ulInode, bWriteableWhich),

+                    (uint16_t)((uint32_t)BFLAG_META_INODE | BFLAG_DIRTY | BFLAG_NEW), CAST_VOID_PTR_PTR(&pInode->pInodeBuf));

+

+                if(ret == 0)

+                {

+                    /*  Mark the inode block as allocated.

+                    */

+                    ret = InodeBitSet(pInode->ulInode, bWriteableWhich, true);

+

+                    if(ret != 0)

+                    {

+                        RedBufferPut(pInode->pInodeBuf);

+                    }

+                }

+            }

+        }

+

+        if(ret == 0)

+        {

+          #if REDCONF_INODE_TIMESTAMPS == 1

+            uint32_t ulNow = RedOsClockGetTime();

+

+            pInode->pInodeBuf->ulATime = ulNow;

+            pInode->pInodeBuf->ulMTime = ulNow;

+            pInode->pInodeBuf->ulCTime = ulNow;

+          #endif

+

+            pInode->pInodeBuf->uMode = uMode;

+

+          #if REDCONF_API_POSIX == 1

+          #if REDCONF_API_POSIX_LINK == 1

+            pInode->pInodeBuf->uNLink = 1U;

+          #endif

+            pInode->pInodeBuf->ulPInode = ulPInode;

+          #else

+            (void)ulPInode;

+          #endif

+

+            pInode->fBranched = true;

+            pInode->fDirty = true;

+

+          #if REDCONF_API_POSIX == 1

+            gpRedMR->ulFreeInodes--;

+          #endif

+        }

+    }

+

+    return ret;

+}

+#endif /* (REDCONF_READ_ONLY == 0) && ((REDCONF_API_POSIX == 1) || FORMAT_SUPPORTED) */

+

+

+#if DELETE_SUPPORTED

+/** @brief Delete an inode.

+

+    @param pInode   Pointer to the cached inode structure.

+

+    @return A negated ::REDSTATUS code indicating the operation result.

+

+    @retval 0           Operation was successful.

+    @retval -RED_EBADF  The inode is free.

+    @retval -RED_EINVAL @p pInode is `NULL`; or pInode->pBuffer is `NULL`.

+    @retval -RED_EIO    A disk I/O error occurred.

+*/

+REDSTATUS RedInodeDelete(

+    CINODE     *pInode)

+{

+    REDSTATUS   ret = 0;

+

+    if(!CINODE_IS_MOUNTED(pInode))

+    {

+        ret = -RED_EINVAL;

+    }

+    else

+    {

+        if(pInode->pInodeBuf->ullSize != 0U)

+        {

+            ret = RedInodeDataTruncate(pInode, UINT64_SUFFIX(0));

+        }

+

+        if(ret == 0)

+        {

+            ret = RedInodeFree(pInode);

+        }

+    }

+

+    return ret;

+}

+

+

+/** @brief Decrement an inode link count and delete the inode if the link count

+           falls to zero.

+

+    @param pInode   A pointer to the cached inode structure.

+

+    @return A negated ::REDSTATUS code indicating the operation result.

+

+    @retval 0           Operation was successful.

+    @retval -RED_EINVAL @p pInode is not a mounted cachde inode.

+    @retval -RED_EIO    A disk I/O error occurred.

+*/

+REDSTATUS RedInodeLinkDec(

+    CINODE     *pInode)

+{

+    REDSTATUS   ret;

+

+    if(!CINODE_IS_MOUNTED(pInode))

+    {

+        ret = -RED_EINVAL;

+    }

+  #if REDCONF_API_POSIX_LINK == 1

+    else if(pInode->pInodeBuf->uNLink > 1U)

+    {

+        ret = RedInodeBranch(pInode);

+

+        if(ret == 0)

+        {

+            pInode->pInodeBuf->uNLink--;

+        }

+    }

+  #endif

+    else

+    {

+        ret = RedInodeDelete(pInode);

+    }

+

+    return ret;

+}

+#endif /* DELETE_SUPPORTED */

+

+

+#if (REDCONF_READ_ONLY == 0) && (REDCONF_API_POSIX == 1)

+/** @brief Free an inode.

+

+    @param pInode   Pointer to the cached inode structure.

+

+    @return A negated ::REDSTATUS code indicating the operation result.

+

+    @retval 0           Operation was successful.

+    @retval -RED_EBADF  The inode is free.

+    @retval -RED_EINVAL @p pInode is `NULL`; or pInode->pBuffer is `NULL`.

+    @retval -RED_EIO    A disk I/O error occurred.

+*/

+REDSTATUS RedInodeFree(

+    CINODE     *pInode)

+{

+    REDSTATUS   ret;

+

+    if(!CINODE_IS_MOUNTED(pInode))

+    {

+        ret = -RED_EINVAL;

+    }

+    else

+    {

+        bool fSlot0Allocated;

+

+        RedBufferDiscard(pInode->pInodeBuf);

+        pInode->pInodeBuf = NULL;

+

+        /*  Determine which of the two slots for the inode is currently

+            allocated, and free that slot.

+        */

+        ret = RedInodeBitGet(gpRedCoreVol->bCurMR, pInode->ulInode, 0U, &fSlot0Allocated);

+

+        if(ret == 0)

+        {

+            bool fSlot1Allocated;

+

+            ret = RedInodeBitGet(gpRedCoreVol->bCurMR, pInode->ulInode, 1U, &fSlot1Allocated);

+

+            if(ret == 0)

+            {

+                if(fSlot0Allocated)

+                {

+                    if(fSlot1Allocated)

+                    {

+                        /*  Both inode slots should never be allocated at

+                            the same time.

+                        */

+                        CRITICAL_ERROR();

+                        ret = -RED_EFUBAR;

+                    }

+                    else

+                    {

+                        ret = InodeBitSet(pInode->ulInode, 0U, false);

+                    }

+                }

+                else

+                {

+                    if(!fSlot1Allocated)

+                    {

+                        /*  The inode in unallocated, which should have been

+                            caught when it was mounted.

+                        */

+                        CRITICAL_ERROR();

+                        ret = -RED_EBADF;

+                    }

+                    else

+                    {

+                        ret = InodeBitSet(pInode->ulInode, 1U, false);

+                    }

+                }

+            }

+        }

+

+        pInode->ulInode = INODE_INVALID;

+

+        if(ret == 0)

+        {

+            if(gpRedMR->ulFreeInodes >= gpRedVolConf->ulInodeCount)

+            {

+                CRITICAL_ERROR();

+                ret = -RED_EFUBAR;

+            }

+            else

+            {

+                gpRedMR->ulFreeInodes++;

+            }

+        }

+    }

+

+    return ret;

+}

+#endif /* (REDCONF_READ_ONLY == 0) && (REDCONF_API_POSIX == 1) */

+

+

+/** @brief Put the cached inode structure.

+

+    This puts all of the buffers in the ::CINODE structure.  Also updates inode

+    timestamp fields if requested.

+

+    @param pInode       The cached inode structure.

+    @param bTimeFields  The inode timestamp fields to update.

+*/

+void RedInodePut(

+    CINODE  *pInode,

+    uint8_t  bTimeFields)

+{

+    if(pInode == NULL)

+    {

+        REDERROR();

+    }

+    else

+    {

+        RedInodePutCoord(pInode);

+

+        if(pInode->pInodeBuf != NULL)

+        {

+          #if (REDCONF_READ_ONLY == 0) && (REDCONF_INODE_TIMESTAMPS == 1)

+            if((bTimeFields & IPUT_UPDATE_MASK) != 0U)

+            {

+                if(!pInode->fBranched || !pInode->fDirty)

+                {

+                    REDERROR();

+                }

+                else

+                {

+                    uint32_t ulNow = RedOsClockGetTime();

+

+                  #if REDCONF_ATIME == 1

+                    if((bTimeFields & IPUT_UPDATE_ATIME) != 0U)

+                    {

+                        pInode->pInodeBuf->ulATime = ulNow;

+                    }

+                  #endif

+

+                    if((bTimeFields & IPUT_UPDATE_MTIME) != 0U)

+                    {

+                        pInode->pInodeBuf->ulMTime = ulNow;

+                    }

+

+                    if((bTimeFields & IPUT_UPDATE_CTIME) != 0U)

+                    {

+                        pInode->pInodeBuf->ulCTime = ulNow;

+                    }

+                }

+            }

+          #else

+            (void)bTimeFields;

+          #endif

+

+            RedBufferPut(pInode->pInodeBuf);

+            pInode->pInodeBuf = NULL;

+        }

+    }

+}

+

+

+/** @brief Put all buffers in the cached inode structure except for the inode

+           node buffer.

+

+    @param pInode   A pointer to the cached inode structure.

+*/

+void RedInodePutCoord(

+    CINODE *pInode)

+{

+    if(pInode == NULL)

+    {

+        REDERROR();

+    }

+    else

+    {

+        RedInodePutData(pInode);

+      #if REDCONF_DIRECT_POINTERS < INODE_ENTRIES

+        RedInodePutIndir(pInode);

+      #endif

+      #if DINDIR_POINTERS > 0U

+        RedInodePutDindir(pInode);

+      #endif

+    }

+}

+

+

+#if DINDIR_POINTERS > 0U

+/** @brief Put the double indirect buffer.

+

+    @param pInode   A pointer to the cached inode structure.

+*/

+void RedInodePutDindir(

+    CINODE *pInode)

+{

+    if(pInode == NULL)

+    {

+        REDERROR();

+    }

+    else if(pInode->pDindir != NULL)

+    {

+        RedBufferPut(pInode->pDindir);

+        pInode->pDindir = NULL;

+    }

+    else

+    {

+        /*  No double indirect buffer, nothing to put.

+        */

+    }

+}

+#endif

+

+

+#if REDCONF_DIRECT_POINTERS < INODE_ENTRIES

+/** @brief Put the indirect buffer.

+

+    @param pInode   A pointer to the cached inode structure.

+*/

+void RedInodePutIndir(

+    CINODE *pInode)

+{

+    if(pInode == NULL)

+    {

+        REDERROR();

+    }

+    else if(pInode->pIndir != NULL)

+    {

+        RedBufferPut(pInode->pIndir);

+        pInode->pIndir = NULL;

+    }

+    else

+    {

+        /*  No indirect buffer, nothing to put.

+        */

+    }

+}

+#endif

+

+

+/** @brief Put the inode data buffer.

+

+    @param pInode   A pointer to the cached inode structure.

+*/

+void RedInodePutData(

+    CINODE *pInode)

+{

+    if(pInode == NULL)

+    {

+        REDERROR();

+    }

+    else if(pInode->pbData != NULL)

+    {

+        RedBufferPut(pInode->pbData);

+        pInode->pbData = NULL;

+    }

+    else

+    {

+        /*  No data buffer, nothing to put.

+        */

+    }

+}

+

+

+#if REDCONF_READ_ONLY == 0

+/** @brief Determine if an inode is branched.

+

+    @param ulInode      The inode number to examine.

+    @param pfIsBranched On successful return, populated with whether the inode

+                        is branched.

+

+    @return A negated ::REDSTATUS code indicating the operation result.

+

+    @retval 0           Operation was successful.

+    @retval -RED_EINVAL @p pInode is `NULL`; or @p ulInode is not a valid inode

+                        number.

+    @retval -RED_EIO    A disk I/O error occurred.

+*/

+static REDSTATUS InodeIsBranched(

+    uint32_t    ulInode,

+    bool       *pfIsBranched)

+{

+    REDSTATUS   ret;

+

+    if(!INODE_IS_VALID(ulInode) || (pfIsBranched == NULL))

+    {

+        REDERROR();

+        ret = -RED_EINVAL;

+    }

+    else

+    {

+        ALLOCSTATE state;

+

+        ret = RedImapBlockState(InodeBlock(ulInode, 0U), &state);

+

+        if(ret == 0)

+        {

+            if(state == ALLOCSTATE_NEW)

+            {

+                *pfIsBranched = true;

+            }

+            else

+            {

+                ret = RedImapBlockState(InodeBlock(ulInode, 1U), &state);

+

+                if(ret == 0)

+                {

+                    if(state == ALLOCSTATE_NEW)

+                    {

+                        *pfIsBranched = true;

+                    }

+                    else

+                    {

+                        *pfIsBranched = false;

+                    }

+                }

+            }

+        }

+    }

+

+    return ret;

+}

+

+

+/** @brief Branch an inode.

+

+    A branched inode is one in which the allocation state for one copy is free

+    or almost free, and the other copy is in the new state.  The copy which is

+    in the new state is the writeable copy, which is also buffered and dirty.

+

+    @param pInode   Pointer to the cached inode structure which has already been

+                    mounted.

+

+    @return A negated ::REDSTATUS code indicating the operation result.

+

+    @retval 0           Operation was successful.

+    @retval -RED_EINVAL Invalid parameters.

+    @retval -RED_EIO    A disk I/O error occurred.

+*/

+REDSTATUS RedInodeBranch(

+    CINODE *pInode)

+{

+    REDSTATUS ret;

+

+    if(!CINODE_IS_MOUNTED(pInode))

+    {

+        REDERROR();

+        ret = -RED_EINVAL;

+    }

+    else if(!pInode->fBranched)

+    {

+        uint8_t bWhich;

+

+        ret = InodeGetWriteableCopy(pInode->ulInode, &bWhich);

+

+        if(ret == 0)

+        {

+            RedBufferBranch(pInode->pInodeBuf, InodeBlock(pInode->ulInode, bWhich));

+            pInode->fBranched = true;

+            pInode->fDirty = true;

+        }

+

+        /*  Toggle the inode slots: the old slot block becomes almost free

+            (still used by the committed state) and the new slot block becomes

+            new.

+        */

+        if(ret == 0)

+        {

+            ret = InodeBitSet(pInode->ulInode, 1U - bWhich, false);

+        }

+

+        if(ret == 0)

+        {

+            ret = InodeBitSet(pInode->ulInode, bWhich, true);

+        }

+

+        CRITICAL_ASSERT(ret == 0);

+    }

+    else

+    {

+        RedBufferDirty(pInode->pInodeBuf);

+        pInode->fDirty = true;

+        ret = 0;

+    }

+

+    return ret;

+}

+#endif /* REDCONF_READ_ONLY == 0 */

+

+

+#if (REDCONF_READ_ONLY == 0) && (REDCONF_API_POSIX == 1)

+/** @brief Find a free inode number.

+

+    @param pulInode On successful return, populated with a free inode number.

+

+    @return A negated ::REDSTATUS code indicating the operation result.

+

+    @retval 0           Operation was successful.

+    @retval -RED_EINVAL @p pulInode is `NULL`.

+    @retval -RED_EIO    A disk I/O error occurred.

+    @retval -RED_ENFILE No available inode numbers.

+*/

+static REDSTATUS InodeFindFree(

+    uint32_t   *pulInode)

+{

+    REDSTATUS   ret;

+

+    if(pulInode == NULL)

+    {

+        REDERROR();

+        ret = -RED_EINVAL;

+    }

+    else if(gpRedMR->ulFreeInodes == 0U)

+    {

+        ret = -RED_ENFILE;

+    }

+    else

+    {

+        uint32_t ulInode;

+

+        ret = 0;

+

+        for(ulInode = INODE_FIRST_FREE; ulInode < (INODE_FIRST_VALID + gpRedVolConf->ulInodeCount); ulInode++)

+        {

+            bool fFree;

+

+            ret = RedInodeIsFree(ulInode, &fFree);

+

+            if((ret != 0) || fFree)

+            {

+                break;

+            }

+        }

+

+        if(ret == 0)

+        {

+            if(ulInode < (INODE_FIRST_VALID + gpRedVolConf->ulInodeCount))

+            {

+                *pulInode = ulInode;

+            }

+            else

+            {

+                /*  If gpRedMR->ulFreeInodes > 0, we should have found an inode.

+                */

+                CRITICAL_ERROR();

+                ret = -RED_ENFILE;

+            }

+        }

+    }

+

+    return ret;

+}

+#endif

+

+

+#if ((REDCONF_READ_ONLY == 0) && ((REDCONF_API_POSIX == 1) || FORMAT_SUPPORTED)) || (REDCONF_CHECKER == 1)

+/** @brief Determine whether an inode number is available.

+

+    @param ulInode  The node number to examine.

+    @param pfFree   On successful return, populated with whether the inode

+                    number is available (true) or in use (false).

+

+    @return A negated ::REDSTATUS code indicating the operation result.

+

+    @retval 0           Operation was successful.

+    @retval -RED_EINVAL @p pfFree is `NULL`; or @p ulInode is not a valid inode

+                        number.

+    @retval -RED_EIO    A disk I/O error occurred.

+*/

+REDSTATUS RedInodeIsFree(

+    uint32_t    ulInode,

+    bool       *pfFree)

+{

+    REDSTATUS   ret;

+

+    if(pfFree == NULL)

+    {

+        REDERROR();

+        ret = -RED_EINVAL;

+    }

+    else

+    {

+        bool fSlot0Allocated;

+

+        *pfFree = false;

+

+        ret = RedInodeBitGet(gpRedCoreVol->bCurMR, ulInode, 0U, &fSlot0Allocated);

+        if((ret == 0) && !fSlot0Allocated)

+        {

+            bool fSlot1Allocated;

+

+            ret = RedInodeBitGet(gpRedCoreVol->bCurMR, ulInode, 1U, &fSlot1Allocated);

+            if((ret == 0) && !fSlot1Allocated)

+            {

+                *pfFree = true;

+            }

+        }

+    }

+

+    return ret;

+}

+#endif

+

+

+#if REDCONF_READ_ONLY == 0

+/** @brief Determine which copy of the inode is currently writeable.

+

+    @param ulInode  The inode number to examine.

+    @param pbWhich  On successful return, populated with which copy of the inode

+                    (either 0 or 1) is writeable.

+

+    @return A negated ::REDSTATUS code indicating the operation result.

+

+    @retval 0           Operation was successful.

+    @retval -RED_EINVAL @p pbWhich is `NULL`; or ulInode is not a valid inode

+                        number.

+    @retval -RED_EIO    A disk I/O error occurred.

+*/

+static REDSTATUS InodeGetWriteableCopy(

+    uint32_t    ulInode,

+    uint8_t    *pbWhich)

+{

+    REDSTATUS   ret;

+

+    if(pbWhich == NULL)

+    {

+        REDERROR();

+        ret = -RED_EINVAL;

+    }

+    else

+    {

+        bool fSlot0Allocated;

+

+        /*  The writeable inode slot is the one which is free in the committed

+            state, so query the committed state metaroot.

+        */

+        ret = RedInodeBitGet(1U - gpRedCoreVol->bCurMR, ulInode, 0U, &fSlot0Allocated);

+

+        if(ret == 0)

+        {

+            if(!fSlot0Allocated)

+            {

+                *pbWhich = 0U;

+            }

+            else

+            {

+                bool fSlot1Allocated;

+

+                ret = RedInodeBitGet(1U - gpRedCoreVol->bCurMR, ulInode, 1U, &fSlot1Allocated);

+

+                if(ret == 0)

+                {

+                    if(!fSlot1Allocated)

+                    {

+                        *pbWhich = 1U;

+                    }

+                    else

+                    {

+                        /*  Both inode slots were allocated, which should never

+                            happen.

+                        */

+                        CRITICAL_ERROR();

+                        ret = -RED_EFUBAR;

+                    }

+                }

+            }

+        }

+    }

+

+    return ret;

+}

+#endif

+

+

+/** @brief Determine which copy of the inode is current.

+

+    @param ulInode  The inode number to examine.

+    @param pbWhich  On successful return, populated with which copy of the inode

+                    (either 0 or 1) is current.

+

+    @return A negated ::REDSTATUS code indicating the operation result.

+

+    @retval 0           Operation was successful.

+    @retval -RED_EBADF  @p ulInode is an unallocated inode number.

+    @retval -RED_EINVAL @p pbWhich is `NULL`; or ulInode is not a valid inode

+                        number.

+    @retval -RED_EIO    A disk I/O error occurred.

+*/

+static REDSTATUS InodeGetCurrentCopy(

+    uint32_t    ulInode,

+    uint8_t    *pbWhich)

+{

+    REDSTATUS   ret;

+

+    if(pbWhich == NULL)

+    {

+        REDERROR();

+        ret = -RED_EINVAL;

+    }

+    else

+    {

+        bool fSlot0Allocated;

+

+        /*  The current inode slot is the one which is allocated in the working

+            state metaroot.

+        */

+        ret = RedInodeBitGet(gpRedCoreVol->bCurMR, ulInode, 0U, &fSlot0Allocated);

+        if(ret == 0)

+        {

+            if(fSlot0Allocated)

+            {

+                *pbWhich = 0U;

+            }

+            else

+            {

+                bool fSlot1Allocated;

+

+                ret = RedInodeBitGet(gpRedCoreVol->bCurMR, ulInode, 1U, &fSlot1Allocated);

+                if(ret == 0)

+                {

+                    if(fSlot1Allocated)

+                    {

+                        *pbWhich = 1U;

+                    }

+                    else

+                    {

+                        /*  Neither slot for this inode was allocated, so the

+                            inode is actually free.

+                        */

+                        ret = -RED_EBADF;

+                    }

+                }

+            }

+        }

+    }

+

+    return ret;

+}

+

+

+/** @brief Get whether a copy of an inode is allocated.

+

+    @param bMR          The metaroot index: either 0 or 1.

+    @param ulInode      The inode number.

+    @param bWhich       Which copy of the inode to get.

+    @param pfAllocated  On successful return, populated with whether the given

+                        copy of the inode is allocated.

+

+    @return A negated ::REDSTATUS code indicating the operation result.

+

+    @retval 0           Operation was successful.

+    @retval -RED_EINVAL @p bMR is not 1 or 0; @p ulInode is not a valid inode

+                        number; or @p bWhich is not 1 or 0; or @p pfAllocated is

+                        `NULL`.

+    @retval -RED_EIO    A disk I/O error occurred.

+*/

+REDSTATUS RedInodeBitGet(

+    uint8_t     bMR,

+    uint32_t    ulInode,

+    uint8_t     bWhich,

+    bool       *pfAllocated)

+{

+    REDSTATUS   ret;

+

+    if(!INODE_IS_VALID(ulInode) || (bWhich > 1U))

+    {

+        REDERROR();

+        ret = -RED_EINVAL;

+    }

+    else

+    {

+        ret = RedImapBlockGet(bMR, InodeBlock(ulInode, bWhich), pfAllocated);

+    }

+

+    return ret;

+}

+

+

+#if REDCONF_READ_ONLY == 0

+/** @brief Set whether a copy of an inode is allocated.

+

+    @param ulInode      The inode number.

+    @param bWhich       Which copy of the inode to set.

+    @param fAllocated   If true, the inode is set to allocated; if false, the

+                        inode is set to free.

+

+    @return A negated ::REDSTATUS code indicating the operation result.

+

+    @retval 0           Operation was successful.

+    @retval -RED_EINVAL @p ulInode is not a valid inode number; or @p bWhich is

+                        not 1 or 0.

+    @retval -RED_EIO    A disk I/O error occurred.

+*/

+static REDSTATUS InodeBitSet(

+    uint32_t    ulInode,

+    uint8_t     bWhich,

+    bool        fAllocated)

+{

+    REDSTATUS   ret;

+

+    if(!INODE_IS_VALID(ulInode) || (bWhich > 1U))

+    {

+        REDERROR();

+        ret = -RED_EINVAL;

+    }

+    else

+    {

+        ret = RedImapBlockSet(InodeBlock(ulInode, bWhich), fAllocated);

+    }

+

+    return ret;

+}

+#endif

+

+

+/** @brief Determine the block number of an inode.

+

+    @param ulInode  The inode number.

+    @param bWhich   Which copy of the inode.

+

+    @return The block number of the inode.

+*/

+static uint32_t InodeBlock(

+    uint32_t    ulInode,

+    uint8_t     bWhich)

+{

+    REDASSERT(INODE_IS_VALID(ulInode));

+    REDASSERT(bWhich <= 1U);

+

+    return gpRedCoreVol->ulInodeTableStartBN + ((ulInode - INODE_FIRST_VALID) * 2U) + bWhich;

+}

+

diff --git a/FreeRTOS-Plus/Source/Reliance-Edge/core/driver/inodedata.c b/FreeRTOS-Plus/Source/Reliance-Edge/core/driver/inodedata.c
new file mode 100644
index 0000000..c311925
--- /dev/null
+++ b/FreeRTOS-Plus/Source/Reliance-Edge/core/driver/inodedata.c
@@ -0,0 +1,1917 @@
+/*             ----> DO NOT REMOVE THE FOLLOWING NOTICE <----

+

+                   Copyright (c) 2014-2015 Datalight, Inc.

+                       All Rights Reserved Worldwide.

+

+    This program is free software; you can redistribute it and/or modify

+    it under the terms of the GNU General Public License as published by

+    the Free Software Foundation; use version 2 of the License.

+

+    This program is distributed in the hope that it will be useful,

+    but "AS-IS," WITHOUT ANY WARRANTY; without even the implied warranty

+    of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the

+    GNU General Public License for more details.

+

+    You should have received a copy of the GNU General Public License along

+    with this program; if not, write to the Free Software Foundation, Inc.,

+    51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.

+*/

+/*  Businesses and individuals that for commercial or other reasons cannot

+    comply with the terms of the GPLv2 license may obtain a commercial license

+    before incorporating Reliance Edge into proprietary software for

+    distribution in any form.  Visit http://www.datalight.com/reliance-edge for

+    more information.

+*/

+/** @file

+    @brief Implements inode I/O functions.

+*/

+#include <redfs.h>

+#include <redcore.h>

+

+

+/*  This value is used to initialize the uIndirEntry and uDindirEntry members of

+    the CINODE structure.  After seeking, a value of COORD_ENTRY_INVALID in

+    uIndirEntry indicates that there is no indirect node in the path through the

+    file metadata structure, and a value of COORD_ENTRY_INVALID in uDindirEntry

+    indicates that there is no double indirect node.

+*/

+#define COORD_ENTRY_INVALID (UINT16_MAX)

+

+/*  This enumeration is used by the BranchBlock() and BranchBlockCost()

+    functions to determine which blocks of the file metadata structure need to

+    be branched, and which to ignore.  DINDIR requires requires branching the

+    double indirect only, INDIR requires branching the double indirect

+    (if present) and the indirect, and FILE_DATA requires branching the indirect

+    and double indirect (if present) and the file data block.

+*/

+typedef enum

+{

+    BRANCHDEPTH_DINDIR      = 0U,

+    BRANCHDEPTH_INDIR       = 1U,

+    BRANCHDEPTH_FILE_DATA   = 2U,

+    BRANCHDEPTH_MAX         = BRANCHDEPTH_FILE_DATA

+} BRANCHDEPTH;

+

+

+#if REDCONF_READ_ONLY == 0

+#if DELETE_SUPPORTED || TRUNCATE_SUPPORTED

+static REDSTATUS Shrink(CINODE *pInode, uint64_t ullSize);

+#if DINDIR_POINTERS > 0U

+static REDSTATUS TruncDindir(CINODE *pInode, bool *pfFreed);

+#endif

+#if REDCONF_DIRECT_POINTERS < INODE_ENTRIES

+static REDSTATUS TruncIndir(CINODE *pInode, bool *pfFreed);

+#endif

+static REDSTATUS TruncDataBlock(const CINODE *pInode, uint32_t *pulBlock, bool fPropagate);

+#endif

+static REDSTATUS ExpandPrepare(CINODE *pInode);

+#endif

+static void SeekCoord(CINODE *pInode, uint32_t ulBlock);

+static REDSTATUS ReadUnaligned(CINODE *pInode, uint64_t ullStart, uint32_t ulLen, uint8_t *pbBuffer);

+static REDSTATUS ReadAligned(CINODE *pInode, uint32_t ulBlockStart, uint32_t ulBlockCount, uint8_t *pbBuffer);

+#if REDCONF_READ_ONLY == 0

+static REDSTATUS WriteUnaligned(CINODE *pInode, uint64_t ullStart, uint32_t ulLen, const uint8_t *pbBuffer);

+static REDSTATUS WriteAligned(CINODE *pInode, uint32_t ulBlockStart, uint32_t *pulBlockCount, const uint8_t *pbBuffer);

+#endif

+static REDSTATUS GetExtent(CINODE *pInode, uint32_t ulBlockStart, uint32_t *pulExtentStart, uint32_t *pulExtentLen);

+#if REDCONF_READ_ONLY == 0

+static REDSTATUS BranchBlock(CINODE *pInode, BRANCHDEPTH depth, bool fBuffer);

+static REDSTATUS BranchOneBlock(uint32_t *pulBlock, void **ppBuffer, uint16_t uBFlag);

+static REDSTATUS BranchBlockCost(const CINODE *pInode, BRANCHDEPTH depth, uint32_t *pulCost);

+static uint32_t FreeBlockCount(void);

+#endif

+

+

+/** @brief Read data from an inode.

+

+    @param pInode   A pointer to the cached inode structure of the inode from

+                    which to read.

+    @param ullStart The file offset at which to read.

+    @param pulLen   On input, the number of bytes to attempt to read.  On

+                    successful return, populated with the number of bytes

+                    actually read.

+    @param pBuffer  The buffer to read into.

+

+    @return A negated ::REDSTATUS code indicating the operation result.

+

+    @retval 0           Operation was successful.

+    @retval -RED_EIO    A disk I/O error occurred.

+    @retval -RED_EINVAL @p pInode is not a mounted cached inode pointer; or

+                        @p pulLen is `NULL`; or @p pBuffer is `NULL`.

+*/

+REDSTATUS RedInodeDataRead(

+    CINODE     *pInode,

+    uint64_t    ullStart,

+    uint32_t   *pulLen,

+    void       *pBuffer)

+{

+    REDSTATUS   ret = 0;

+

+    if(!CINODE_IS_MOUNTED(pInode) || (pulLen == NULL) || (pBuffer == NULL))

+    {

+        ret = -RED_EINVAL;

+    }

+    else if(ullStart >= pInode->pInodeBuf->ullSize)

+    {

+        *pulLen = 0U;

+    }

+    else if(*pulLen == 0U)

+    {

+        /*  Do nothing, just return success.

+        */

+    }

+    else

+    {

+        uint8_t    *pbBuffer = CAST_VOID_PTR_TO_UINT8_PTR(pBuffer);

+        uint32_t    ulReadIndex = 0U;

+        uint32_t    ulLen = *pulLen;

+        uint32_t    ulRemaining;

+

+        /*  Reading beyond the end of the file is not allowed.  If the requested

+            read extends beyond the end of the file, truncate the read length so

+            that the read stops at the end of the file.

+        */

+        if((pInode->pInodeBuf->ullSize - ullStart) < ulLen)

+        {

+            ulLen = (uint32_t)(pInode->pInodeBuf->ullSize - ullStart);

+        }

+

+        ulRemaining = ulLen;

+

+        /*  Unaligned partial block at start.

+        */

+        if((ullStart & (REDCONF_BLOCK_SIZE - 1U)) != 0U)

+        {

+            uint32_t ulBytesInFirstBlock = REDCONF_BLOCK_SIZE - (uint32_t)(ullStart & (REDCONF_BLOCK_SIZE - 1U));

+            uint32_t ulThisRead = REDMIN(ulRemaining, ulBytesInFirstBlock);

+

+            ret = ReadUnaligned(pInode, ullStart, ulThisRead, pbBuffer);

+

+            if(ret == 0)

+            {

+                ulReadIndex += ulThisRead;

+                ulRemaining -= ulThisRead;

+            }

+        }

+

+        /*  Whole blocks.

+        */

+        if((ret == 0) && (ulRemaining >= REDCONF_BLOCK_SIZE))

+        {

+            uint32_t ulBlockOffset = (uint32_t)((ullStart + ulReadIndex) >> BLOCK_SIZE_P2);

+            uint32_t ulBlockCount = ulRemaining >> BLOCK_SIZE_P2;

+

+            REDASSERT(((ullStart + ulReadIndex) & (REDCONF_BLOCK_SIZE - 1U)) == 0U);

+

+            ret = ReadAligned(pInode, ulBlockOffset, ulBlockCount, &pbBuffer[ulReadIndex]);

+

+            if(ret == 0)

+            {

+                ulReadIndex += ulBlockCount << BLOCK_SIZE_P2;

+                ulRemaining -= ulBlockCount << BLOCK_SIZE_P2;

+            }

+        }

+

+        /*  Aligned partial block at end.

+        */

+        if((ret == 0) && (ulRemaining > 0U))

+        {

+            REDASSERT(ulRemaining < REDCONF_BLOCK_SIZE);

+            REDASSERT(((ullStart + ulReadIndex) & (REDCONF_BLOCK_SIZE - 1U)) == 0U);

+

+            ret = ReadUnaligned(pInode, ullStart + ulReadIndex, ulRemaining, &pbBuffer[ulReadIndex]);

+        }

+

+        if(ret == 0)

+        {

+            *pulLen = ulLen;

+        }

+    }

+

+    return ret;

+}

+

+

+#if REDCONF_READ_ONLY == 0

+/** @brief Write to an inode.

+

+    @param pInode   A pointer to the cached inode structure of the inode into

+                    which to write.

+    @param ullStart The file offset at which to write.

+    @param pulLen   On input, the number of bytes to attempt to write.  On

+                    successful return, populated with the number of bytes

+                    actually written.

+    @param pBuffer  The buffer to write from.

+

+    @return A negated ::REDSTATUS code indicating the operation result.

+

+    @retval 0           Operation was successful.

+    @retval -RED_EFBIG  @p ullStart is greater than the maximum file size; or

+                        @p ullStart is equal to the maximum file size and the

+                        write length is non-zero.

+    @retval -RED_EINVAL @p pInode is not a mounted cached inode pointer; or

+                        @p pulLen is `NULL`; or @p pBuffer is `NULL`.

+    @retval -RED_EIO    A disk I/O error occurred.

+    @retval -RED_ENOSPC No data can be written because there is insufficient

+                        free space.

+*/

+REDSTATUS RedInodeDataWrite(

+    CINODE     *pInode,

+    uint64_t    ullStart,

+    uint32_t   *pulLen,

+    const void *pBuffer)

+{

+    REDSTATUS   ret = 0;

+

+    if(!CINODE_IS_DIRTY(pInode) || (pulLen == NULL) || (pBuffer == NULL))

+    {

+        ret = -RED_EINVAL;

+    }

+    else if((ullStart > INODE_SIZE_MAX) || ((ullStart == INODE_SIZE_MAX) && (*pulLen > 0U)))

+    {

+        ret = -RED_EFBIG;

+    }

+    else if(*pulLen == 0U)

+    {

+        /*  Do nothing, just return success.

+        */

+    }

+    else

+    {

+        const uint8_t  *pbBuffer = CAST_VOID_PTR_TO_CONST_UINT8_PTR(pBuffer);

+        uint32_t        ulWriteIndex = 0U;

+        uint32_t        ulLen = *pulLen;

+        uint32_t        ulRemaining;

+

+        if((INODE_SIZE_MAX - ullStart) < ulLen)

+        {

+            ulLen = (uint32_t)(INODE_SIZE_MAX - ullStart);

+        }

+

+        ulRemaining = ulLen;

+

+        /*  If the write is beyond the current end of the file, and the current

+            end of the file is not block-aligned, then there may be some data

+            that needs to be zeroed in the last block.

+        */

+        if(ullStart > pInode->pInodeBuf->ullSize)

+        {

+            ret = ExpandPrepare(pInode);

+        }

+

+        /*  Partial block at start.

+        */

+        if((ret == 0) && (((ullStart & (REDCONF_BLOCK_SIZE - 1U)) != 0U) || (ulRemaining < REDCONF_BLOCK_SIZE)))

+        {

+            uint32_t ulBytesInFirstBlock = REDCONF_BLOCK_SIZE - (uint32_t)(ullStart & (REDCONF_BLOCK_SIZE - 1U));

+            uint32_t ulThisWrite = REDMIN(ulRemaining, ulBytesInFirstBlock);

+

+            ret = WriteUnaligned(pInode, ullStart, ulThisWrite, pbBuffer);

+

+            if(ret == 0)

+            {

+                ulWriteIndex += ulThisWrite;

+                ulRemaining -= ulThisWrite;

+            }

+        }

+

+        /*  Whole blocks.

+        */

+        if((ret == 0) && (ulRemaining >= REDCONF_BLOCK_SIZE))

+        {

+            uint32_t ulBlockOffset = (uint32_t)((ullStart + ulWriteIndex) >> BLOCK_SIZE_P2);

+            uint32_t ulBlockCount = ulRemaining >> BLOCK_SIZE_P2;

+            uint32_t ulBlocksWritten = ulBlockCount;

+

+            REDASSERT(((ullStart + ulWriteIndex) & (REDCONF_BLOCK_SIZE - 1U)) == 0U);

+

+            ret = WriteAligned(pInode, ulBlockOffset, &ulBlocksWritten, &pbBuffer[ulWriteIndex]);

+

+            if((ret == -RED_ENOSPC) && (ulWriteIndex > 0U))

+            {

+                ulBlocksWritten = 0U;

+                ret = 0;

+            }

+

+            if(ret == 0)

+            {

+                ulWriteIndex += ulBlocksWritten << BLOCK_SIZE_P2;

+                ulRemaining -= ulBlocksWritten << BLOCK_SIZE_P2;

+

+                if(ulBlocksWritten < ulBlockCount)

+                {

+                    ulRemaining = 0U;

+                }

+            }

+        }

+

+        /*  Partial block at end.

+        */

+        if((ret == 0) && (ulRemaining > 0U))

+        {

+            REDASSERT(ulRemaining < REDCONF_BLOCK_SIZE);

+            REDASSERT(((ullStart + ulWriteIndex) & (REDCONF_BLOCK_SIZE - 1U)) == 0U);

+            REDASSERT(ulWriteIndex > 0U);

+

+            ret = WriteUnaligned(pInode, ullStart + ulWriteIndex, ulRemaining, &pbBuffer[ulWriteIndex]);

+

+            if(ret == -RED_ENOSPC)

+            {

+                ret = 0;

+            }

+            else if(ret == 0)

+            {

+                ulWriteIndex += ulRemaining;

+

+                REDASSERT(ulWriteIndex == ulLen);

+            }

+            else

+            {

+                /*  Unexpected error, return it.

+                */

+            }

+        }

+

+        if(ret == 0)

+        {

+            *pulLen = ulWriteIndex;

+

+            if((ullStart + ulWriteIndex) > pInode->pInodeBuf->ullSize)

+            {

+                pInode->pInodeBuf->ullSize = ullStart + ulWriteIndex;

+            }

+        }

+    }

+

+    return ret;

+}

+

+

+#if DELETE_SUPPORTED || TRUNCATE_SUPPORTED

+/** @brief Change the size of an inode.

+

+    @param pInode   A pointer to the cached inode structure.

+    @praam ullSize  The new file size for the inode.

+

+    @return A negated ::REDSTATUS code indicating the operation result.

+

+    @retval 0           Operation was successful.

+    @retval -RED_EFBIG  @p ullSize is greater than the maximum file size.

+    @retval -RED_EINVAL @p pInode is not a mounted cached inode pointer.

+    @retval -RED_EIO    A disk I/O error occurred.

+    @retval -RED_ENOSPC Insufficient free space to perform the truncate.

+*/

+REDSTATUS RedInodeDataTruncate(

+    CINODE     *pInode,

+    uint64_t    ullSize)

+{

+    REDSTATUS   ret = 0;

+

+    /*  The inode does not need to be dirtied when it is being deleted, because

+        the inode buffer will be discarded without ever being written to disk.

+        Thus, we only check to see if it's mounted here.

+    */

+    if(!CINODE_IS_MOUNTED(pInode))

+    {

+        ret = -RED_EINVAL;

+    }

+    else if(ullSize > INODE_SIZE_MAX)

+    {

+        ret = -RED_EFBIG;

+    }

+    else

+    {

+        if(ullSize > pInode->pInodeBuf->ullSize)

+        {

+            ret = ExpandPrepare(pInode);

+        }

+        else if(ullSize < pInode->pInodeBuf->ullSize)

+        {

+            ret = Shrink(pInode, ullSize);

+        }

+        else

+        {

+            /*  Size is staying the same, nothing to do.

+            */

+        }

+

+        if(ret == 0)

+        {

+            pInode->pInodeBuf->ullSize = ullSize;

+        }

+    }

+

+    return ret;

+}

+

+

+/** @brief Free all file data beyond a specified point.

+

+    @param pInode   A pointer to the cached inode structure.

+    @param ullSize  The point beyond which to free all file data.

+

+    @return A negated ::REDSTATUS code indicating the operation result.

+

+    @retval 0           Operation was successful.

+    @retval -RED_EIO    A disk I/O error occurred.

+    @retval -RED_ENOSPC Insufficient free space to perform the truncate.

+    @retval -RED_EINVAL Invalid parameters.

+*/

+static REDSTATUS Shrink(

+    CINODE     *pInode,

+    uint64_t    ullSize)

+{

+    REDSTATUS   ret = 0;

+

+    /*  pInode->fDirty is checked explicitly here, instead of using the

+        CINODE_IS_DIRTY() macro, to avoid a duplicate mount check.

+    */

+    if(!CINODE_IS_MOUNTED(pInode) || ((ullSize > 0U) && !pInode->fDirty))

+    {

+        REDERROR();

+        ret = -RED_EINVAL;

+    }

+    else

+    {

+        uint32_t ulTruncBlock = (uint32_t)((ullSize + REDCONF_BLOCK_SIZE - 1U) >> BLOCK_SIZE_P2);

+

+        RedInodePutData(pInode);

+

+      #if REDCONF_DIRECT_POINTERS > 0U

+        while(ulTruncBlock < REDCONF_DIRECT_POINTERS)

+        {

+            ret = TruncDataBlock(pInode, &pInode->pInodeBuf->aulEntries[ulTruncBlock], true);

+

+            if(ret != 0)

+            {

+                break;

+            }

+

+            ulTruncBlock++;

+        }

+      #endif

+

+      #if REDCONF_INDIRECT_POINTERS > 0U

+        while((ret == 0) && (ulTruncBlock < (REDCONF_DIRECT_POINTERS + INODE_INDIR_BLOCKS)))

+        {

+            ret = RedInodeDataSeek(pInode, ulTruncBlock);

+

+            if((ret == 0) || (ret == -RED_ENODATA))

+            {

+                bool fFreed;

+

+                ret = TruncIndir(pInode, &fFreed);

+

+                if(ret == 0)

+                {

+                    if(fFreed)

+                    {

+                        pInode->pInodeBuf->aulEntries[pInode->uInodeEntry] = BLOCK_SPARSE;

+                    }

+

+                    /*  The next seek will go to the beginning of the next

+                        indirect.

+                    */

+                    ulTruncBlock += (INDIR_ENTRIES - pInode->uIndirEntry);

+                }

+            }

+        }

+      #endif

+

+      #if DINDIR_POINTERS > 0U

+        while((ret == 0) && (ulTruncBlock < INODE_DATA_BLOCKS))

+        {

+            ret = RedInodeDataSeek(pInode, ulTruncBlock);

+

+            if((ret == 0) || (ret == -RED_ENODATA))

+            {

+                bool fFreed;

+

+                /*  TruncDindir() invokes seek as it goes along, which will

+                    update the entry values (possibly all three of these);

+                    make a copy so we can compute things correctly after.

+                */

+                uint16_t uOrigInodeEntry = pInode->uInodeEntry;

+                uint16_t uOrigDindirEntry = pInode->uDindirEntry;

+                uint16_t uOrigIndirEntry = pInode->uIndirEntry;

+

+                ret = TruncDindir(pInode, &fFreed);

+

+                if(ret == 0)

+                {

+                    if(fFreed)

+                    {

+                        pInode->pInodeBuf->aulEntries[uOrigInodeEntry] = BLOCK_SPARSE;

+                    }

+

+                    /*  The next seek will go to the beginning of the next

+                        double indirect.

+                    */

+                    ulTruncBlock += (DINDIR_DATA_BLOCKS - (uOrigDindirEntry * INDIR_ENTRIES)) - uOrigIndirEntry;

+                }

+            }

+        }

+      #endif

+    }

+

+    return ret;

+}

+

+

+#if DINDIR_POINTERS > 0U

+/** @brief Truncate a double indirect.

+

+    @param pInode   A pointer to the cached inode, whose coordinates indicate

+                    the truncation boundary.

+    @param pfFreed  On successful return, populated with whether the double

+                    indirect node was freed.

+

+    @return A negated ::REDSTATUS code indicating the operation result.

+

+    @retval 0           Operation was successful.

+    @retval -RED_EIO    A disk I/O error occurred.

+    @retval -RED_ENOSPC Insufficient free space to perform the truncate.

+    @retval -RED_EINVAL Invalid parameters.

+*/

+static REDSTATUS TruncDindir(

+    CINODE     *pInode,

+    bool       *pfFreed)

+{

+    REDSTATUS   ret = 0;

+

+    if(!CINODE_IS_MOUNTED(pInode) || (pfFreed == NULL))

+    {

+        REDERROR();

+        ret = -RED_EINVAL;

+    }

+    else if(pInode->pDindir == NULL)

+    {

+        *pfFreed = false;

+    }

+    else

+    {

+        bool        fBranch = false;

+        uint16_t    uEntry;

+

+        /*  The double indirect is definitely going to be branched (instead of

+            deleted) if any of its indirect pointers which are entirely prior to

+            the truncation boundary are non-sparse.

+        */

+        for(uEntry = 0U; !fBranch && (uEntry < pInode->uDindirEntry); uEntry++)

+        {

+            fBranch = pInode->pDindir->aulEntries[uEntry] != BLOCK_SPARSE;

+        }

+

+        /*  Unless we already know for a fact that the double indirect is going

+            to be branched, examine the contents of the indirect pointer which

+            straddles the truncation boundary.  If the indirect is going to be

+            deleted, we know this indirect pointer is going away, and that might

+            mean the double indirect is going to be deleted also.

+        */

+        if(!fBranch && (pInode->pDindir->aulEntries[pInode->uDindirEntry] != BLOCK_SPARSE))

+        {

+            for(uEntry = 0U; !fBranch && (uEntry < pInode->uIndirEntry); uEntry++)

+            {

+                fBranch = pInode->pIndir->aulEntries[uEntry] != BLOCK_SPARSE;

+            }

+        }

+

+        if(fBranch)

+        {

+            ret = BranchBlock(pInode, BRANCHDEPTH_DINDIR, false);

+        }

+

+        if(ret == 0)

+        {

+            uint32_t ulBlock = pInode->ulLogicalBlock;

+            uint16_t uStart = pInode->uDindirEntry; /* pInode->uDindirEntry will change. */

+

+            for(uEntry = uStart; uEntry < INDIR_ENTRIES; uEntry++)

+            {

+                /*  Seek so that TruncIndir() has the correct indirect

+                    buffer and indirect entry.

+                */

+                ret = RedInodeDataSeek(pInode, ulBlock);

+

+                if(ret == -RED_ENODATA)

+                {

+                    ret = 0;

+                }

+

+                if((ret == 0) && (pInode->ulIndirBlock != BLOCK_SPARSE))

+                {

+                    bool fIndirFreed;

+

+                    ret = TruncIndir(pInode, &fIndirFreed);

+

+                    if(ret == 0)

+                    {

+                        /*  All of the indirects after the one which straddles

+                            the truncation boundary should definitely end up

+                            deleted.

+                        */

+                        REDASSERT((uEntry == uStart) || fIndirFreed);

+

+                        /*  If the double indirect is being freed, all of the

+                            indirects should be freed too.

+                        */

+                        REDASSERT(fIndirFreed || fBranch);

+

+                        if(fBranch && fIndirFreed)

+                        {

+                            pInode->pDindir->aulEntries[uEntry] = BLOCK_SPARSE;

+                        }

+                    }

+                }

+

+                if(ret != 0)

+                {

+                    break;

+                }

+

+                ulBlock += (INDIR_ENTRIES - pInode->uIndirEntry);

+            }

+

+            if(ret == 0)

+            {

+                *pfFreed = !fBranch;

+

+                if(!fBranch)

+                {

+                    RedInodePutDindir(pInode);

+

+                    ret = RedImapBlockSet(pInode->ulDindirBlock, false);

+                }

+            }

+        }

+    }

+

+    return ret;

+}

+#endif /* DINDIR_POINTERS > 0U */

+

+

+#if REDCONF_DIRECT_POINTERS < INODE_ENTRIES

+/** @brief Truncate a indirect.

+

+    @param pInode   A pointer to the cached inode, whose coordinates indicate

+                    the truncation boundary.

+    @param pfFreed  On successful return, populated with whether the indirect

+                    node was freed.

+

+    @return A negated ::REDSTATUS code indicating the operation result.

+

+    @retval 0           Operation was successful.

+    @retval -RED_EIO    A disk I/O error occurred.

+    @retval -RED_ENOSPC Insufficient free space to perform the truncate.

+    @retval -RED_EINVAL Invalid parameters.

+*/

+static REDSTATUS TruncIndir(

+    CINODE     *pInode,

+    bool       *pfFreed)

+{

+    REDSTATUS   ret = 0;

+

+    if(!CINODE_IS_MOUNTED(pInode) || (pfFreed == NULL))

+    {

+        REDERROR();

+        ret = -RED_EINVAL;

+    }

+    else if(pInode->pIndir == NULL)

+    {

+        *pfFreed = false;

+    }

+    else

+    {

+        bool        fBranch = false;

+        uint16_t    uEntry;

+

+        /*  Scan the range of entries which are not being truncated.  If there

+            is anything there, then the indirect will not be empty after the

+            truncate, so it is branched and modified instead of deleted.

+        */

+        for(uEntry = 0U; !fBranch && (uEntry < pInode->uIndirEntry); uEntry++)

+        {

+            fBranch = pInode->pIndir->aulEntries[uEntry] != BLOCK_SPARSE;

+        }

+

+        if(fBranch)

+        {

+            ret = BranchBlock(pInode, BRANCHDEPTH_INDIR, false);

+        }

+

+        if(ret == 0)

+        {

+            for(uEntry = pInode->uIndirEntry; uEntry < INDIR_ENTRIES; uEntry++)

+            {

+                ret = TruncDataBlock(pInode, &pInode->pIndir->aulEntries[uEntry], fBranch);

+

+                if(ret != 0)

+                {

+                    break;

+                }

+            }

+

+            if(ret == 0)

+            {

+                *pfFreed = !fBranch;

+

+                if(!fBranch)

+                {

+                    RedInodePutIndir(pInode);

+

+                    ret = RedImapBlockSet(pInode->ulIndirBlock, false);

+                }

+            }

+        }

+    }

+

+    return ret;

+}

+#endif /* REDCONF_DIRECT_POINTERS < INODE_ENTRIES */

+

+

+/** @brief Truncate a file data block.

+

+    @param pInode       A pointer to the cached inode structure.

+    @param pulBlock     On entry, contains the block to be truncated.  On

+                        successful return, if @p fPropagate is true, populated

+                        with BLOCK_SPARSE, otherwise unmodified.

+    @param fPropagate   Whether the parent node is being branched.

+

+    @return A negated ::REDSTATUS code indicating the operation result.

+

+    @retval 0           Operation was successful.

+    @retval -RED_EIO    A disk I/O error occurred.

+    @retval -RED_EINVAL Invalid parameters.

+*/

+static REDSTATUS TruncDataBlock(

+    const CINODE   *pInode,

+    uint32_t       *pulBlock,

+    bool            fPropagate)

+{

+    REDSTATUS       ret = 0;

+

+    if(!CINODE_IS_MOUNTED(pInode) || (pulBlock == NULL))

+    {

+        REDERROR();

+        ret = -RED_EINVAL;

+    }

+    else if(*pulBlock != BLOCK_SPARSE)

+    {

+        ret = RedImapBlockSet(*pulBlock, false);

+

+      #if REDCONF_INODE_BLOCKS == 1

+        if(ret == 0)

+        {

+            if(pInode->pInodeBuf->ulBlocks == 0U)

+            {

+                CRITICAL_ERROR();

+                ret = -RED_EFUBAR;

+            }

+            else

+            {

+                pInode->pInodeBuf->ulBlocks--;

+            }

+        }

+      #endif

+

+        if((ret == 0) && fPropagate)

+        {

+            *pulBlock = BLOCK_SPARSE;

+        }

+    }

+    else

+    {

+        /*  Data block is sparse, nothing to truncate.

+        */

+    }

+

+    return ret;

+}

+#endif /* DELETE_SUPPORTED || TRUNCATE_SUPPORTED */

+

+

+/** @brief Prepare to increase the file size.

+

+    When the inode size is increased, a sparse region is created.  It is

+    possible that a prior shrink operation to an unaligned size left stale data

+    beyond the end of the file in the last data block.  That data is not zeroed

+    while shrinking the inode in order to transfer the disk full burden from the

+    shrink operation to the expand operation.

+

+    @param pInode   A pointer to the cached inode structure.

+

+    @return A negated ::REDSTATUS code indicating the operation result.

+

+    @retval 0           Operation was successful.

+    @retval -RED_EIO    A disk I/O error occurred.

+    @retval -RED_ENOSPC Insufficient free space to perform the truncate.

+    @retval -RED_EINVAL Invalid parameters.

+*/

+static REDSTATUS ExpandPrepare(

+    CINODE     *pInode)

+{

+    REDSTATUS   ret = 0;

+

+    if(!CINODE_IS_DIRTY(pInode))

+    {

+        REDERROR();

+        ret = -RED_EINVAL;

+    }

+    else

+    {

+        uint32_t ulOldSizeByteInBlock = (uint32_t)(pInode->pInodeBuf->ullSize & (REDCONF_BLOCK_SIZE - 1U));

+

+        if(ulOldSizeByteInBlock != 0U)

+        {

+            ret = RedInodeDataSeek(pInode, (uint32_t)(pInode->pInodeBuf->ullSize >> BLOCK_SIZE_P2));

+

+            if(ret == -RED_ENODATA)

+            {

+                ret = 0;

+            }

+            else if(ret == 0)

+            {

+                ret = BranchBlock(pInode, BRANCHDEPTH_FILE_DATA, true);

+

+                if(ret == 0)

+                {

+                    RedMemSet(&pInode->pbData[ulOldSizeByteInBlock], 0U, REDCONF_BLOCK_SIZE - ulOldSizeByteInBlock);

+                }

+            }

+            else

+            {

+                REDERROR();

+            }

+        }

+    }

+

+    return ret;

+}

+#endif /* REDCONF_READ_ONLY == 0 */

+

+

+/** @brief Seek to a given position within an inode, then buffer the data block.

+

+    On successful return, pInode->pbData will be populated with a buffer

+    corresponding to the @p ulBlock block offset.

+

+    @param pInode   A pointer to the cached inode structure.

+    @param ulBlock  The block offset to seek to and buffer.

+

+    @return A negated ::REDSTATUS code indicating the operation result.

+

+    @retval 0               Operation was successful.

+    @retval -RED_ENODATA    The block offset is sparse.

+    @retval -RED_EINVAL     @p ulBlock is too large.

+    @retval -RED_EIO        A disk I/O error occurred.

+*/

+REDSTATUS RedInodeDataSeekAndRead(

+    CINODE     *pInode,

+    uint32_t    ulBlock)

+{

+    REDSTATUS   ret;

+

+    ret = RedInodeDataSeek(pInode, ulBlock);

+

+    if((ret == 0) && (pInode->pbData == NULL))

+    {

+        REDASSERT(pInode->ulDataBlock != BLOCK_SPARSE);

+

+        ret = RedBufferGet(pInode->ulDataBlock, 0U, CAST_VOID_PTR_PTR(&pInode->pbData));

+    }

+

+    return ret;

+}

+

+

+/** @brief Seek to a given position within an inode.

+

+    On successful return, pInode->ulDataBlock will be populated with the

+    physical block number corresponding to the @p ulBlock block offset.

+

+    Note: Callers of this function depend on its parameter checking.

+

+    @param pInode   A pointer to the cached inode structure.

+    @param ulBlock  The block offset to seek to.

+

+    @return A negated ::REDSTATUS code indicating the operation result.

+

+    @retval 0               Operation was successful.

+    @retval -RED_ENODATA    The block offset is sparse.

+    @retval -RED_EINVAL     @p ulBlock is too large; or @p pInode is not a

+                            mounted cached inode pointer.

+    @retval -RED_EIO        A disk I/O error occurred.

+*/

+REDSTATUS RedInodeDataSeek(

+    CINODE     *pInode,

+    uint32_t    ulBlock)

+{

+    REDSTATUS   ret = 0;

+

+    if(!CINODE_IS_MOUNTED(pInode) || (ulBlock >= INODE_DATA_BLOCKS))

+    {

+        ret = -RED_EINVAL;

+    }

+    else

+    {

+        SeekCoord(pInode, ulBlock);

+

+      #if DINDIR_POINTERS > 0U

+        if(pInode->uDindirEntry != COORD_ENTRY_INVALID)

+        {

+            if(pInode->ulDindirBlock == BLOCK_SPARSE)

+            {

+                /*  If the double indirect is unallocated, so is the indirect.

+                */

+                pInode->ulIndirBlock = BLOCK_SPARSE;

+            }

+            else

+            {

+                if(pInode->pDindir == NULL)

+                {

+                    ret = RedBufferGet(pInode->ulDindirBlock, BFLAG_META_DINDIR, CAST_VOID_PTR_PTR(&pInode->pDindir));

+                }

+

+                if(ret == 0)

+                {

+                    pInode->ulIndirBlock = pInode->pDindir->aulEntries[pInode->uDindirEntry];

+                }

+            }

+        }

+      #endif

+

+      #if REDCONF_DIRECT_POINTERS < INODE_ENTRIES

+        if((ret == 0) && (pInode->uIndirEntry != COORD_ENTRY_INVALID))

+        {

+            if(pInode->ulIndirBlock == BLOCK_SPARSE)

+            {

+                /*  If the indirect is unallocated, so is the data block.

+                */

+                pInode->ulDataBlock = BLOCK_SPARSE;

+            }

+            else

+            {

+                if(pInode->pIndir == NULL)

+                {

+                    ret = RedBufferGet(pInode->ulIndirBlock, BFLAG_META_INDIR, CAST_VOID_PTR_PTR(&pInode->pIndir));

+                }

+

+                if(ret == 0)

+                {

+                    pInode->ulDataBlock = pInode->pIndir->aulEntries[pInode->uIndirEntry];

+                }

+            }

+        }

+      #endif

+

+        if((ret == 0) && (pInode->ulDataBlock == BLOCK_SPARSE))

+        {

+            ret = -RED_ENODATA;

+        }

+    }

+

+    return ret;

+}

+

+

+/** @brief Seek to the coordinates.

+

+    Compute the new coordinates, and put any buffers which are not needed or are

+    no longer appropriate.

+

+    @param pInode   A pointer to the cached inode structure.

+    @param ulBlock  The block offset to seek to.

+*/

+static void SeekCoord(

+    CINODE     *pInode,

+    uint32_t    ulBlock)

+{

+    if(!CINODE_IS_MOUNTED(pInode) || (ulBlock >= INODE_DATA_BLOCKS))

+    {

+        REDERROR();

+    }

+    else if((pInode->ulLogicalBlock != ulBlock) || !pInode->fCoordInited)

+    {

+        RedInodePutData(pInode);

+        pInode->ulLogicalBlock = ulBlock;

+

+      #if REDCONF_DIRECT_POINTERS > 0U

+      #if REDCONF_DIRECT_POINTERS < INODE_ENTRIES

+        if(ulBlock < REDCONF_DIRECT_POINTERS)

+      #endif

+        {

+          #if REDCONF_DIRECT_POINTERS < INODE_ENTRIES

+            RedInodePutCoord(pInode);

+          #endif

+

+            pInode->uInodeEntry = (uint16_t)ulBlock;

+            pInode->ulDataBlock = pInode->pInodeBuf->aulEntries[pInode->uInodeEntry];

+

+          #if DINDIR_POINTERS > 0U

+            pInode->uDindirEntry = COORD_ENTRY_INVALID;

+          #endif

+          #if REDCONF_DIRECT_POINTERS < INODE_ENTRIES

+            pInode->uIndirEntry = COORD_ENTRY_INVALID;

+          #endif

+        }

+      #if REDCONF_DIRECT_POINTERS < INODE_ENTRIES

+        else

+      #endif

+      #endif

+      #if REDCONF_INDIRECT_POINTERS > 0U

+      #if REDCONF_INDIRECT_POINTERS < INODE_ENTRIES

+        if(ulBlock < (INODE_INDIR_BLOCKS + REDCONF_DIRECT_POINTERS))

+      #endif

+        {

+            uint32_t ulIndirRangeOffset = ulBlock - REDCONF_DIRECT_POINTERS;

+            uint16_t uInodeEntry = (uint16_t)((ulIndirRangeOffset / INDIR_ENTRIES) + REDCONF_DIRECT_POINTERS);

+            uint16_t uIndirEntry = (uint16_t)(ulIndirRangeOffset % INDIR_ENTRIES);

+

+          #if DINDIR_POINTERS > 0U

+            RedInodePutDindir(pInode);

+          #endif

+

+            /*  If the inode entry is not changing, then the previous indirect

+                is still the correct one.  Otherwise, the old indirect will be

+                released and the new one will be read later.

+            */

+            if((pInode->uInodeEntry != uInodeEntry) || !pInode->fCoordInited)

+            {

+                RedInodePutIndir(pInode);

+

+                pInode->uInodeEntry = uInodeEntry;

+

+                pInode->ulIndirBlock = pInode->pInodeBuf->aulEntries[pInode->uInodeEntry];

+            }

+

+          #if DINDIR_POINTERS > 0U

+            pInode->uDindirEntry = COORD_ENTRY_INVALID;

+          #endif

+            pInode->uIndirEntry = uIndirEntry;

+

+            /*  At this point, the following pInode members are needed but not

+                yet populated:

+

+                - pIndir

+                - ulDataBlock

+            */

+        }

+      #if DINDIR_POINTERS > 0U

+        else

+      #endif

+      #endif

+      #if DINDIR_POINTERS > 0U

+        {

+            uint32_t ulDindirRangeOffset = (ulBlock - REDCONF_DIRECT_POINTERS) - INODE_INDIR_BLOCKS;

+            uint16_t uInodeEntry = (uint16_t)((ulDindirRangeOffset / DINDIR_DATA_BLOCKS) + REDCONF_DIRECT_POINTERS + REDCONF_INDIRECT_POINTERS);

+            uint32_t ulDindirNodeOffset = ulDindirRangeOffset % DINDIR_DATA_BLOCKS;

+            uint16_t uDindirEntry = (uint16_t)(ulDindirNodeOffset / INDIR_ENTRIES);

+            uint16_t uIndirEntry = (uint16_t)(ulDindirNodeOffset % INDIR_ENTRIES);

+

+            /*  If the inode entry is not changing, then the previous double

+                indirect is still the correct one.  Otherwise, the old double

+                indirect will be released and the new one will be read later.

+            */

+            if((pInode->uInodeEntry != uInodeEntry) || !pInode->fCoordInited)

+            {

+                RedInodePutIndir(pInode);

+                RedInodePutDindir(pInode);

+

+                pInode->uInodeEntry = uInodeEntry;

+

+                pInode->ulDindirBlock = pInode->pInodeBuf->aulEntries[pInode->uInodeEntry];

+            }

+            /*  If neither the inode entry nor double indirect entry are

+                changing, then the previous indirect is still the correct one.

+                Otherwise, it old indirect will be released and the new one will

+                be read later.

+            */

+            else if(pInode->uDindirEntry != uDindirEntry)

+            {

+                RedInodePutIndir(pInode);

+            }

+            else

+            {

+                /*  Data buffer has already been put, nothing to do.

+                */

+            }

+

+            pInode->uDindirEntry = uDindirEntry;

+            pInode->uIndirEntry = uIndirEntry;

+

+            /*  At this point, the following pInode members are needed but not

+                yet populated:

+

+                - pDindir

+                - pIndir

+                - ulIndirBlock

+                - ulDataBlock

+            */

+        }

+      #elif (REDCONF_DIRECT_POINTERS > 0U) && (REDCONF_INDIRECT_POINTERS > 0U)

+        else

+        {

+            /*  There are no double indirects, so the block should have been in

+                the direct or indirect range.

+            */

+            REDERROR();

+        }

+      #endif

+

+        pInode->fCoordInited = true;

+    }

+    else

+    {

+        /*  Seeking to the current position, nothing to do.

+        */

+    }

+}

+

+

+/** @brief Read an unaligned portion of a block.

+

+    @param pInode   A pointer to the cached inode structure.

+    @param ullStart The file offset at which to read.

+    @param ulLen    The number of bytes to read.

+    @param pbBuffer The buffer to read into.

+

+    @return A negated ::REDSTATUS code indicating the operation result.

+

+    @retval 0           Operation was successful.

+    @retval -RED_EIO    A disk I/O error occurred.

+    @retval -RED_EINVAL Invalid parameters.

+*/

+static REDSTATUS ReadUnaligned(

+    CINODE     *pInode,

+    uint64_t    ullStart,

+    uint32_t    ulLen,

+    uint8_t    *pbBuffer)

+{

+    REDSTATUS   ret;

+

+    /*  This read should not cross a block boundary.

+    */

+    if(    ((ullStart >> BLOCK_SIZE_P2) != (((ullStart + ulLen) - 1U) >> BLOCK_SIZE_P2))

+        || (pbBuffer == NULL))

+    {

+        REDERROR();

+        ret = -RED_EINVAL;

+    }

+    else

+    {

+        ret = RedInodeDataSeekAndRead(pInode, (uint32_t)(ullStart >> BLOCK_SIZE_P2));

+

+        if(ret == 0)

+        {

+            RedMemCpy(pbBuffer, &pInode->pbData[ullStart & (REDCONF_BLOCK_SIZE - 1U)], ulLen);

+        }

+        else if(ret == -RED_ENODATA)

+        {

+            /*  Sparse block, return zeroed data.

+            */

+            RedMemSet(pbBuffer, 0U, ulLen);

+            ret = 0;

+        }

+        else

+        {

+            /*  No action, just return the error.

+            */

+        }

+    }

+

+    return ret;

+}

+

+

+/** @brief Read one or more whole blocks.

+

+    @param pInode       A pointer to the cached inode structure.

+    @param ulBlockStart The file block offset at which to read.

+    @param ulBlockCount The number of blocks to read.

+    @param pbBuffer     The buffer to read into.

+

+    @return A negated ::REDSTATUS code indicating the operation result.

+

+    @retval 0           Operation was successful.

+    @retval -RED_EIO    A disk I/O error occurred.

+    @retval -RED_EINVAL Invalid parameters.

+*/

+static REDSTATUS ReadAligned(

+    CINODE     *pInode,

+    uint32_t    ulBlockStart,

+    uint32_t    ulBlockCount,

+    uint8_t    *pbBuffer)

+{

+    REDSTATUS   ret = 0;

+

+    if(pbBuffer == NULL)

+    {

+        REDERROR();

+        ret = -RED_EINVAL;

+    }

+    else

+    {

+        uint32_t ulBlockIndex = 0U;

+

+        /*  Read the data from disk one contiguous extent at a time.

+        */

+        while((ret == 0) && (ulBlockIndex < ulBlockCount))

+        {

+            uint32_t ulExtentStart;

+            uint32_t ulExtentLen = ulBlockCount - ulBlockIndex;

+

+            ret = GetExtent(pInode, ulBlockStart + ulBlockIndex, &ulExtentStart, &ulExtentLen);

+

+            if(ret == 0)

+            {

+              #if REDCONF_READ_ONLY == 0

+                /*  Before reading directly from disk, flush any dirty file data

+                    buffers in the range to avoid reading stale data.

+                */

+                ret = RedBufferFlush(ulExtentStart, ulExtentLen);

+

+                if(ret == 0)

+              #endif

+                {

+                    ret = RedIoRead(gbRedVolNum, ulExtentStart, ulExtentLen, &pbBuffer[ulBlockIndex << BLOCK_SIZE_P2]);

+

+                    if(ret == 0)

+                    {

+                        ulBlockIndex += ulExtentLen;

+                    }

+                }

+            }

+            else if(ret == -RED_ENODATA)

+            {

+                /*  Sparse block, return zeroed data.

+                */

+                RedMemSet(&pbBuffer[ulBlockIndex << BLOCK_SIZE_P2], 0U, REDCONF_BLOCK_SIZE);

+                ulBlockIndex++;

+                ret = 0;

+            }

+            else

+            {

+                /*  An unexpected error occurred; the loop will terminate.

+                */

+            }

+        }

+    }

+

+    return ret;

+}

+

+

+#if REDCONF_READ_ONLY == 0

+/** @brief Write an unaligned portion of a block.

+

+    @param pInode   A pointer to the cached inode structure.

+    @param ullStart The file offset at which to write.

+    @param ulLen    The number of bytes to write.

+    @param pbBuffer The buffer to write from.

+

+    @return A negated ::REDSTATUS code indicating the operation result.

+

+    @retval 0           Operation was successful.

+    @retval -RED_EIO    A disk I/O error occurred.

+    @retval -RED_ENOSPC No data can be written because there is insufficient

+                        free space.

+    @retval -RED_EINVAL Invalid parameters.

+*/

+static REDSTATUS WriteUnaligned(

+    CINODE         *pInode,

+    uint64_t        ullStart,

+    uint32_t        ulLen,

+    const uint8_t  *pbBuffer)

+{

+    REDSTATUS       ret;

+

+    /*  This write should not cross a block boundary.

+    */

+    if(    ((ullStart >> BLOCK_SIZE_P2) != (((ullStart + ulLen) - 1U) >> BLOCK_SIZE_P2))

+        || (pbBuffer == NULL))

+    {

+        REDERROR();

+        ret = -RED_EINVAL;

+    }

+    else

+    {

+        ret = RedInodeDataSeek(pInode, (uint32_t)(ullStart >> BLOCK_SIZE_P2));

+

+        if((ret == 0) || (ret == -RED_ENODATA))

+        {

+            ret = BranchBlock(pInode, BRANCHDEPTH_FILE_DATA, true);

+

+            if(ret == 0)

+            {

+                RedMemCpy(&pInode->pbData[ullStart & (REDCONF_BLOCK_SIZE - 1U)], pbBuffer, ulLen);

+            }

+        }

+    }

+

+    return ret;

+}

+

+

+/** @brief Write one or more whole blocks.

+

+    @param pInode           A pointer to the cached inode structure.

+    @param ulBlockStart     The file block offset at which to write.

+    @param pulBlockCount    On entry, the number of blocks to attempt to write.

+                            On successful return, the number of blocks actually

+                            written.

+    @param pbBuffer         The buffer to write from.

+

+    @return A negated ::REDSTATUS code indicating the operation result.

+

+    @retval 0           Operation was successful.

+    @retval -RED_EIO    A disk I/O error occurred.

+    @retval -RED_ENOSPC No data can be written because there is insufficient

+                        free space.

+    @retval -RED_EINVAL Invalid parameters.

+*/

+static REDSTATUS WriteAligned(

+    CINODE         *pInode,

+    uint32_t        ulBlockStart,

+    uint32_t       *pulBlockCount,

+    const uint8_t  *pbBuffer)

+{

+    REDSTATUS       ret = 0;

+

+    if((pulBlockCount == NULL) || (pbBuffer == NULL))

+    {

+        REDERROR();

+        ret = -RED_EINVAL;

+    }

+    else

+    {

+        bool     fFull = false;

+        uint32_t ulBlockCount = *pulBlockCount;

+        uint32_t ulBlockIndex;

+

+        /*  Branch all of the file data blocks in advance.

+        */

+        for(ulBlockIndex = 0U; (ulBlockIndex < ulBlockCount) && !fFull; ulBlockIndex++)

+        {

+            ret = RedInodeDataSeek(pInode, ulBlockStart + ulBlockIndex);

+

+            if((ret == 0) || (ret == -RED_ENODATA))

+            {

+                ret = BranchBlock(pInode, BRANCHDEPTH_FILE_DATA, false);

+

+                if(ret == -RED_ENOSPC)

+                {

+                    if(ulBlockIndex > 0U)

+                    {

+                        ret = 0;

+                    }

+

+                    fFull = true;

+                }

+            }

+

+            if(ret != 0)

+            {

+                break;

+            }

+        }

+

+        ulBlockCount = ulBlockIndex;

+        ulBlockIndex = 0U;

+

+        if(fFull)

+        {

+            ulBlockCount--;

+        }

+

+        /*  Write the data to disk one contiguous extent at a time.

+        */

+        while((ret == 0) && (ulBlockIndex < ulBlockCount))

+        {

+            uint32_t ulExtentStart;

+            uint32_t ulExtentLen = ulBlockCount - ulBlockIndex;

+

+            ret = GetExtent(pInode, ulBlockStart + ulBlockIndex, &ulExtentStart, &ulExtentLen);

+

+            if(ret == 0)

+            {

+                ret = RedIoWrite(gbRedVolNum, ulExtentStart, ulExtentLen, &pbBuffer[ulBlockIndex << BLOCK_SIZE_P2]);

+

+                if(ret == 0)

+                {

+                    /*  If there is any buffered file data for the extent we

+                        just wrote, those buffers are now stale.

+                    */

+                    ret = RedBufferDiscardRange(ulExtentStart, ulExtentLen);

+                }

+

+                if(ret == 0)

+                {

+                    ulBlockIndex += ulExtentLen;

+                }

+            }

+        }

+

+        if(ret == 0)

+        {

+            *pulBlockCount = ulBlockCount;

+        }

+    }

+

+    return ret;

+}

+#endif /* REDCONF_READ_ONLY == 0 */

+

+

+/** @brief Get the physical block number and count of contiguous blocks given a

+           starting logical block number.

+

+    @param pInode           A pointer to the cached inode structure.

+    @param ulBlockStart     The file block offset for the start of the extent.

+    @param pulExtentStart   On successful return, the starting physical block

+                            number of the contiguous extent.

+    @param pulExtentLen     On entry, the maximum length of the extent; on

+                            successful return, the length of the contiguous

+                            extent.

+

+    @return A negated ::REDSTATUS code indicating the operation result.

+

+    @retval 0               Operation was successful.

+    @retval -RED_EIO        A disk I/O error occurred.

+    @retval -RED_ENODATA    The block offset is sparse.

+    @retval -RED_EINVAL     Invalid parameters.

+*/

+static REDSTATUS GetExtent(

+    CINODE     *pInode,

+    uint32_t    ulBlockStart,

+    uint32_t   *pulExtentStart,

+    uint32_t   *pulExtentLen)

+{

+    REDSTATUS   ret;

+

+    if((pulExtentStart == NULL) || (pulExtentLen == NULL))

+    {

+        REDERROR();

+        ret = -RED_EINVAL;

+    }

+    else

+    {

+        ret = RedInodeDataSeek(pInode, ulBlockStart);

+

+        if(ret == 0)

+        {

+            uint32_t ulExtentLen = *pulExtentLen;

+            uint32_t ulFirstBlock = pInode->ulDataBlock;

+            uint32_t ulRunLen = 1U;

+

+            while((ret == 0) && (ulRunLen < ulExtentLen))

+            {

+                ret = RedInodeDataSeek(pInode, ulBlockStart + ulRunLen);

+

+                /*  The extent ends when we find a sparse data block or when the

+                    data block is not contiguous with the preceding data block.

+                */

+                if((ret == -RED_ENODATA) || ((ret == 0) && (pInode->ulDataBlock != (ulFirstBlock + ulRunLen))))

+                {

+                    ret = 0;

+                    break;

+                }

+

+                ulRunLen++;

+            }

+

+            if(ret == 0)

+            {

+                *pulExtentStart = ulFirstBlock;

+                *pulExtentLen = ulRunLen;

+            }

+        }

+    }

+

+    return ret;

+}

+

+

+#if REDCONF_READ_ONLY == 0

+/** @brief Allocate or branch the file metadata path and data block if necessary.

+

+    Optionally, can stop allocating/branching at a certain depth.

+

+    @param pInode   A pointer to the cached inode structure.

+    @param depth    A BRANCHDEPTH_ value indicating the lowest depth to branch.

+    @param fBuffer  Whether to buffer the data block.

+

+    @return A negated ::REDSTATUS code indicating the operation result.

+

+    @retval 0           Operation was successful.

+    @retval -RED_EIO    A disk I/O error occurred.

+    @retval -RED_ENOSPC No data can be written because there is insufficient

+                        free space.

+*/

+static REDSTATUS BranchBlock(

+    CINODE     *pInode,

+    BRANCHDEPTH depth,

+    bool        fBuffer)

+{

+    REDSTATUS   ret;

+    uint32_t    ulCost = 0U; /* Init'd to quiet warnings. */

+

+    ret = BranchBlockCost(pInode, depth, &ulCost);

+

+    if((ret == 0) && (ulCost > FreeBlockCount()))

+    {

+        ret = -RED_ENOSPC;

+    }

+

+    if(ret == 0)

+    {

+      #if DINDIR_POINTERS > 0U

+        if(pInode->uDindirEntry != COORD_ENTRY_INVALID)

+        {

+            ret = BranchOneBlock(&pInode->ulDindirBlock, CAST_VOID_PTR_PTR(&pInode->pDindir), BFLAG_META_DINDIR);

+

+            if(ret == 0)

+            {

+                /*  In case we just created the double indirect.

+                */

+                pInode->pDindir->ulInode = pInode->ulInode;

+

+                pInode->pInodeBuf->aulEntries[pInode->uInodeEntry] = pInode->ulDindirBlock;

+            }

+        }

+

+        if(ret == 0)

+      #endif

+      #if REDCONF_DIRECT_POINTERS < INODE_ENTRIES

+        {

+            if((pInode->uIndirEntry != COORD_ENTRY_INVALID) && (depth >= BRANCHDEPTH_INDIR))

+            {

+                ret = BranchOneBlock(&pInode->ulIndirBlock, CAST_VOID_PTR_PTR(&pInode->pIndir), BFLAG_META_INDIR);

+

+                if(ret == 0)

+                {

+                    /*  In case we just created the indirect.

+                    */

+                    pInode->pIndir->ulInode = pInode->ulInode;

+

+                  #if DINDIR_POINTERS > 0U

+                    if(pInode->uDindirEntry != COORD_ENTRY_INVALID)

+                    {

+                        pInode->pDindir->aulEntries[pInode->uDindirEntry] = pInode->ulIndirBlock;

+                    }

+                    else

+                  #endif

+                    {

+                        pInode->pInodeBuf->aulEntries[pInode->uInodeEntry] = pInode->ulIndirBlock;

+                    }

+                }

+            }

+        }

+

+        if(ret == 0)

+      #endif

+        {

+            if(depth == BRANCHDEPTH_FILE_DATA)

+            {

+              #if REDCONF_INODE_BLOCKS == 1

+                bool    fAllocedNew = (pInode->ulDataBlock == BLOCK_SPARSE);

+              #endif

+                void  **ppBufPtr = (fBuffer || (pInode->pbData != NULL)) ? CAST_VOID_PTR_PTR(&pInode->pbData) : NULL;

+

+                ret = BranchOneBlock(&pInode->ulDataBlock, ppBufPtr, 0U);

+

+                if(ret == 0)

+                {

+                  #if REDCONF_DIRECT_POINTERS < INODE_ENTRIES

+                    if(pInode->uIndirEntry != COORD_ENTRY_INVALID)

+                    {

+                        pInode->pIndir->aulEntries[pInode->uIndirEntry] = pInode->ulDataBlock;

+                    }

+                    else

+                  #endif

+                    {

+                        pInode->pInodeBuf->aulEntries[pInode->uInodeEntry] = pInode->ulDataBlock;

+                    }

+

+                  #if REDCONF_INODE_BLOCKS == 1

+                    if(fAllocedNew)

+                    {

+                        if(pInode->pInodeBuf->ulBlocks < INODE_DATA_BLOCKS)

+                        {

+                            pInode->pInodeBuf->ulBlocks++;

+                        }

+                        else

+                        {

+                            CRITICAL_ERROR();

+                            ret = -RED_EFUBAR;

+                        }

+                    }

+                  #endif

+                }

+            }

+        }

+

+        CRITICAL_ASSERT(ret == 0);

+    }

+

+    return ret;

+}

+

+

+/** @brief Branch a block.

+

+    The block can be a double indirect, indirect, or file data block.

+

+    The caller should have already handled the disk full implications of

+    branching this block.

+

+    @param pulBlock On entry, the current block number, which may be

+                    BLOCK_SPARSE if the block is to be newly allocated.  On

+                    successful return, populated with the new block number,

+                    which may be the same as the original block number if it

+                    was not BLOCK_SPARSE and the block was already branched.

+    @param ppBuffer If NULL, indicates that the caller does not want to buffer

+                    the branched block.  If non-NULL, the caller does want the

+                    branched block buffered, and the following is true:  On

+                    entry, the current buffer for the block, if there is one, or

+                    NULL if there is no buffer.  On successful exit, populated

+                    with a buffer for the block, which will be dirty.  If the

+                    block number is initially BLOCK_SPARSE, there should be no

+                    buffer for the block.

+    @param uBFlag   The buffer type flags: BFLAG_META_DINDIR, BFLAG_META_INDIR,

+                    or zero for file data.

+

+    @retval 0           Operation was successful.

+    @retval -RED_EIO    A disk I/O error occurred.

+    @retval -RED_EINVAL Invalid parameters.

+*/

+static REDSTATUS BranchOneBlock(

+    uint32_t   *pulBlock,

+    void      **ppBuffer,

+    uint16_t    uBFlag)

+{

+    REDSTATUS   ret = 0;

+

+    if(pulBlock == NULL)

+    {

+        REDERROR();

+        ret = -RED_EINVAL;

+    }

+    else

+    {

+        ALLOCSTATE  state = ALLOCSTATE_FREE;

+        uint32_t    ulPrevBlock = *pulBlock;

+

+        if(ulPrevBlock != BLOCK_SPARSE)

+        {

+            ret = RedImapBlockState(ulPrevBlock, &state);

+        }

+

+        if(ret == 0)

+        {

+            if(state == ALLOCSTATE_NEW)

+            {

+                /*  Block is already branched, so simply get it buffered dirty

+                    if requested.

+                */

+                if(ppBuffer != NULL)

+                {

+                    if(*ppBuffer != NULL)

+                    {

+                        RedBufferDirty(*ppBuffer);

+                    }

+                    else

+                    {

+                        ret = RedBufferGet(ulPrevBlock, uBFlag | BFLAG_DIRTY, ppBuffer);

+                    }

+                }

+            }

+            else

+            {

+                /*  Block does not exist or is committed state, so allocate a

+                    new block for the branch.

+                */

+                ret = RedImapAllocBlock(pulBlock);

+

+                if(ret == 0)

+                {

+                    if(ulPrevBlock == BLOCK_SPARSE)

+                    {

+                        /*  Block did not exist previously, so just get it

+                            buffered if requested.

+                        */

+                        if(ppBuffer != NULL)

+                        {

+                            if(*ppBuffer != NULL)

+                            {

+                                /*  How could there be an existing buffer when

+                                    the block did not exist?

+                                */

+                                REDERROR();

+                                ret = -RED_EINVAL;

+                            }

+                            else

+                            {

+                                ret = RedBufferGet(*pulBlock, (uint16_t)((uint32_t)uBFlag | BFLAG_NEW | BFLAG_DIRTY), ppBuffer);

+                            }

+                        }

+                    }

+                    else

+                    {

+                        /*  Branch the buffer for the committed state block to

+                            the newly allocated location.

+                        */

+                        if(ppBuffer != NULL)

+                        {

+                            if(*ppBuffer == NULL)

+                            {

+                                ret = RedBufferGet(ulPrevBlock, uBFlag, ppBuffer);

+                            }

+

+                            if(ret == 0)

+                            {

+                                RedBufferBranch(*ppBuffer, *pulBlock);

+                            }

+                        }

+

+                        /*  Mark the committed state block almost free.

+                        */

+                        if(ret == 0)

+                        {

+                            ret = RedImapBlockSet(ulPrevBlock, false);

+                        }

+                    }

+                }

+            }

+        }

+    }

+

+    return ret;

+}

+

+

+/** @brief Compute the free space cost of branching a block.

+

+    The caller must first use RedInodeDataSeek() to the block to be branched.

+

+    @param pInode   A pointer to the cached inode structure, whose coordinates

+                    indicate the block to be branched.

+    @param depth    A BRANCHDEPTH_ value indicating how much of the file

+                    metadata structure needs to be branched.

+    @param pulCost  On successful return, populated with the number of blocks

+                    that must be allocated from free space in order to branch

+                    the given block.

+

+    @return A negated ::REDSTATUS code indicating the operation result.

+

+    @retval 0           Operation was successful.

+    @retval -RED_EIO    A disk I/O error occurred.

+    @retval -RED_EINVAL Invalid parameters.

+*/

+static REDSTATUS BranchBlockCost(

+    const CINODE   *pInode,

+    BRANCHDEPTH     depth,

+    uint32_t       *pulCost)

+{

+    REDSTATUS       ret = 0;

+

+    if(!CINODE_IS_MOUNTED(pInode) || !pInode->fCoordInited || (depth > BRANCHDEPTH_MAX) || (pulCost == NULL))

+    {

+        REDERROR();

+        ret = -RED_EINVAL;

+    }

+    else

+    {

+        ALLOCSTATE  state;

+

+        /*  ulCost is initialized to the maximum number of blocks that could

+            be branched, and decremented for every block we determine does not

+            need to be branched.

+        */

+      #if DINDIR_POINTERS > 0U

+        uint32_t    ulCost = 3U;

+      #elif REDCONF_DIRECT_POINTERS < INODE_ENTRIES

+        uint32_t    ulCost = 2U;

+      #else

+        uint32_t    ulCost = 1U;

+      #endif

+

+      #if DINDIR_POINTERS > 0U

+        if(pInode->uDindirEntry != COORD_ENTRY_INVALID)

+        {

+            if(pInode->ulDindirBlock != BLOCK_SPARSE)

+            {

+                ret = RedImapBlockState(pInode->ulDindirBlock, &state);

+

+                if((ret == 0) && (state == ALLOCSTATE_NEW))

+                {

+                    /*  Double indirect already branched.

+                    */

+                    ulCost--;

+                }

+            }

+        }

+        else

+        {

+            /*  At this inode offset there are no double indirects.

+            */

+            ulCost--;

+        }

+

+        if(ret == 0)

+      #endif

+      #if REDCONF_DIRECT_POINTERS < INODE_ENTRIES

+        {

+            if((pInode->uIndirEntry != COORD_ENTRY_INVALID) && (depth >= BRANCHDEPTH_INDIR))

+            {

+                if(pInode->ulIndirBlock != BLOCK_SPARSE)

+                {

+                    ret = RedImapBlockState(pInode->ulIndirBlock, &state);

+

+                    if((ret == 0) && (state == ALLOCSTATE_NEW))

+                    {

+                        /*  Indirect already branched.

+                        */

+                        ulCost--;

+                    }

+                }

+            }

+            else

+            {

+                /*  Either not branching this deep, or at this inode offset

+                    there are no indirects.

+                */

+                ulCost--;

+            }

+        }

+

+        if(ret == 0)

+      #endif

+        {

+            if(depth == BRANCHDEPTH_FILE_DATA)

+            {

+                if(pInode->ulDataBlock != BLOCK_SPARSE)

+                {

+                    ret = RedImapBlockState(pInode->ulDataBlock, &state);

+

+                    if((ret == 0) && (state == ALLOCSTATE_NEW))

+                    {

+                        /*  File data block already branched.

+                        */

+                        ulCost--;

+

+                        /*  If the file data block is branched, then its parent

+                            nodes should be branched as well.

+                        */

+                        REDASSERT(ulCost == 0U);

+                    }

+                }

+            }

+            else

+            {

+                /*  Not branching this deep.

+                */

+                ulCost--;

+            }

+        }

+

+        if(ret == 0)

+        {

+            *pulCost = ulCost;

+        }

+    }

+

+    return ret;

+}

+

+

+/** @brief Yields the number of currently available free blocks.

+

+    Accounts for reserved blocks, subtracting the number of reserved blocks if

+    they are unavailable.

+

+    @return Number of currently available free blocks.

+*/

+static uint32_t FreeBlockCount(void)

+{

+    uint32_t ulFreeBlocks = gpRedMR->ulFreeBlocks;

+

+  #if RESERVED_BLOCKS > 0U

+    if(!gpRedCoreVol->fUseReservedBlocks)

+    {

+        if(ulFreeBlocks >= RESERVED_BLOCKS)

+        {

+            ulFreeBlocks -= RESERVED_BLOCKS;

+        }

+        else

+        {

+            ulFreeBlocks = 0U;

+        }

+    }

+  #endif

+

+    return ulFreeBlocks;

+}

+#endif /* REDCONF_READ_ONLY == 0 */

+

diff --git a/FreeRTOS-Plus/Source/Reliance-Edge/core/driver/volume.c b/FreeRTOS-Plus/Source/Reliance-Edge/core/driver/volume.c
new file mode 100644
index 0000000..acd101a
--- /dev/null
+++ b/FreeRTOS-Plus/Source/Reliance-Edge/core/driver/volume.c
@@ -0,0 +1,536 @@
+/*             ----> DO NOT REMOVE THE FOLLOWING NOTICE <----

+

+                   Copyright (c) 2014-2015 Datalight, Inc.

+                       All Rights Reserved Worldwide.

+

+    This program is free software; you can redistribute it and/or modify

+    it under the terms of the GNU General Public License as published by

+    the Free Software Foundation; use version 2 of the License.

+

+    This program is distributed in the hope that it will be useful,

+    but "AS-IS," WITHOUT ANY WARRANTY; without even the implied warranty

+    of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the

+    GNU General Public License for more details.

+

+    You should have received a copy of the GNU General Public License along

+    with this program; if not, write to the Free Software Foundation, Inc.,

+    51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.

+*/

+/*  Businesses and individuals that for commercial or other reasons cannot

+    comply with the terms of the GPLv2 license may obtain a commercial license

+    before incorporating Reliance Edge into proprietary software for

+    distribution in any form.  Visit http://www.datalight.com/reliance-edge for

+    more information.

+*/

+/** @file

+    @brief Implements core volume operations.

+*/

+#include <redfs.h>

+#include <redcore.h>

+

+

+static bool MetarootIsValid(METAROOT *pMR, bool *pfSectorCRCIsValid);

+#ifdef REDCONF_ENDIAN_SWAP

+static void MetaRootEndianSwap(METAROOT *pMetaRoot);

+#endif

+

+

+/** @brief Mount a file system volume.

+

+    @return A negated ::REDSTATUS code indicating the operation result.

+

+    @retval 0           Operation was successful.

+    @retval -RED_EIO    Volume not formatted, improperly formatted, or corrupt.

+*/

+REDSTATUS RedVolMount(void)

+{

+    REDSTATUS ret;

+

+  #if REDCONF_READ_ONLY == 0

+    ret = RedOsBDevOpen(gbRedVolNum, BDEV_O_RDWR);

+  #else

+    ret = RedOsBDevOpen(gbRedVolNum, BDEV_O_RDONLY);

+  #endif

+

+    if(ret == 0)

+    {

+        ret = RedVolMountMaster();

+

+        if(ret == 0)

+        {

+            ret = RedVolMountMetaroot();

+        }

+

+        if(ret != 0)

+        {

+            (void)RedOsBDevClose(gbRedVolNum);

+        }

+    }

+

+    return ret;

+}

+

+

+/** @brief Mount the master block.

+

+    @return A negated ::REDSTATUS code indicating the operation result.

+

+    @retval 0           Operation was successful.

+    @retval -RED_EIO    Master block missing, corrupt, or inconsistent with the

+                        compile-time driver settings.

+*/

+REDSTATUS RedVolMountMaster(void)

+{

+    REDSTATUS       ret;

+    MASTERBLOCK    *pMB;

+

+    /*  Read the master block, to ensure that the disk was formatted with

+        Reliance Edge.

+    */

+    ret = RedBufferGet(BLOCK_NUM_MASTER, BFLAG_META_MASTER, CAST_VOID_PTR_PTR(&pMB));

+

+    if(ret == 0)

+    {

+        /*  Verify that the driver was compiled with the same settings that

+            the disk was formatted with.  If not, the user has made a

+            mistake: either the driver settings are wrong, or the disk needs

+            to be reformatted.

+        */

+        if(    (pMB->ulVersion != RED_DISK_LAYOUT_VERSION)

+            || (pMB->ulInodeCount != gpRedVolConf->ulInodeCount)

+            || (pMB->ulBlockCount != gpRedVolume->ulBlockCount)

+            || (pMB->uMaxNameLen != REDCONF_NAME_MAX)

+            || (pMB->uDirectPointers != REDCONF_DIRECT_POINTERS)

+            || (pMB->uIndirectPointers != REDCONF_INDIRECT_POINTERS)

+            || (pMB->bBlockSizeP2 != BLOCK_SIZE_P2)

+            || (((pMB->bFlags & MBFLAG_API_POSIX) != 0U) != (REDCONF_API_POSIX == 1))

+            || (((pMB->bFlags & MBFLAG_INODE_TIMESTAMPS) != 0U) != (REDCONF_INODE_TIMESTAMPS == 1))

+            || (((pMB->bFlags & MBFLAG_INODE_BLOCKS) != 0U) != (REDCONF_INODE_BLOCKS == 1)))

+        {

+            ret = -RED_EIO;

+        }

+      #if REDCONF_API_POSIX == 1

+        else if(((pMB->bFlags & MBFLAG_INODE_NLINK) != 0U) != (REDCONF_API_POSIX_LINK == 1))

+        {

+            ret = -RED_EIO;

+        }

+      #else

+        else if((pMB->bFlags & MBFLAG_INODE_NLINK) != 0U)

+        {

+            ret = -RED_EIO;

+        }

+      #endif

+        else

+        {

+            /*  Master block configuration is valid.

+

+                Save the sequence number of the master block in the volume,

+                since we need it later (see RedVolMountMetaroot()) and we do

+                not want to re-buffer the master block.

+            */

+            gpRedVolume->ullSequence = pMB->hdr.ullSequence;

+        }

+

+        RedBufferPut(pMB);

+    }

+

+    return ret;

+}

+

+

+/** @brief Mount the latest metaroot.

+

+    This function also populates the volume contexts.

+

+    @return A negated ::REDSTATUS code indicating the operation result.

+

+    @retval 0           Operation was successful.

+    @retval -RED_EIO    Both metaroots are missing or corrupt.

+*/

+REDSTATUS RedVolMountMetaroot(void)

+{

+    REDSTATUS ret;

+

+    ret = RedIoRead(gbRedVolNum, BLOCK_NUM_FIRST_METAROOT, 1U, &gpRedCoreVol->aMR[0U]);

+

+    if(ret == 0)

+    {

+        ret = RedIoRead(gbRedVolNum, BLOCK_NUM_FIRST_METAROOT + 1U, 1U, &gpRedCoreVol->aMR[1U]);

+    }

+

+    /*  Determine which metaroot is the most recent copy that was written

+        completely.

+    */

+    if(ret == 0)

+    {

+        uint8_t bMR = UINT8_MAX;

+        bool    fSectorCRCIsValid;

+

+        if(MetarootIsValid(&gpRedCoreVol->aMR[0U], &fSectorCRCIsValid))

+        {

+            bMR = 0U;

+

+          #ifdef REDCONF_ENDIAN_SWAP

+            MetaRootEndianSwap(&gpRedCoreVol->aMR[0U]);

+          #endif

+        }

+        else if(gpRedVolConf->fAtomicSectorWrite && !fSectorCRCIsValid)

+        {

+            ret = -RED_EIO;

+        }

+        else

+        {

+            /*  Metaroot is not valid, so it is ignored and there's nothing

+                to do here.

+            */

+        }

+

+        if(ret == 0)

+        {

+            if(MetarootIsValid(&gpRedCoreVol->aMR[1U], &fSectorCRCIsValid))

+            {

+              #ifdef REDCONF_ENDIAN_SWAP

+                MetaRootEndianSwap(&gpRedCoreVol->aMR[1U]);

+              #endif

+

+                if((bMR != 0U) || (gpRedCoreVol->aMR[1U].hdr.ullSequence > gpRedCoreVol->aMR[0U].hdr.ullSequence))

+                {

+                    bMR = 1U;

+                }

+            }

+            else if(gpRedVolConf->fAtomicSectorWrite && !fSectorCRCIsValid)

+            {

+                ret = -RED_EIO;

+            }

+            else

+            {

+                /*  Metaroot is not valid, so it is ignored and there's nothing

+                    to do here.

+                */

+            }

+        }

+

+        if(ret == 0)

+        {

+            if(bMR == UINT8_MAX)

+            {

+                /*  Neither metaroot was valid.

+                */

+                ret = -RED_EIO;

+            }

+            else

+            {

+                gpRedCoreVol->bCurMR = bMR;

+                gpRedMR = &gpRedCoreVol->aMR[bMR];

+            }

+        }

+    }

+

+    if(ret == 0)

+    {

+        /*  Normally the metaroot contains the highest sequence number, but the

+            master block is the last block written during format, so on a

+            freshly formatted volume the master block sequence number (stored in

+            gpRedVolume->ullSequence) will be higher than that in the metaroot.

+        */

+        if(gpRedMR->hdr.ullSequence > gpRedVolume->ullSequence)

+        {

+            gpRedVolume->ullSequence = gpRedMR->hdr.ullSequence;

+        }

+

+        /*  gpRedVolume->ullSequence stores the *next* sequence number; to avoid

+            giving the next node written to disk the same sequence number as the

+            metaroot, increment it here.

+        */

+        ret = RedVolSeqNumIncrement();

+    }

+

+    if(ret == 0)

+    {

+        gpRedVolume->fMounted = true;

+      #if REDCONF_READ_ONLY == 0

+        gpRedVolume->fReadOnly = false;

+      #endif

+

+      #if RESERVED_BLOCKS > 0U

+        gpRedCoreVol->fUseReservedBlocks = false;

+      #endif

+        gpRedCoreVol->ulAlmostFreeBlocks = 0U;

+

+        gpRedCoreVol->aMR[1U - gpRedCoreVol->bCurMR] = *gpRedMR;

+        gpRedCoreVol->bCurMR = 1U - gpRedCoreVol->bCurMR;

+        gpRedMR = &gpRedCoreVol->aMR[gpRedCoreVol->bCurMR];

+    }

+

+    return ret;

+}

+

+

+/** @brief Determine whether the metaroot is valid.

+

+    @param pMR                  The metaroot buffer.

+    @param pfSectorCRCIsValid   Populated with whether the first sector of the

+                                metaroot buffer is valid.

+

+    @return Whether the metaroot is valid.

+

+    @retval true    The metaroot buffer is valid.

+    @retval false   The metaroot buffer is invalid.

+*/

+static bool MetarootIsValid(

+    METAROOT   *pMR,

+    bool       *pfSectorCRCIsValid)

+{

+    bool        fRet = false;

+

+    if(pfSectorCRCIsValid == NULL)

+    {

+        REDERROR();

+    }

+    else if(pMR == NULL)

+    {

+        REDERROR();

+        *pfSectorCRCIsValid = false;

+    }

+  #ifdef REDCONF_ENDIAN_SWAP

+    else if(RedRev32(pMR->hdr.ulSignature) != META_SIG_METAROOT)

+  #else

+    else if(pMR->hdr.ulSignature != META_SIG_METAROOT)

+  #endif

+    {

+        *pfSectorCRCIsValid = false;

+    }

+    else

+    {

+        const uint8_t  *pbMR = CAST_VOID_PTR_TO_CONST_UINT8_PTR(pMR);

+        uint32_t        ulSectorCRC = pMR->ulSectorCRC;

+        uint32_t        ulCRC;

+

+      #ifdef REDCONF_ENDIAN_SWAP

+        ulSectorCRC = RedRev32(ulSectorCRC);

+      #endif

+

+        /*  The sector CRC was zero when the CRC was computed during the

+            transaction, so it must be zero here.

+        */

+        pMR->ulSectorCRC = 0U;

+

+        ulCRC = RedCrc32Update(0U, &pbMR[8U], gpRedVolConf->ulSectorSize - 8U);

+

+        fRet = ulCRC == ulSectorCRC;

+        *pfSectorCRCIsValid = fRet;

+

+        if(fRet)

+        {

+            if(gpRedVolConf->ulSectorSize < REDCONF_BLOCK_SIZE)

+            {

+                ulCRC = RedCrc32Update(ulCRC, &pbMR[gpRedVolConf->ulSectorSize], REDCONF_BLOCK_SIZE - gpRedVolConf->ulSectorSize);

+            }

+

+          #ifdef REDCONF_ENDIAN_SWAP

+            ulCRC = RedRev32(ulCRC);

+          #endif

+

+            fRet = ulCRC == pMR->hdr.ulCRC;

+        }

+    }

+

+    return fRet;

+}

+

+

+#if REDCONF_READ_ONLY == 0

+/** @brief Commit a transaction point.

+

+    @return A negated ::REDSTATUS code indicating the operation result.

+

+    @retval 0           Operation was successful.

+    @retval -RED_EIO    A disk I/O error occurred.

+*/

+REDSTATUS RedVolTransact(void)

+{

+    REDSTATUS ret = 0;

+

+    REDASSERT(!gpRedVolume->fReadOnly); /* Should be checked by caller. */

+

+    if(gpRedCoreVol->fBranched)

+    {

+        gpRedMR->ulFreeBlocks += gpRedCoreVol->ulAlmostFreeBlocks;

+        gpRedCoreVol->ulAlmostFreeBlocks = 0U;

+

+        ret = RedBufferFlush(0U, gpRedVolume->ulBlockCount);

+

+        if(ret == 0)

+        {

+            gpRedMR->hdr.ulSignature = META_SIG_METAROOT;

+            gpRedMR->hdr.ullSequence = gpRedVolume->ullSequence;

+

+            ret = RedVolSeqNumIncrement();

+        }

+

+        if(ret == 0)

+        {

+            const uint8_t  *pbMR = CAST_VOID_PTR_TO_CONST_UINT8_PTR(gpRedMR);

+            uint32_t        ulSectorCRC;

+

+          #ifdef REDCONF_ENDIAN_SWAP

+            MetaRootEndianSwap(gpRedMR);

+          #endif

+

+            gpRedMR->ulSectorCRC = 0U;

+

+            ulSectorCRC = RedCrc32Update(0U, &pbMR[8U], gpRedVolConf->ulSectorSize - 8U);

+

+            if(gpRedVolConf->ulSectorSize < REDCONF_BLOCK_SIZE)

+            {

+                gpRedMR->hdr.ulCRC = RedCrc32Update(ulSectorCRC, &pbMR[gpRedVolConf->ulSectorSize], REDCONF_BLOCK_SIZE - gpRedVolConf->ulSectorSize);

+            }

+            else

+            {

+                gpRedMR->hdr.ulCRC = ulSectorCRC;

+            }

+

+            gpRedMR->ulSectorCRC = ulSectorCRC;

+

+          #ifdef REDCONF_ENDIAN_SWAP

+            gpRedMR->hdr.ulCRC = RedRev32(gpRedMR->hdr.ulCRC);

+            gpRedMR->ulSectorCRC = RedRev32(gpRedMR->ulSectorCRC);

+          #endif

+

+            /*  Flush the block device before writing the metaroot, so that all

+                previously written blocks are guaranteed to be on the media before

+                the metaroot is written.  Otherwise, if the block device reorders

+                the writes, the metaroot could reach the media before metadata it

+                points at, creating a window for disk corruption if power is lost.

+            */

+            ret = RedIoFlush(gbRedVolNum);

+        }

+

+        if(ret == 0)

+        {

+            ret = RedIoWrite(gbRedVolNum, BLOCK_NUM_FIRST_METAROOT + gpRedCoreVol->bCurMR, 1U, gpRedMR);

+

+          #ifdef REDCONF_ENDIAN_SWAP

+            MetaRootEndianSwap(gpRedMR);

+          #endif

+        }

+

+        /*  Flush the block device to force the metaroot write to the media.  This

+            guarantees the transaction point is really complete before we return.

+        */

+        if(ret == 0)

+        {

+            ret = RedIoFlush(gbRedVolNum);

+        }

+

+        /*  Toggle to the other metaroot buffer.  The working state and committed

+            state metaroot buffers exchange places.

+        */

+        if(ret == 0)

+        {

+            uint8_t bNextMR = 1U - gpRedCoreVol->bCurMR;

+

+            gpRedCoreVol->aMR[bNextMR] = *gpRedMR;

+            gpRedCoreVol->bCurMR = bNextMR;

+

+            gpRedMR = &gpRedCoreVol->aMR[gpRedCoreVol->bCurMR];

+

+            gpRedCoreVol->fBranched = false;

+        }

+

+        CRITICAL_ASSERT(ret == 0);

+    }

+

+    return ret;

+}

+#endif

+

+

+#ifdef REDCONF_ENDIAN_SWAP

+static void MetaRootEndianSwap(

+    METAROOT *pMetaRoot)

+{

+    if(pMetaRoot == NULL)

+    {

+        REDERROR();

+    }

+    else

+    {

+        pMetaRoot->ulSectorCRC = RedRev32(pMetaRoot->ulSectorCRC);

+        pMetaRoot->ulFreeBlocks = RedRev32(pMetaRoot->ulFreeBlocks);

+      #if REDCONF_API_POSIX == 1

+        pMetaRoot->ulFreeInodes = RedRev32(pMetaRoot->ulFreeInodes);

+      #endif

+        pMetaRoot->ulAllocNextBlock = RedRev32(pMetaRoot->ulAllocNextBlock);

+    }

+}

+#endif

+

+

+/** @brief Process a critical file system error.

+

+    @param pszFileName  The file in which the error occurred.

+    @param ulLineNum    The line number at which the error occurred.

+*/

+void RedVolCriticalError(

+    const char *pszFileName,

+    uint32_t    ulLineNum)

+{

+  #if REDCONF_OUTPUT == 1

+  #if REDCONF_READ_ONLY == 0

+    if(!gpRedVolume->fReadOnly)

+    {

+        RedOsOutputString("Critical file system error in Reliance Edge, setting volume to READONLY\n");

+    }

+    else

+  #endif

+    {

+        RedOsOutputString("Critical file system error in Reliance Edge (volume already READONLY)\n");

+    }

+  #endif

+

+  #if REDCONF_READ_ONLY == 0

+    gpRedVolume->fReadOnly = true;

+  #endif

+

+  #if REDCONF_ASSERTS == 1

+    RedOsAssertFail(pszFileName, ulLineNum);

+  #else

+    (void)pszFileName;

+    (void)ulLineNum;

+  #endif

+}

+

+

+/** @brief Increment the sequence number.

+

+    @return A negated ::REDSTATUS code indicating the operation result.

+

+    @retval 0           Operation was successful.

+    @retval -RED_EINVAL Cannot increment sequence number: maximum value reached.

+                        This should not ever happen.

+*/

+REDSTATUS RedVolSeqNumIncrement(void)

+{

+    REDSTATUS ret;

+

+    if(gpRedVolume->ullSequence == UINT64_MAX)

+    {

+        /*  In practice this should never, ever happen; to get here, there would

+            need to be UINT64_MAX disk writes, which would take eons: longer

+            than the lifetime of any product or storage media.  If this assert

+            fires and the current year is still written with four digits,

+            suspect memory corruption.

+        */

+        CRITICAL_ERROR();

+        ret = -RED_EFUBAR;

+    }

+    else

+    {

+        gpRedVolume->ullSequence++;

+        ret = 0;

+    }

+

+    return ret;

+}

+

diff --git a/FreeRTOS-Plus/Source/Reliance-Edge/core/include/redcore.h b/FreeRTOS-Plus/Source/Reliance-Edge/core/include/redcore.h
new file mode 100644
index 0000000..077eb93
--- /dev/null
+++ b/FreeRTOS-Plus/Source/Reliance-Edge/core/include/redcore.h
@@ -0,0 +1,257 @@
+/*             ----> DO NOT REMOVE THE FOLLOWING NOTICE <----

+

+                   Copyright (c) 2014-2015 Datalight, Inc.

+                       All Rights Reserved Worldwide.

+

+    This program is free software; you can redistribute it and/or modify

+    it under the terms of the GNU General Public License as published by

+    the Free Software Foundation; use version 2 of the License.

+

+    This program is distributed in the hope that it will be useful,

+    but "AS-IS," WITHOUT ANY WARRANTY; without even the implied warranty

+    of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the

+    GNU General Public License for more details.

+

+    You should have received a copy of the GNU General Public License along

+    with this program; if not, write to the Free Software Foundation, Inc.,

+    51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.

+*/

+/*  Businesses and individuals that for commercial or other reasons cannot

+    comply with the terms of the GPLv2 license may obtain a commercial license

+    before incorporating Reliance Edge into proprietary software for

+    distribution in any form.  Visit http://www.datalight.com/reliance-edge for

+    more information.

+*/

+/** @file

+*/

+#ifndef REDCORE_H

+#define REDCORE_H

+

+

+#include <redstat.h>

+#include <redvolume.h>

+#include "rednodes.h"

+#include "redcoremacs.h"

+#include "redcorevol.h"

+

+

+#define META_SIG_MASTER     (0x5453414DU)   /* 'MAST' */

+#define META_SIG_METAROOT   (0x4154454DU)   /* 'META' */

+#define META_SIG_IMAP       (0x50414D49U)   /* 'IMAP' */

+#define META_SIG_INODE      (0x444F4E49U)   /* 'INOD' */

+#define META_SIG_DINDIR     (0x494C4244U)   /* 'DBLI' */

+#define META_SIG_INDIR      (0x49444E49U)   /* 'INDI' */

+

+

+REDSTATUS RedIoRead(uint8_t bVolNum, uint32_t ulBlockStart, uint32_t ulBlockCount, void *pBuffer);

+#if REDCONF_READ_ONLY == 0

+REDSTATUS RedIoWrite(uint8_t bVolNum, uint32_t ulBlockStart, uint32_t ulBlockCount, const void *pBuffer);

+REDSTATUS RedIoFlush(uint8_t bVolNum);

+#endif

+

+

+/** Indicates a block buffer is dirty (its contents are different than the

+    contents of the corresponding block on disk); or, when passed into

+    RedBufferGet(), indicates that the buffer should be marked dirty.

+*/

+#define BFLAG_DIRTY         ((uint16_t) 0x0001U)

+

+/** Tells RedBufferGet() that the buffer is for a newly allocated block, and its

+    contents should be zeroed instead of being read from disk.  Always used in

+    combination with BFLAG_DIRTY.

+*/

+#define BFLAG_NEW           ((uint16_t) 0x0002U)

+

+/** Indicates that a block buffer is a master block (MASTERBLOCK) metadata node.

+*/

+#define BFLAG_META_MASTER   ((uint16_t)(0x0004U | BFLAG_META))

+

+/** Indicates that a block buffer is an imap (IMAPNODE) metadata node.

+*/

+#define BFLAG_META_IMAP     ((uint16_t)(0x0008U | BFLAG_META))

+

+/** Indicates that a block buffer is an inode (INODE) metadata node.

+*/

+#define BFLAG_META_INODE    ((uint16_t)(0x0010U | BFLAG_META))

+

+/** Indicates that a block buffer is an indirect (INDIR) metadata node.

+*/

+#define BFLAG_META_INDIR    ((uint16_t)(0x0020U | BFLAG_META))

+

+/** Indicates that a block buffer is a double indirect (DINDIR) metadata node.

+*/

+#define BFLAG_META_DINDIR   ((uint16_t)(0x0040U | BFLAG_META))

+

+/** Indicates that a block buffer is a metadata node.  Callers of RedBufferGet()

+    should not use this flag; instead, use one of the BFLAG_META_* flags.

+*/

+#define BFLAG_META          ((uint16_t) 0x8000U)

+

+

+void RedBufferInit(void);

+REDSTATUS RedBufferGet(uint32_t ulBlock, uint16_t uFlags, void **ppBuffer);

+void RedBufferPut(const void *pBuffer);

+#if REDCONF_READ_ONLY == 0

+REDSTATUS RedBufferFlush(uint32_t ulBlockStart, uint32_t ulBlockCount);

+void RedBufferDirty(const void *pBuffer);

+void RedBufferBranch(const void *pBuffer, uint32_t ulBlockNew);

+#if (REDCONF_API_POSIX == 1) || FORMAT_SUPPORTED

+void RedBufferDiscard(const void *pBuffer);

+#endif

+#endif

+REDSTATUS RedBufferDiscardRange(uint32_t ulBlockStart, uint32_t ulBlockCount);

+

+

+/** @brief Allocation state of a block.

+*/

+typedef enum

+{

+    ALLOCSTATE_FREE,    /**< Free and may be allocated; writeable. */

+    ALLOCSTATE_USED,    /**< In-use and transacted; not writeable. */

+    ALLOCSTATE_NEW,     /**< In-use but not transacted; writeable. */

+    ALLOCSTATE_AFREE    /**< Will become free after a transaction; not writeable. */

+} ALLOCSTATE;

+

+REDSTATUS RedImapBlockGet(uint8_t bMR, uint32_t ulBlock, bool *pfAllocated);

+#if REDCONF_READ_ONLY == 0

+REDSTATUS RedImapBlockSet(uint32_t ulBlock, bool fAllocated);

+REDSTATUS RedImapAllocBlock(uint32_t *pulBlock);

+#endif

+REDSTATUS RedImapBlockState(uint32_t ulBlock, ALLOCSTATE *pState);

+

+#if REDCONF_IMAP_INLINE == 1

+REDSTATUS RedImapIBlockGet(uint8_t bMR, uint32_t ulBlock, bool *pfAllocated);

+REDSTATUS RedImapIBlockSet(uint32_t ulBlock, bool fAllocated);

+#endif

+

+#if REDCONF_IMAP_EXTERNAL == 1

+REDSTATUS RedImapEBlockGet(uint8_t bMR, uint32_t ulBlock, bool *pfAllocated);

+REDSTATUS RedImapEBlockSet(uint32_t ulBlock, bool fAllocated);

+uint32_t RedImapNodeBlock(uint8_t bMR, uint32_t ulImapNode);

+#endif

+

+

+/** @brief Cached inode structure.

+*/

+typedef struct

+{

+    uint32_t    ulInode;        /**< The inode number of the cached inode. */

+  #if REDCONF_API_POSIX == 1

+    bool        fDirectory;     /**< True if the inode is a directory. */

+  #endif

+  #if REDCONF_READ_ONLY == 0

+    bool        fBranched;      /**< True if the inode is branched (writeable). */

+    bool        fDirty;         /**< True if the inode buffer is dirty. */

+  #endif

+    bool        fCoordInited;   /**< True after the first seek. */

+

+    INODE      *pInodeBuf;      /**< Pointer to the inode buffer. */

+  #if DINDIR_POINTERS > 0U

+    DINDIR     *pDindir;        /**< Pointer to the double indirect node buffer. */

+  #endif

+  #if REDCONF_DIRECT_POINTERS < INODE_ENTRIES

+    INDIR      *pIndir;         /**< Pointer to the indirect node buffer. */

+  #endif

+    uint8_t    *pbData;         /**< Pointer to the data block buffer. */

+

+    /*  All the members below this point are part of the seek coordinates; see

+        RedInodeDataSeek().

+    */

+    uint32_t    ulLogicalBlock; /**< Logical block offset into the inode. */

+  #if DINDIR_POINTERS > 0U

+    uint32_t    ulDindirBlock;  /**< Physical block number of the double indirect node. */

+  #endif

+  #if REDCONF_DIRECT_POINTERS < INODE_ENTRIES

+    uint32_t    ulIndirBlock;   /**< Physical block number of the indirect node. */

+  #endif

+    uint32_t    ulDataBlock;    /**< Physical block number of the file data block. */

+

+    uint16_t    uInodeEntry;    /**< Which inode entry to traverse to reach ulLogicalBlock. */

+  #if DINDIR_POINTERS > 0U

+    uint16_t    uDindirEntry;   /**< Which double indirect entry to traverse to reach ulLogicalBlock. */

+  #endif

+  #if REDCONF_DIRECT_POINTERS < INODE_ENTRIES

+    uint16_t    uIndirEntry;    /**< Which indirect entry to traverse to reach ulLogicalBlock. */

+  #endif

+} CINODE;

+

+#define CINODE_IS_MOUNTED(pInode)   (((pInode) != NULL) && INODE_IS_VALID((pInode)->ulInode) && ((pInode)->pInodeBuf != NULL))

+#define CINODE_IS_DIRTY(pInode)     (CINODE_IS_MOUNTED(pInode) && (pInode)->fDirty)

+

+

+#define IPUT_UPDATE_ATIME   (0x01U)

+#define IPUT_UPDATE_MTIME   (0x02U)

+#define IPUT_UPDATE_CTIME   (0x04U)

+#define IPUT_UPDATE_MASK    (IPUT_UPDATE_ATIME|IPUT_UPDATE_MTIME|IPUT_UPDATE_CTIME)

+

+

+REDSTATUS RedInodeMount(CINODE *pInode, FTYPE type, bool fBranch);

+#if REDCONF_READ_ONLY == 0

+REDSTATUS RedInodeBranch(CINODE *pInode);

+#endif

+#if (REDCONF_READ_ONLY == 0) && ((REDCONF_API_POSIX == 1) || FORMAT_SUPPORTED)

+REDSTATUS RedInodeCreate(CINODE *pInode, uint32_t ulPInode, uint16_t uMode);

+#endif

+#if DELETE_SUPPORTED

+REDSTATUS RedInodeDelete(CINODE *pInode);

+REDSTATUS RedInodeLinkDec(CINODE *pInode);

+#endif

+#if (REDCONF_READ_ONLY == 0) && (REDCONF_API_POSIX == 1)

+REDSTATUS RedInodeFree(CINODE *pInode);

+#endif

+void RedInodePut(CINODE *pInode, uint8_t bTimeFields);

+void RedInodePutCoord(CINODE *pInode);

+#if DINDIR_POINTERS > 0U

+void RedInodePutDindir(CINODE *pInode);

+#endif

+#if REDCONF_DIRECT_POINTERS < INODE_ENTRIES

+void RedInodePutIndir(CINODE *pInode);

+#endif

+void RedInodePutData(CINODE *pInode);

+#if ((REDCONF_READ_ONLY == 0) && ((REDCONF_API_POSIX == 1) || FORMAT_SUPPORTED)) || (REDCONF_CHECKER == 1)

+REDSTATUS RedInodeIsFree(uint32_t ulInode, bool *pfFree);

+#endif

+REDSTATUS RedInodeBitGet(uint8_t bMR, uint32_t ulInode, uint8_t bWhich, bool *pfAllocated);

+

+REDSTATUS RedInodeDataRead(CINODE *pInode, uint64_t ullStart, uint32_t *pulLen, void *pBuffer);

+#if REDCONF_READ_ONLY == 0

+REDSTATUS RedInodeDataWrite(CINODE *pInode, uint64_t ullStart, uint32_t *pulLen, const void *pBuffer);

+#if DELETE_SUPPORTED || TRUNCATE_SUPPORTED

+REDSTATUS RedInodeDataTruncate(CINODE *pInode, uint64_t ullSize);

+#endif

+#endif

+REDSTATUS RedInodeDataSeekAndRead(CINODE *pInode, uint32_t ulBlock);

+REDSTATUS RedInodeDataSeek(CINODE *pInode, uint32_t ulBlock);

+

+#if REDCONF_API_POSIX == 1

+#if REDCONF_READ_ONLY == 0

+REDSTATUS RedDirEntryCreate(CINODE *pPInode, const char *pszName, uint32_t ulInode);

+#endif

+#if DELETE_SUPPORTED

+REDSTATUS RedDirEntryDelete(CINODE *pPInode, uint32_t ulDeleteIdx);

+#endif

+REDSTATUS RedDirEntryLookup(CINODE *pPInode, const char *pszName, uint32_t *pulEntryIdx, uint32_t *pulInode);

+#if (REDCONF_API_POSIX_READDIR == 1) || (REDCONF_CHECKER == 1)

+REDSTATUS RedDirEntryRead(CINODE *pPInode, uint32_t *pulIdx, char *pszName, uint32_t *pulInode);

+#endif

+#if (REDCONF_READ_ONLY == 0) && (REDCONF_API_POSIX_RENAME == 1)

+REDSTATUS RedDirEntryRename(CINODE *pSrcPInode, const char *pszSrcName, CINODE *pSrcInode, CINODE *pDstPInode, const char *pszDstName, CINODE *pDstInode);

+#endif

+#endif

+

+REDSTATUS RedVolMount(void);

+REDSTATUS RedVolMountMaster(void);

+REDSTATUS RedVolMountMetaroot(void);

+#if REDCONF_READ_ONLY == 0

+REDSTATUS RedVolTransact(void);

+#endif

+void RedVolCriticalError(const char *pszFileName, uint32_t ulLineNum);

+REDSTATUS RedVolSeqNumIncrement(void);

+

+#if FORMAT_SUPPORTED

+REDSTATUS RedVolFormat(void);

+#endif

+

+

+#endif

+

diff --git a/FreeRTOS-Plus/Source/Reliance-Edge/core/include/redcoremacs.h b/FreeRTOS-Plus/Source/Reliance-Edge/core/include/redcoremacs.h
new file mode 100644
index 0000000..221ac91
--- /dev/null
+++ b/FreeRTOS-Plus/Source/Reliance-Edge/core/include/redcoremacs.h
@@ -0,0 +1,92 @@
+/*             ----> DO NOT REMOVE THE FOLLOWING NOTICE <----

+

+                   Copyright (c) 2014-2015 Datalight, Inc.

+                       All Rights Reserved Worldwide.

+

+    This program is free software; you can redistribute it and/or modify

+    it under the terms of the GNU General Public License as published by

+    the Free Software Foundation; use version 2 of the License.

+

+    This program is distributed in the hope that it will be useful,

+    but "AS-IS," WITHOUT ANY WARRANTY; without even the implied warranty

+    of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the

+    GNU General Public License for more details.

+

+    You should have received a copy of the GNU General Public License along

+    with this program; if not, write to the Free Software Foundation, Inc.,

+    51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.

+*/

+/*  Businesses and individuals that for commercial or other reasons cannot

+    comply with the terms of the GPLv2 license may obtain a commercial license

+    before incorporating Reliance Edge into proprietary software for

+    distribution in any form.  Visit http://www.datalight.com/reliance-edge for

+    more information.

+*/

+/** @file

+*/

+#ifndef REDCOREMACS_H

+#define REDCOREMACS_H

+

+

+#define BLOCK_NUM_MASTER         (0UL) /* Block number of the master block. */

+#define BLOCK_NUM_FIRST_METAROOT (1UL) /* Block number of the first metaroot. */

+

+#define BLOCK_SPARSE        (0U)

+

+#define DINDIR_POINTERS     ((INODE_ENTRIES - REDCONF_DIRECT_POINTERS) - REDCONF_INDIRECT_POINTERS)

+#define DINDIR_DATA_BLOCKS  (INDIR_ENTRIES * INDIR_ENTRIES)

+

+#define INODE_INDIR_BLOCKS  (REDCONF_INDIRECT_POINTERS * INDIR_ENTRIES)

+#define INODE_DINDIR_BLOCKS (DINDIR_POINTERS * DINDIR_DATA_BLOCKS)

+#define INODE_DATA_BLOCKS   (REDCONF_DIRECT_POINTERS + INODE_INDIR_BLOCKS + INODE_DINDIR_BLOCKS)

+#define INODE_SIZE_MAX      (UINT64_SUFFIX(1) * REDCONF_BLOCK_SIZE * INODE_DATA_BLOCKS)

+

+

+/*  First inode number that can be allocated.

+*/

+#if REDCONF_API_POSIX == 1

+#define INODE_FIRST_FREE    (INODE_FIRST_VALID + 1U)

+#else

+#define INODE_FIRST_FREE    (INODE_FIRST_VALID)

+#endif

+

+/** @brief Determine if an inode number is valid.

+*/

+#define INODE_IS_VALID(INODENUM)    (((INODENUM) >= INODE_FIRST_VALID) && ((INODENUM) < (INODE_FIRST_VALID + gpRedVolConf->ulInodeCount)))

+

+

+/*  The number of blocks reserved to allow a truncate or delete operation to

+    complete when the disk is otherwise full.

+

+    The more expensive of the two operations is delete, which has to actually

+    write to a file data block to remove the directory entry.

+*/

+#if REDCONF_READ_ONLY == 1

+  #define RESERVED_BLOCKS 0U

+#elif (REDCONF_API_POSIX == 1) && ((REDCONF_API_POSIX_UNLINK == 1) || (REDCONF_API_POSIX_RMDIR == 1))

+  #if DINDIR_POINTERS > 0U

+    #define RESERVED_BLOCKS 3U

+  #elif REDCONF_INDIRECT_POINTERS > 0U

+    #define RESERVED_BLOCKS 2U

+  #else

+    #define RESERVED_BLOCKS 1U

+  #endif

+#elif ((REDCONF_API_POSIX == 1) && (REDCONF_API_POSIX_FTRUNCATE == 1)) || ((REDCONF_API_FSE == 1) && (REDCONF_API_FSE_TRUNCATE == 1))

+  #if DINDIR_POINTERS > 0U

+    #define RESERVED_BLOCKS 2U

+  #elif REDCONF_INDIRECT_POINTERS > 0U

+    #define RESERVED_BLOCKS 1U

+  #else

+    #define RESERVED_BLOCKS 0U

+  #endif

+#else

+  #define RESERVED_BLOCKS 0U

+#endif

+

+

+#define CRITICAL_ASSERT(EXP)    ((EXP) ? (void)0 : CRITICAL_ERROR())

+#define CRITICAL_ERROR()        RedVolCriticalError(__FILE__, __LINE__)

+

+

+#endif

+

diff --git a/FreeRTOS-Plus/Source/Reliance-Edge/core/include/redcorevol.h b/FreeRTOS-Plus/Source/Reliance-Edge/core/include/redcorevol.h
new file mode 100644
index 0000000..881cbb3
--- /dev/null
+++ b/FreeRTOS-Plus/Source/Reliance-Edge/core/include/redcorevol.h
@@ -0,0 +1,95 @@
+/*             ----> DO NOT REMOVE THE FOLLOWING NOTICE <----

+

+                   Copyright (c) 2014-2015 Datalight, Inc.

+                       All Rights Reserved Worldwide.

+

+    This program is free software; you can redistribute it and/or modify

+    it under the terms of the GNU General Public License as published by

+    the Free Software Foundation; use version 2 of the License.

+

+    This program is distributed in the hope that it will be useful,

+    but "AS-IS," WITHOUT ANY WARRANTY; without even the implied warranty

+    of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the

+    GNU General Public License for more details.

+

+    You should have received a copy of the GNU General Public License along

+    with this program; if not, write to the Free Software Foundation, Inc.,

+    51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.

+*/

+/*  Businesses and individuals that for commercial or other reasons cannot

+    comply with the terms of the GPLv2 license may obtain a commercial license

+    before incorporating Reliance Edge into proprietary software for

+    distribution in any form.  Visit http://www.datalight.com/reliance-edge for

+    more information.

+*/

+/** @file

+*/

+#ifndef REDCOREVOL_H

+#define REDCOREVOL_H

+

+

+/** @brief Per-volume run-time data specific to the core.

+*/

+typedef struct

+{

+    /** Whether this volume uses the inline imap (true) or external imap

+        (false).  Computed at initialization time based on the block count.

+    */

+    bool        fImapInline;

+

+#if REDCONF_IMAP_EXTERNAL == 1

+    /** First block number of the on-disk imap.  Valid only when fImapInline

+        is false.

+    */

+    uint32_t    ulImapStartBN;

+

+    /** The number of double-allocated imap nodes that make up the imap.

+    */

+    uint32_t    ulImapNodeCount;

+#endif

+

+    /** Block number where the inode table starts.

+    */

+    uint32_t    ulInodeTableStartBN;

+

+    /** First block number that can be allocated.

+    */

+    uint32_t    ulFirstAllocableBN;

+

+    /** The two metaroot structures, committed and working state.

+    */

+    METAROOT    aMR[2U];

+

+    /** The index of the current metaroot; must be 0 or 1.

+    */

+    uint8_t     bCurMR;

+

+    /** Whether the volume has been branched or not.

+    */

+    bool        fBranched;

+

+    /** The number of blocks which will become free after the next transaction.

+    */

+    uint32_t    ulAlmostFreeBlocks;

+

+  #if RESERVED_BLOCKS > 0U

+    /** Whether to use the blocks reserved for operations that create free

+        space.

+    */

+    bool        fUseReservedBlocks;

+  #endif

+} COREVOLUME;

+

+/*  Pointer to the core volume currently being accessed; populated during

+    RedCoreVolSetCurrent().

+*/

+extern COREVOLUME * CONST_IF_ONE_VOLUME gpRedCoreVol;

+

+/*  Pointer to the metaroot currently being accessed; populated during

+    RedCoreVolSetCurrent() and RedCoreVolTransact().

+*/

+extern METAROOT   *gpRedMR;

+

+

+#endif

+

diff --git a/FreeRTOS-Plus/Source/Reliance-Edge/core/include/rednodes.h b/FreeRTOS-Plus/Source/Reliance-Edge/core/include/rednodes.h
new file mode 100644
index 0000000..b333878
--- /dev/null
+++ b/FreeRTOS-Plus/Source/Reliance-Edge/core/include/rednodes.h
@@ -0,0 +1,195 @@
+/*             ----> DO NOT REMOVE THE FOLLOWING NOTICE <----

+

+                   Copyright (c) 2014-2015 Datalight, Inc.

+                       All Rights Reserved Worldwide.

+

+    This program is free software; you can redistribute it and/or modify

+    it under the terms of the GNU General Public License as published by

+    the Free Software Foundation; use version 2 of the License.

+

+    This program is distributed in the hope that it will be useful,

+    but "AS-IS," WITHOUT ANY WARRANTY; without even the implied warranty

+    of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the

+    GNU General Public License for more details.

+

+    You should have received a copy of the GNU General Public License along

+    with this program; if not, write to the Free Software Foundation, Inc.,

+    51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.

+*/

+/*  Businesses and individuals that for commercial or other reasons cannot

+    comply with the terms of the GPLv2 license may obtain a commercial license

+    before incorporating Reliance Edge into proprietary software for

+    distribution in any form.  Visit http://www.datalight.com/reliance-edge for

+    more information.

+*/

+/** @file

+*/

+#ifndef REDNODES_H

+#define REDNODES_H

+

+

+#define NODEHEADER_SIZE         (16U)

+#define NODEHEADER_OFFSET_SIG   (0U)

+#define NODEHEADER_OFFSET_CRC   (4U)

+#define NODEHEADER_OFFSET_SEQ   (8U)

+

+/** @brief Common header for all metadata nodes.

+*/

+typedef struct

+{

+    uint32_t    ulSignature;    /**< Value which uniquely identifies the metadata node type. */

+    uint32_t    ulCRC;          /**< CRC-32 checksum of the node contents, starting after the CRC. */

+    uint64_t    ullSequence;    /**< Current sequence number at the time the node was written to disk. */

+} NODEHEADER;

+

+

+/** Flag set in the master block when REDCONF_API_POSIX == 1. */

+#define MBFLAG_API_POSIX        (0x01U)

+

+/** Flag set in the master block when REDCONF_INODE_TIMESTAMPS == 1. */

+#define MBFLAG_INODE_TIMESTAMPS (0x02U)

+

+/** Flag set in the master block when REDCONF_INODE_BLOCKS == 1. */

+#define MBFLAG_INODE_BLOCKS     (0x04U)

+

+/** Flag set in the master block when (REDCONF_API_POSIX == 1) && (REDCONF_API_POSIX_LINK == 1). */

+#define MBFLAG_INODE_NLINK      (0x08U)

+

+

+/** @brief Node which identifies the volume and stores static volume information.

+*/

+typedef struct

+{

+    NODEHEADER  hdr;                /**< Common node header. */

+

+    uint32_t    ulVersion;          /**< On-disk layout version number. */

+    char        acBuildNum[8U];     /**< Build number of the product (not null terminated). */

+    uint32_t    ulFormatTime;       /**< Date and time the volume was formatted. */

+    uint32_t    ulInodeCount;       /**< Compile-time configured number of inodes. */

+    uint32_t    ulBlockCount;       /**< Compile-time configured number of logical blocks. */

+    uint16_t    uMaxNameLen;        /**< Compile-time configured maximum file name length. */

+    uint16_t    uDirectPointers;    /**< Compile-time configured number of direct pointers per inode. */

+    uint16_t    uIndirectPointers;  /**< Compile-time configured number of indirect pointers per inode. */

+    uint8_t     bBlockSizeP2;       /**< Compile-time configured block size, expressed as a power of two. */

+    uint8_t     bFlags;             /**< Compile-time booleans which affect on-disk structures. */

+} MASTERBLOCK;

+

+

+#if REDCONF_API_POSIX == 1

+#define METAROOT_HEADER_SIZE    (NODEHEADER_SIZE + 16U) /* Size in bytes of the metaroot header fields. */

+#else

+#define METAROOT_HEADER_SIZE    (NODEHEADER_SIZE + 12U) /* Size in bytes of the metaroot header fields. */

+#endif

+#define METAROOT_ENTRY_BYTES    (REDCONF_BLOCK_SIZE - METAROOT_HEADER_SIZE) /* Number of bytes remaining in the metaroot block for entries. */

+#define METAROOT_ENTRIES        (METAROOT_ENTRY_BYTES * 8U)

+

+/** @brief Metadata root node; each volume has two.

+*/

+typedef struct

+{

+    NODEHEADER  hdr;                /**< Common node header. */

+

+    uint32_t    ulSectorCRC;        /**< CRC-32 checksum of the first sector. */

+    uint32_t    ulFreeBlocks;       /**< Number of allocable blocks that are free. */

+  #if REDCONF_API_POSIX == 1

+    uint32_t    ulFreeInodes;       /**< Number of inode slots that are free. */

+  #endif

+    uint32_t    ulAllocNextBlock;   /**< Forward allocation pointer. */

+

+    /** Imap bitmap.  With inline imaps, this is the imap bitmap that indicates

+        which inode blocks are used and which allocable blocks are used.

+        Otherwise, this bitmap toggles nodes in the external imap between one

+        of two possible block locations.

+    */

+    uint8_t     abEntries[METAROOT_ENTRY_BYTES];

+} METAROOT;

+

+

+#if REDCONF_IMAP_EXTERNAL == 1

+#define IMAPNODE_HEADER_SIZE    (NODEHEADER_SIZE) /* Size in bytes of the imap node header fields. */

+#define IMAPNODE_ENTRY_BYTES    (REDCONF_BLOCK_SIZE - IMAPNODE_HEADER_SIZE) /* Number of bytes remaining in the imap node for entries. */

+#define IMAPNODE_ENTRIES        (IMAPNODE_ENTRY_BYTES * 8U)

+

+/** @brief One node of the external imap.

+*/

+typedef struct

+{

+    NODEHEADER  hdr;            /**< Common node header. */

+

+    /** Bitmap which indicates which inode blocks are used and which allocable

+        blocks are used.

+    */

+    uint8_t     abEntries[IMAPNODE_ENTRY_BYTES];

+} IMAPNODE;

+#endif

+

+

+#define INODE_HEADER_SIZE   (NODEHEADER_SIZE + 8U + ((REDCONF_INODE_BLOCKS == 1) ? 4U : 0U) + \

+    ((REDCONF_INODE_TIMESTAMPS == 1) ? 12U : 0U) + 4U + ((REDCONF_API_POSIX == 1) ? 4U : 0U))

+#define INODE_ENTRIES       ((REDCONF_BLOCK_SIZE - INODE_HEADER_SIZE) / 4U)

+

+#if (REDCONF_DIRECT_POINTERS < 0) || (REDCONF_DIRECT_POINTERS > (INODE_ENTRIES - REDCONF_INDIRECT_POINTERS))

+  #error "Configuration error: invalid value of REDCONF_DIRECT_POINTERS"

+#endif

+#if (REDCONF_INDIRECT_POINTERS < 0) || (REDCONF_INDIRECT_POINTERS > (INODE_ENTRIES - REDCONF_DIRECT_POINTERS))

+  #error "Configuration error: invalid value of REDCONF_INDIRECT_POINTERS"

+#endif

+

+/** @brief Stores metadata for a file or directory.

+*/

+typedef struct

+{

+    NODEHEADER  hdr;            /**< Common node header. */

+

+    uint64_t    ullSize;        /**< Size of the inode, in bytes. */

+#if REDCONF_INODE_BLOCKS == 1

+    uint32_t    ulBlocks;       /**< Total number file data blocks allocated to the inode. */

+#endif

+#if REDCONF_INODE_TIMESTAMPS == 1

+    uint32_t    ulATime;        /**< Time of last access (seconds since January 1, 1970). */

+    uint32_t    ulMTime;        /**< Time of last modification (seconds since January 1, 1970). */

+    uint32_t    ulCTime;        /**< Time of last status change (seconds since January 1, 1970). */

+#endif

+    uint16_t    uMode;          /**< Inode type (file or directory) and permissions (reserved). */

+#if (REDCONF_API_POSIX == 1) && (REDCONF_API_POSIX_LINK == 1)

+    uint16_t    uNLink;         /**< Link count, number of names pointing to the inode. */

+#else

+    uint8_t     abPadding[2];   /**< Padding to 32-bit align the next member. */

+#endif

+#if REDCONF_API_POSIX == 1

+    uint32_t    ulPInode;       /**< Parent inode number.  Only guaranteed to be accurate for directories. */

+#endif

+

+    /** Block numbers for lower levels of the file metadata structure.  Some

+        fraction of these entries are for direct pointers (file data block

+        numbers), some for indirect pointers, some for double-indirect

+        pointers; the number allocated to each is static but user-configurable.

+        For all types, an array slot is zero if the range is sparse or beyond

+        the end of file.

+    */

+    uint32_t    aulEntries[INODE_ENTRIES];

+} INODE;

+

+

+#define INDIR_HEADER_SIZE   (NODEHEADER_SIZE + 4U)

+#define INDIR_ENTRIES       ((REDCONF_BLOCK_SIZE - INDIR_HEADER_SIZE) / 4U)

+

+/** @brief Node for storing block pointers.

+*/

+typedef struct

+{

+    NODEHEADER  hdr;        /**< Common node header. */

+

+    uint32_t    ulInode;    /**< Inode which owns this indirect or double indirect. */

+

+    /** For indirect nodes, stores block numbers of file data.  For double

+        indirect nodes, stores block numbers of indirect nodes.  An array

+        slot is zero if the corresponding block or indirect range is beyond

+        the end of file or entirely sparse.

+    */

+    uint32_t    aulEntries[INDIR_ENTRIES];

+} INDIR, DINDIR;

+

+

+#endif

+

diff --git a/FreeRTOS-Plus/Source/Reliance-Edge/doc/coding_style.txt b/FreeRTOS-Plus/Source/Reliance-Edge/doc/coding_style.txt
new file mode 100644
index 0000000..1a816dd
--- /dev/null
+++ b/FreeRTOS-Plus/Source/Reliance-Edge/doc/coding_style.txt
@@ -0,0 +1,389 @@
+Datalight Coding Style

+======================

+

+This is a description of the Datalight Coding Style intended for third parties

+who want to contribute code to Reliance Edge.  This document is derived from the

+DDSS Coding Guidelines, but only contains a subset of the content which is most

+likely to be relevant to third party contributors.

+

+Reliance Edge complies with the MISRA-C:2012 coding guidelines, which includes

+many rules that affect coding style.  Unfortunately the MISRA-C:2012 document is

+not freely available, and is much too long to be effectively summarized, but if

+you are familiar with the rules, adhere to them.  A few important rules of

+thumb: avoid the goto and continue keywords; avoid using more than one break

+in a loop; and avoid having more than one return from a function (single point

+of exit); default cases in every switch statement; avoid recursion; and make

+generous use of parentheses.  Outside of the file system driver, in tests and

+host tools, the MISRA-C rules are relaxed.

+

+Beyond MISRA-C, Datalight has a standard coding style.  Most aspects of this

+style are matters of preference, but when contributing code to Datalight an

+effort should be made to use this style for the sake of consistency.

+

+Below is an example function, which illustrates several key points of Datalight

+Coding Style:

+

+/** @brief One-sentence description of what this function does.

+

+    Additional description.

+

+    @param ulFirstParameter Description of the parameter.

+    @param pszPointer       Description of the parameter.

+

+    @return Describe the return value.

+

+    @retval true    Optional description of specific return value.

+    @retval false   Optional description of specific return value.

+*/

+bool ExampleFunction(

+    uint32_t    ulFirstParameter,

+    char       *pszPointer)

+{

+    bool        fStatus = true;

+

+    /*  This is a single-line comment.

+    */

+    if(ulFirstParameter > 0U)

+    {

+        /*  This is a multi-line comment.  Filler text: Lorem ipsum dolor sit

+            amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt

+            ut labore et dolore magna aliqua.

+        */

+        FunctionCall();

+

+        while(fStatus)

+        {

+            fStatus = AnotherFunction(ulFirstParameter, pszPointer);

+        }

+    }

+

+    return fStatus;

+}

+

+Tab Stop Conventions

+--------------------

+

+In all C code (.c/.h), use a tab width of four spaces, and use soft tabs (in

+other words, tabs are expanded to spaces).  In Makefiles, use hard tabs and a

+tab width of 8.

+

+Naming

+------

+

+Datalight uses CamelCase for functions and variables.  Type names are generally

+UPPERCASE, except for standard types like uint32_t.  Preprocessor macros are

+UPPERCASE, with words separated by underscores (for example, INODE_INVALID).

+

+Doxygen Documentation

+---------------------

+

+Doxygen is used to document functions (including static functions), along with

+types, structures, files, etc.  For Doxygen tags, use '@' instead of a backslash

+(thus "@param" not "\param").

+

+Function Declarations

+---------------------

+

+Multi-line function declarations are preferred, as they tend to be more

+readable.  Use the following form:

+

+static bool ExampleFunctionDeclaration(

+    uint32_t    ulFirstParameter,

+    char       *pszPointer,

+    uint8_t   **ppbBuffer)

+{

+    uint16_t    uLocalVar;       /* descriptive comment */

+    uint8_t    *pbBuffer = NULL; /* descriptive comment */

+

+    Function body...

+}

+

+The following guidelines should be used:

+

+- Align both the data-type and the variable names, for parameters and locals, at

+  the same level if practical.

+- For pointer types, the '*' belongs to the variable name---it's not part of the

+  data-type, so keep it with the variable name.

+- If useful, single line comments may be used to describe local variables (not

+  a requirement).

+- For functions with no parameters, the "void" declaration does not need to be

+  on a separate line.

+- Generally each variable should be declared on a separate line.  This promotes

+  readability, and facilitates having a comment for each variable.

+

+Function declarations should be spaced apart by two blank lines between the

+closing brace which ends a function and the Doxygen comment which starts the

+next.

+

+Curly Braces

+------------

+

+Datalight lines up all curly braces vertically.  As per MISRA-C, curly braces

+are never omitted, even if the braces contain only a single statement.

+

+For consistency, even structure declarations and initializations should use the

+same style, with the curly braces lined up vertically.  One exception is for

+structure initializations where both the opening and closing curly braces can

+fit on the same line.  If so, do it.

+

+Code Comments

+-------------

+

+Datalight uses the standard C style /* comments */.  C++ style comments (//) are

+never used.  The Datalight standard comment style is shown below.  This style

+applies to all general comments within the code.

+

+/*  This is a single-line comment.

+*/

+if(ulFirstParameter > 0U)

+{

+    /*  This is a multi-line comment.  Filler text: Lorem ipsum dolor sit amet,

+        consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore

+        et dolore magna aliqua.

+    */

+    while(fStatus)

+    {

+    }

+}

+

+Note the characteristics:

+

+- The /* and */ align with the natural 4 character indentation.

+- The comment text is exactly indented another 4 characters.

+- The comment text starts on the same line as the opening /*.

+- The terminating */ is on its own line.

+- There is usually a single blank line preceding the comment, however if the

+  preceding line is an opening curly brace, then an extra blank line is not

+  necessary.

+- There is usually no blank line after the comment, but rather the closing */

+  "attaches" the comment to the code about which the comment refers.

+- These comments should always fit with the standard 80 character margin.

+

+Comments where the /* and */ are on the same line may be used in a few places:

+

+- For variable or parameter descriptions, where the comment fits on the same

+  line as the declaration.

+- For structure member declarations, where the comment fits on the same line as

+  the declaration.

+- For macros or preprocessor logic, where the comment fits on the same line.

+

+It is OK for such comments to exceed the 80 character margin by a small amount,

+if necessary, as this sometimes promotes code readability.

+

+Indentation Style

+-----------------

+

+The general paradigm used in Datalight code is that curly braces line up

+vertically, and everything in between them is indented.  This should include all

+comments, labels, and preprocessor symbols.   The only things which are aligned

+at the left-most columns are:

+

+- Symbols, variables, declarations, and preprocessor logic which are at the

+  module-scope (outside of a function)

+- Comments which are outside of a function

+- Function declarations

+- Function open and closing curly braces

+

+Typically comments are always lined up directly with the code to which they

+apply.

+

+Labels (when used; gotos are disallowed in driver code) are lined up two

+characters to the left of the code they reside in, to make them stand out, while

+as the same time, still remaining subservient to the level of curly braces in

+which they reside.  For example:

+

+bool ExampleLabelUsage(void)

+{

+    MutexLock();

+

+    Lots of complicated code...

+

+  Unlock:

+

+    MutexUnlock();

+

+    return fSuccess;

+}

+

+Preprocessor logic, such as controlling features which are conditionally

+compiled in or out, should not disrupt the flow of the code, but rather should

+be indented in similar fashion to the code it controls, but positioned two

+characters to the left.  For example, consider the following code snippet.  The

+preprocessor conditions are both indented relative to the outer curly braces,

+but do not disrupt the normal code flow.

+

+int32_t red_statvfs(

+    const char *pszVolume,

+    REDSTATFS  *pStatvfs)

+{

+    REDSTATUS   ret;

+

+    ret = PosixEnter();

+    if(ret == 0)

+    {

+        uint8_t bVolNum;

+

+        ret = RedPathSplit(pszVolume, &bVolNum, NULL);

+

+      #if REDCONF_VOLUME_COUNT > 1U

+        if(ret == 0)

+        {

+            ret = RedCoreVolSetCurrent(bVolNum);

+        }

+      #endif

+

+        if(ret == 0)

+        {

+            ret = RedCoreVolStat(pStatvfs);

+        }

+

+        PosixLeave();

+    }

+

+    return PosixReturn(ret);

+}

+

+Note that, like anything else between curly brackets, the contents of a switch

+statement are indented:

+

+switch(ulSignature)

+{

+    case META_SIG_MASTER:

+        fValid = (uFlags == BFLAG_META_MASTER);

+        break;

+    case META_SIG_IMAP:

+        fValid = (uFlags == BFLAG_META_IMAP);

+        break;

+    case META_SIG_INODE:

+        fValid = (uFlags == BFLAG_META_INODE);

+        break;

+    case META_SIG_DINDIR:

+        fValid = (uFlags == BFLAG_META_DINDIR);

+        break;

+    case META_SIG_INDIR:

+        fValid = (uFlags == BFLAG_META_INDIR);

+        break;

+    default:

+        fValid = false;

+        break;

+}

+

+Maximum Line Length

+-------------------

+

+The maximum line length for code need not be rigidly limited to the traditional

+80 characters.  Nevertheless the line lengths should be kept reasonable.

+Anything longer than 100 to 120 characters should probably be broken up.  The

+most important consideration is readability---fitting on the screen is important

+for readability, but equally important is facilitating an easy understanding of

+the logical code flow.

+

+There are a few exceptions on both sides of the issue.  Generally comments

+should be limited to 80 characters always.  Some lines of code may exceed the

+120 character length by a large margin, if it makes the code more understandable

+and maintainable.  This is especially true when dealing with code that generates

+output which needs to be lined up.

+

+Regardless of everything else, no lines should exceed 250 characters because

+some editors cannot handle anything larger.

+

+Maximum Display Output Line Length

+----------------------------------

+

+Any code which displays TTY style output, whether on a screen or a terminal,

+should be constructed so the output is readable and wraps properly on an 80

+character wide display.  This primarily applies to the "standard" output from

+various tests and tools as well as syntax output for those tests and tools;

+debug output can violate this rule.

+

+Preprocessor Notation

+---------------------

+

+Don't use preprocessor notation where the # is separated from the keyword by one

+or more white spaces.  For example, don't do:

+

+#ifndef SYMBOL1

+#   define SYMBOL1

+#endif

+

+Instead, do:

+

+#ifndef SYMBOL1

+  #define SYMBOL1

+#endif

+

+Hexadecimal Notation

+--------------------

+

+Use uppercase for any alphabetic hexadecimal digits, and lower case for the

+notational element.  For example:

+

+#define HEXNUM  0x123abd    /* Bad */

+#define HEXNUM  0X123ABD    /* Bad */

+#define HEXNUM  0x123ABD    /* Good */

+

+Hungarian Notation

+------------------

+

+Datalight uses Hungarian notation.  The following type prefixes are used:

+

+Type Prefix | Meaning

+----------- | -------

+c           | char

+uc          | unsigned char

+i           | int

+n           | unsigned int or size_t

+b           | uint8_t

+u           | uint16_t

+ul          | uint32_t

+ull         | uint64_t

+sz          | array of char that will be null-terminated

+f           | bool

+h           | A handle

+fn          | A function (always used with the "p" modifier)

+

+There is no official Hungarian for int8_t, int16_t, int32_t, or int64_t,

+although some code uses unofficial variants (like "ll" for int64_t).

+

+The following modifiers may be used in combination with the type prefixes

+defined above, or in combination with other types:

+

+Modifier | Meaning

+-------- | -------

+a        | An array

+p        | A pointer

+g        | A global variable

+

+Notes:

+

+- There is no standard Hungarian for structure declarations, however the use of

+  the "a" and "p" modifiers is completely appropriate (and expected).

+- For those data types which do not have any standard defined Hungarian prefix,

+  using none is preferable to misusing another prefix which would lead to

+  confusion.

+- The "p" pointer modifier must be used such that a variable which is a pointer

+  to a pointer uses multiple "p" prefixes.  A general rule-of-thumb is that the

+  variable name should have the same number of "p" prefixes as the declaration

+  has asterisks.  This allows pointer expressions to be easily decoded using

+  cancellation.

+

+Variable Scope

+--------------

+

+Declare a variable in the narrowest scope in which it is meaningful.

+Unnecessarily declaring all variables at the beginning of a function, where they

+may be physically far from where they are actually used, makes the code harder

+to maintain.

+

+When multiple blocks of code share a variable, but not its value, declare the

+variable separately for each code block.

+

+For example, if two separate blocks contain loops indexed by a variable ulIndex

+declare it separately in each block rather than declaring it once in a wider

+scope and using it in both places.

+

+Using distinct declarations in the two blocks allows the compiler to check for

+failure to initialize the variable in the second block.  If there is a single

+declaration, the (now meaningless) value left over from the first block can be

+used erroneously in the second block.

+

diff --git a/FreeRTOS-Plus/Source/Reliance-Edge/doc/release_notes.md b/FreeRTOS-Plus/Source/Reliance-Edge/doc/release_notes.md
new file mode 100644
index 0000000..fc94f5c
--- /dev/null
+++ b/FreeRTOS-Plus/Source/Reliance-Edge/doc/release_notes.md
@@ -0,0 +1,61 @@
+# Reliance Edge Release Notes

+

+This file contains a list of updates made to Reliance Edge over the course of

+recent releases and a list of known issues.

+

+## Release History and Changes

+

+### Reliance Edge v1.0, July 2015

+

+#### Common Code Changes

+

+- First release of commercial kit and MISRA C:2012 Design Assurance Package.

+  The commercial kit includes many new tools and tests which were not previously

+  available.

+- Overhauled parsing of command-line parameters to be consistent for all tools

+  and tests.  Command-line tools now use Unix-style short and long options (such

+  as `-H` and `--help`) instead of DOS-style switches (such as `/?`).

+- Renamed all os/\*/include/ostypes.h headers to os/\*/include/redostypes.h, so

+  that all headers use the product prefix.  If you created a port using v0.9,

+  this header needs to be renamed and its header guard (#ifndef OSTYPES_H etc.)

+  should also be updated.

+- Add a new header for OS-specific MISRA C:2012 deviation macros, located at

+  os/\*/include/redosdeviations.h.  If you created a port using v0.9, copy the

+  template from os/stub/include/redosdeviations.h into the include directory.

+- Eliminated support for sector sizes less than 256.  If using a smaller sector

+  size (say for a RAM disk), this must now be emulated in the implementation of

+  the block device OS service.

+- Added RedFseFormat() as an optional FSE API, allowing FSE applications to

+  format the volume at run-time.

+  - This added a new macro to redconf.h: existing redconf.h files from v0.9 must

+    be updated to work with v1.0.  Open redconf.h with the configuration tool,

+    ignore the warning about the missing macro, and save it.

+- Internal restructuring has renamed the macros for the string and memory

+  functions used in redconf.h.  An existing redconf.h file from v0.9 will need

+  to be updated; for a file containing the old names, the new config tool will

+  default to using the (slow) Reliance Edge string/memory functions; to use the

+  C library or custom versions, this will need to be selected in the

+  configuration utility.

+- Fix a bug which would result in an error when attempting to create a name with

+  one or more trailing path separators (such as `red_mkdir("/foo/bar/")`).

+- Fix a bug where an open handle for an inode on one volume would prevent the

+  same inode number from being deleted on a different volume.

+

+#### FreeRTOS Port Changes

+

+- The implementation of the timestamp OS service no longer requires that

+  `configUSE_TIMERS` be set to `1`.

+

+### Reliance Edge v0.9 (Beta), April 2015

+

+First public release.

+

+## Known Issues

+

+### Visual Studio 2005

+

+The Reliance Edge Win32 port (used for the host tools and the Win32 test

+project) cannot be compiled by Visual Studio 2005.  This is not going to be

+fixed since VS2005 is an old toolset.  Newer versions of Visual Studio, starting

+with Visual Studio 2008, work just fine.

+

diff --git a/FreeRTOS-Plus/Source/Reliance-Edge/doc/release_notes.txt b/FreeRTOS-Plus/Source/Reliance-Edge/doc/release_notes.txt
new file mode 100644
index 0000000..e12f1f2
--- /dev/null
+++ b/FreeRTOS-Plus/Source/Reliance-Edge/doc/release_notes.txt
@@ -0,0 +1,71 @@
+

+

+RELIANCE EDGE RELEASE NOTES

+

+

+This file contains a list of updates made to Reliance Edge over the

+course of recent releases and a list of known issues.

+

+

+Release History and Changes

+

+Reliance Edge v1.0, July 2015

+

+Common Code Changes

+

+-   First release of commercial kit and MISRA C:2012 Design

+    Assurance Package. The commercial kit includes many new tools and

+    tests which were not previously available.

+-   Overhauled parsing of command-line parameters to be consistent for

+    all tools and tests. Command-line tools now use Unix-style short and

+    long options (such as -H and --help) instead of DOS-style switches

+    (such as /?).

+-   Renamed all os/*/include/ostypes.h headers to

+    os/*/include/redostypes.h, so that all headers use the

+    product prefix. If you created a port using v0.9, this header needs

+    to be renamed and its header guard (#ifndef OSTYPES_H etc.) should

+    also be updated.

+-   Add a new header for OS-specific MISRA C:2012 deviation macros,

+    located at os/*/include/redosdeviations.h. If you created a port

+    using v0.9, copy the template from os/stub/include/redosdeviations.h

+    into the include directory.

+-   Eliminated support for sector sizes less than 256. If using a

+    smaller sector size (say for a RAM disk), this must now be emulated

+    in the implementation of the block device OS service.

+-   Added RedFseFormat() as an optional FSE API, allowing FSE

+    applications to format the volume at run-time.

+-   This added a new macro to redconf.h: existing redconf.h files from

+    v0.9 must be updated to work with v1.0. Open redconf.h with the

+    configuration tool, ignore the warning about the missing macro, and

+    save it.

+-   Internal restructuring has renamed the macros for the string and

+    memory functions used in redconf.h. An existing redconf.h file from

+    v0.9 will need to be updated; for a file containing the old names,

+    the new config tool will default to using the (slow) Reliance Edge

+    string/memory functions; to use the C library or custom versions,

+    this will need to be selected in the configuration utility.

+-   Fix a bug which would result in an error when attempting to create a

+    name with one or more trailing path separators (such as

+    red_mkdir("/foo/bar/")).

+-   Fix a bug where an open handle for an inode on one volume would

+    prevent the same inode number from being deleted on a

+    different volume.

+

+FreeRTOS Port Changes

+

+-   The implementation of the timestamp OS service no longer requires

+    that configUSE_TIMERS be set to 1.

+

+Reliance Edge v0.9 (Beta), April 2015

+

+First public release.

+

+

+Known Issues

+

+Visual Studio 2005

+

+The Reliance Edge Win32 port (used for the host tools and the Win32 test

+project) cannot be compiled by Visual Studio 2005. This is not going to

+be fixed since VS2005 is an old toolset. Newer versions of Visual

+Studio, starting with Visual Studio 2008, work just fine.

diff --git a/FreeRTOS-Plus/Source/Reliance-Edge/fse/fse.c b/FreeRTOS-Plus/Source/Reliance-Edge/fse/fse.c
new file mode 100644
index 0000000..4ad08ef
--- /dev/null
+++ b/FreeRTOS-Plus/Source/Reliance-Edge/fse/fse.c
@@ -0,0 +1,690 @@
+/*             ----> DO NOT REMOVE THE FOLLOWING NOTICE <----

+

+                   Copyright (c) 2014-2015 Datalight, Inc.

+                       All Rights Reserved Worldwide.

+

+    This program is free software; you can redistribute it and/or modify

+    it under the terms of the GNU General Public License as published by

+    the Free Software Foundation; use version 2 of the License.

+

+    This program is distributed in the hope that it will be useful,

+    but "AS-IS," WITHOUT ANY WARRANTY; without even the implied warranty

+    of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the

+    GNU General Public License for more details.

+

+    You should have received a copy of the GNU General Public License along

+    with this program; if not, write to the Free Software Foundation, Inc.,

+    51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.

+*/

+/*  Businesses and individuals that for commercial or other reasons cannot

+    comply with the terms of the GPLv2 license may obtain a commercial license

+    before incorporating Reliance Edge into proprietary software for

+    distribution in any form.  Visit http://www.datalight.com/reliance-edge for

+    more information.

+*/

+/** @file

+    @brief Implementation of the Reliance Edge FSE API.

+*/

+#include <redfs.h>

+

+#if REDCONF_API_FSE == 1

+

+/** @defgroup red_group_fse The File System Essentials Interface

+    @{

+*/

+

+#include <redvolume.h>

+#include <redcoreapi.h>

+#include <redfse.h>

+

+

+static REDSTATUS FseEnter(uint8_t bVolNum);

+static void FseLeave(void);

+

+

+static bool gfFseInited;    /* Whether driver is initialized. */

+

+

+/** @brief Initialize the Reliance Edge file system driver.

+

+    Prepares the Reliance Edge file system driver to be used.  Must be the first

+    Reliance Edge function to be invoked: no volumes can be mounted until the

+    driver has been initialized.

+

+    If this function is called when the Reliance Edge driver is already

+    initialized, it does nothing and returns success.

+

+    This function is not thread safe: attempting to initialize from multiple

+    threads could leave things in a bad state.

+

+    @return A negated ::REDSTATUS code indicating the operation result.

+

+    @retval 0   Operation was successful.

+*/

+REDSTATUS RedFseInit(void)

+{

+    REDSTATUS ret;

+

+    if(gfFseInited)

+    {

+        ret = 0;

+    }

+    else

+    {

+        ret = RedCoreInit();

+

+        if(ret == 0)

+        {

+            gfFseInited = true;

+        }

+    }

+

+    return ret;

+}

+

+

+/** @brief Uninitialize the Reliance Edge file system driver.

+

+    Tears down the Reliance Edge file system driver.  Cannot be used until all

+    Reliance Edge volumes are unmounted.  A subsequent call to RedFseInit()

+    will initialize the driver again.

+

+    If this function is called when the Reliance Edge driver is already

+    uninitialized, it does nothing and returns success.

+

+    This function is not thread safe: attempting to uninitialize from multiple

+    threads could leave things in a bad state.

+

+    @return A negated ::REDSTATUS code indicating the operation result.

+

+    @retval 0           Operation was successful.

+    @retval -RED_EBUSY  At least one volume is still mounted.

+*/

+REDSTATUS RedFseUninit(void)

+{

+    REDSTATUS ret = 0;

+

+    if(!gfFseInited)

+    {

+        ret = 0;

+    }

+    else

+    {

+        uint8_t bVolNum;

+

+      #if REDCONF_TASK_COUNT > 1U

+        RedOsMutexAcquire();

+      #endif

+

+        for(bVolNum = 0U; bVolNum < REDCONF_VOLUME_COUNT; bVolNum++)

+        {

+            if(gaRedVolume[bVolNum].fMounted)

+            {

+                ret = -RED_EBUSY;

+                break;

+            }

+        }

+

+        if(ret == 0)

+        {

+            gfFseInited = false;

+        }

+

+      #if REDCONF_TASK_COUNT > 1U

+        RedOsMutexRelease();

+      #endif

+

+        if(ret == 0)

+        {

+            ret = RedCoreUninit();

+        }

+    }

+

+    return ret;

+}

+

+

+/** @brief Mount a file system volume.

+

+    Prepares the file system volume to be accessed.  Mount will fail if the

+    volume has never been formatted, or if the on-disk format is inconsistent

+    with the compile-time configuration.

+

+    If the volume is already mounted, this function does nothing and returns

+    success.

+

+    @param bVolNum  The volume number of the volume to be mounted.

+

+    @return A negated ::REDSTATUS code indicating the operation result.

+

+    @retval 0           Operation was successful.

+    @retval -RED_EINVAL @p bVolNum is an invalid volume number; or the driver is

+                        uninitialized.

+    @retval -RED_EIO    Volume not formatted, improperly formatted, or corrupt.

+*/

+REDSTATUS RedFseMount(

+    uint8_t     bVolNum)

+{

+    REDSTATUS   ret;

+

+    ret = FseEnter(bVolNum);

+

+    if(ret == 0)

+    {

+        if(!gpRedVolume->fMounted)

+        {

+            ret = RedCoreVolMount();

+        }

+

+        FseLeave();

+    }

+

+    return ret;

+}

+

+

+/** @brief Unmount a file system volume.

+

+    This function discards the in-memory state for the file system and marks it

+    as unmounted.  Subsequent attempts to access the volume will fail until the

+    volume is mounted again.

+

+    If unmount automatic transaction points are enabled, this function will

+    commit a transaction point prior to unmounting.  If unmount automatic

+    transaction points are disabled, this function will unmount without

+    transacting, effectively discarding the working state.

+

+    Before unmounting, this function will wait for any active file system

+    thread to complete by acquiring the FS mutex.  The volume will be marked as

+    unmounted before the FS mutex is released, so subsequent FS threads will

+    possibly block and then see an error when attempting to access a volume

+    which is unmounting or unmounted.

+

+    If the volume is already unmounted, this function does nothing and returns

+    success.

+

+    @param bVolNum  The volume number of the volume to be unmounted.

+

+    @return A negated ::REDSTATUS code indicating the operation result.

+

+    @retval 0           Operation was successful.

+    @retval -RED_EINVAL @p bVolNum is an invalid volume number; or the driver is

+                        uninitialized.

+    @retval -RED_EIO    I/O error during unmount automatic transaction point.

+*/

+REDSTATUS RedFseUnmount(

+    uint8_t     bVolNum)

+{

+    REDSTATUS   ret;

+

+    ret = FseEnter(bVolNum);

+

+    if(ret == 0)

+    {

+        if(gpRedVolume->fMounted)

+        {

+            ret = RedCoreVolUnmount();

+        }

+

+        FseLeave();

+    }

+

+    return ret;

+}

+

+

+#if (REDCONF_READ_ONLY == 0) && (REDCONF_API_FSE_FORMAT == 1)

+/** @brief Format a file system volume.

+

+    Uses the statically defined volume configuration.  After calling this

+    function, the volume needs to be mounted -- see RedFseMount().

+

+    An error is returned if the volume is mounted.

+

+    @param bVolNum  The volume number of the volume to be formatted.

+

+    @return A negated ::REDSTATUS code indicating the operation result.

+

+    @retval 0           Operation was successful.

+    @retval -RED_EBUSY  The volume is mounted.

+    @retval -RED_EINVAL @p bVolNum is an invalid volume number; or the driver is

+                        uninitialized.

+    @retval -RED_EIO    I/O error formatting the volume.

+*/

+REDSTATUS RedFseFormat(

+    uint8_t     bVolNum)

+{

+    REDSTATUS   ret;

+

+    ret = FseEnter(bVolNum);

+

+    if(ret == 0)

+    {

+        ret = RedCoreVolFormat();

+

+        FseLeave();

+    }

+

+    return ret;

+}

+#endif

+

+

+/** @brief Read from a file.

+

+    Data which has not yet been written, but which is before the end-of-file

+    (sparse data), shall read as zeroes.  A short read -- where the number of

+    bytes read is less than requested -- indicates that the requested read was

+    partially or, if zero bytes were read, entirely beyond the end-of-file.

+

+    If @p ullFileOffset is at or beyond the maximum file size, it is treated

+    like any other read entirely beyond the end-of-file: no data is read and

+    zero is returned.

+

+    @param bVolNum          The volume number of the file to read.

+    @param ulFileNum        The file number of the file to read.

+    @param ullFileOffset    The file offset to read from.

+    @param ulLength         The number of bytes to read.

+    @param pBuffer          The buffer to populate with the data read.  Must be

+                            at least ulLength bytes in size.

+

+    @return The number of bytes read (nonnegative) or a negated ::REDSTATUS

+            code indicating the operation result (negative).

+

+    @retval >=0         The number of bytes read from the file.

+    @retval -RED_EBADF  @p ulFileNum is not a valid file number.

+    @retval -RED_EINVAL @p bVolNum is an invalid volume number or not mounted;

+                        or @p pBuffer is `NULL`; or @p ulLength exceeds

+                        INT32_MAX and cannot be returned properly.

+    @retval -RED_EIO    A disk I/O error occurred.

+*/

+int32_t RedFseRead(

+    uint8_t     bVolNum,

+    uint32_t    ulFileNum,

+    uint64_t    ullFileOffset,

+    uint32_t    ulLength,

+    void       *pBuffer)

+{

+    int32_t     ret;

+

+    if(ulLength > (uint32_t)INT32_MAX)

+    {

+        ret = -RED_EINVAL;

+    }

+    else

+    {

+        ret = FseEnter(bVolNum);

+    }

+

+    if(ret == 0)

+    {

+        uint32_t ulReadLen = ulLength;

+

+        ret = RedCoreFileRead(ulFileNum, ullFileOffset, &ulReadLen, pBuffer);

+

+        FseLeave();

+

+        if(ret == 0)

+        {

+            ret = (int32_t)ulReadLen;

+        }

+    }

+

+    return ret;

+}

+

+

+#if REDCONF_READ_ONLY == 0

+/** @brief Write to a file.

+

+    If the write extends beyond the end-of-file, the file size will be

+    increased.

+

+    A short write -- where the number of bytes written is less than requested

+    -- indicates either that the file system ran out of space but was still

+    able to write some of the request; or that the request would have caused

+    the file to exceed the maximum file size, but some of the data could be

+    written prior to the file size limit.

+

+    If an error is returned (negative return), either none of the data was

+    written or a critical error occurred (like an I/O error) and the file

+    system volume will be read-only.

+

+    @param bVolNum          The volume number of the file to write.

+    @param ulFileNum        The file number of the file to write.

+    @param ullFileOffset    The file offset to write at.

+    @param ulLength         The number of bytes to write.

+    @param pBuffer          The buffer containing the data to be written.  Must

+                            be at least ulLength bytes in size.

+

+    @return The number of bytes written (nonnegative) or a negated ::REDSTATUS

+            code indicating the operation result (negative).

+

+    @retval >0          The number of bytes written to the file.

+    @retval -RED_EBADF  @p ulFileNum is not a valid file number.

+    @retval -RED_EFBIG  No data can be written to the given file offset since

+                        the resulting file size would exceed the maximum file

+                        size.

+    @retval -RED_EINVAL @p bVolNum is an invalid volume number or not mounted;

+                        or @p pBuffer is `NULL`; or @p ulLength exceeds

+                        INT32_MAX and cannot be returned properly.

+    @retval -RED_EIO    A disk I/O error occurred.

+    @retval -RED_ENOSPC No data can be written because there is insufficient

+                        free space.

+    @retval -RED_EROFS  The file system volume is read-only.

+*/

+int32_t RedFseWrite(

+    uint8_t     bVolNum,

+    uint32_t    ulFileNum,

+    uint64_t    ullFileOffset,

+    uint32_t    ulLength,

+    const void *pBuffer)

+{

+    int32_t     ret;

+

+    if(ulLength > (uint32_t)INT32_MAX)

+    {

+        ret = -RED_EINVAL;

+    }

+    else

+    {

+        ret = FseEnter(bVolNum);

+    }

+

+    if(ret == 0)

+    {

+        uint32_t ulWriteLen = ulLength;

+

+        ret = RedCoreFileWrite(ulFileNum, ullFileOffset, &ulWriteLen, pBuffer);

+

+        FseLeave();

+

+        if(ret == 0)

+        {

+            ret = (int32_t)ulWriteLen;

+        }

+    }

+

+    return ret;

+}

+#endif

+

+

+#if (REDCONF_READ_ONLY == 0) && (REDCONF_API_FSE_TRUNCATE == 1)

+/** @brief Truncate a file (set the file size).

+

+    Allows the file size to be increased, decreased, or to remain the same.  If

+    the file size is increased, the new area is sparse (will read as zeroes).

+    If the file size is decreased, the data beyond the new end-of-file will

+    return to free space once it is no longer part of the committed state

+    (either immediately or after the next transaction point).

+

+    This function can fail when the disk is full if @p ullNewFileSize is

+    non-zero.  If decreasing the file size, this can be fixed by transacting and

+    trying again: Reliance Edge guarantees that it is possible to perform a

+    truncate of at least one file that decreases the file size after a

+    transaction point.  If disk full transactions are enabled, this will happen

+    automatically.

+

+    @param bVolNum          The volume number of the file to truncate.

+    @param ulFileNum        The file number of the file to truncate.

+    @param ullNewFileSize   The new file size, in bytes.

+

+    @return A negated ::REDSTATUS code indicating the operation result.

+

+    @retval 0           Operation was successful.

+    @retval -RED_EBADF  @p ulFileNum is not a valid file number.

+    @retval -RED_EFBIG  @p ullNewFileSize exceeds the maximum file size.

+    @retval -RED_EINVAL @p bVolNum is an invalid volume number or not mounted.

+    @retval -RED_EIO    A disk I/O error occurred.

+    @retval -RED_ENOSPC Insufficient free space to perform the truncate.

+    @retval -RED_EROFS  The file system volume is read-only.

+*/

+REDSTATUS RedFseTruncate(

+    uint8_t     bVolNum,

+    uint32_t    ulFileNum,

+    uint64_t    ullNewFileSize)

+{

+    REDSTATUS   ret;

+

+    ret = FseEnter(bVolNum);

+

+    if(ret == 0)

+    {

+        ret = RedCoreFileTruncate(ulFileNum, ullNewFileSize);

+

+        FseLeave();

+    }

+

+    return ret;

+}

+#endif

+

+

+/** @brief Retrieve the size of a file.

+

+    @param bVolNum      The volume number of the file whose size is being read.

+    @param ulFileNum    The file number of the file whose size is being read.

+

+    @return The size of the file (nonnegative) or a negated ::REDSTATUS code

+            indicating the operation result (negative).

+

+    @retval >=0         The size of the file.

+    @retval -RED_EBADF  @p ulFileNum is not a valid file number.

+    @retval -RED_EINVAL @p bVolNum is an invalid volume number or not mounted.

+    @retval -RED_EIO    A disk I/O error occurred.

+*/

+int64_t RedFseSizeGet(

+    uint8_t     bVolNum,

+    uint32_t    ulFileNum)

+{

+    int64_t     ret;

+

+    ret = FseEnter(bVolNum);

+

+    if(ret == 0)

+    {

+        uint64_t ullSize;

+

+        ret = RedCoreFileSizeGet(ulFileNum, &ullSize);

+

+        FseLeave();

+

+        if(ret == 0)

+        {

+            /*  Unless there is an on-disk format change, the maximum file size

+                is guaranteed to be less than INT64_MAX, and so it can be safely

+                returned in an int64_t.

+            */

+            REDASSERT(ullSize < (uint64_t)INT64_MAX);

+

+            ret = (int64_t)ullSize;

+        }

+    }

+

+    return ret;

+}

+

+

+#if (REDCONF_READ_ONLY == 0) && (REDCONF_API_FSE_TRANSMASKSET == 1)

+/** @brief Update the transaction mask.

+

+    The following events are available:

+

+    - #RED_TRANSACT_UMOUNT

+    - #RED_TRANSACT_WRITE

+    - #RED_TRANSACT_TRUNCATE

+    - #RED_TRANSACT_VOLFULL

+

+    The #RED_TRANSACT_MANUAL macro (by itself) may be used to disable all

+    automatic transaction events.  The #RED_TRANSACT_MASK macro is a bitmask of

+    all transaction flags, excluding those representing excluded functionality.

+

+    Attempting to enable events for excluded functionality will result in an

+    error.

+

+    @param bVolNum      The volume number of the volume whose transaction mask

+                        is being changed.

+    @param ulEventMask  A bitwise-OR'd mask of automatic transaction events to

+                        be set as the current transaction mode.

+

+    @return A negated ::REDSTATUS code indicating the operation result.

+

+    @retval 0           Operation was successful.

+    @retval -RED_EINVAL @p bVolNum is an invalid volume number or not mounted;

+                        or @p ulEventMask contains invalid bits.

+    @retval -RED_EROFS  The file system volume is read-only.

+*/

+REDSTATUS RedFseTransMaskSet(

+    uint8_t     bVolNum,

+    uint32_t    ulEventMask)

+{

+    REDSTATUS   ret;

+

+    ret = FseEnter(bVolNum);

+

+    if(ret == 0)

+    {

+        ret = RedCoreTransMaskSet(ulEventMask);

+

+        FseLeave();

+    }

+

+    return ret;

+}

+#endif

+

+

+#if REDCONF_API_FSE_TRANSMASKGET == 1

+/** @brief Read the transaction mask.

+

+    If the volume is read-only, the returned event mask is always zero.

+

+    @param bVolNum      The volume number of the volume whose transaction mask

+                        is being retrieved.

+    @param pulEventMask Populated with a bitwise-OR'd mask of automatic

+                        transaction events which represent the current

+                        transaction mode for the volume.

+

+    @return A negated ::REDSTATUS code indicating the operation result.

+

+    @retval 0           Operation was successful.

+    @retval -RED_EINVAL @p bVolNum is an invalid volume number or not mounted;

+                        or @p pulEventMask is `NULL`.

+*/

+REDSTATUS RedFseTransMaskGet(

+    uint8_t     bVolNum,

+    uint32_t   *pulEventMask)

+{

+    REDSTATUS   ret;

+

+    ret = FseEnter(bVolNum);

+

+    if(ret == 0)

+    {

+        ret = RedCoreTransMaskGet(pulEventMask);

+

+        FseLeave();

+    }

+

+    return ret;

+}

+#endif

+

+

+#if REDCONF_READ_ONLY == 0

+/** @brief Commit a transaction point.

+

+    Reliance Edge is a transactional file system.  All modifications, of both

+    metadata and filedata, are initially working state.  A transaction point

+    is a process whereby the working state atomically becomes the committed

+    state, replacing the previous committed state.  Whenever Reliance Edge is

+    mounted, including after power loss, the state of the file system after

+    mount is the most recent committed state.  Nothing from the committed

+    state is ever missing, and nothing from the working state is ever included.

+

+    @param bVolNum  The volume number of the volume to transact.

+

+    @return A negated ::REDSTATUS code indicating the operation result.

+

+    @retval 0           Operation was successful.

+    @retval -RED_EINVAL @p bVolNum is an invalid volume number or not mounted.

+    @retval -RED_EIO    A disk I/O error occurred.

+    @retval -RED_EROFS  The file system volume is read-only.

+*/

+REDSTATUS RedFseTransact(

+    uint8_t     bVolNum)

+{

+    REDSTATUS   ret;

+

+    ret = FseEnter(bVolNum);

+

+    if(ret == 0)

+    {

+        ret = RedCoreVolTransact();

+

+        FseLeave();

+    }

+

+    return ret;

+}

+#endif

+

+/** @} */

+

+/** @brief Enter the file system driver.

+

+    @param bVolNum  The volume to be accessed.

+

+    @return A negated ::REDSTATUS code indicating the operation result.

+

+    @retval 0           Operation was successful.

+    @retval -RED_EINVAL The file system driver is uninitialized; or @p bVolNum

+                        is not a valid volume number.

+*/

+static REDSTATUS FseEnter(

+    uint8_t   bVolNum)

+{

+    REDSTATUS ret;

+

+    if(gfFseInited)

+    {

+      #if REDCONF_TASK_COUNT > 1U

+        RedOsMutexAcquire();

+      #endif

+

+        /*  This also serves to range-check the volume number (even in single

+            volume configurations).

+        */

+        ret = RedCoreVolSetCurrent(bVolNum);

+

+      #if REDCONF_TASK_COUNT > 1U

+        if(ret != 0)

+        {

+            RedOsMutexRelease();

+        }

+      #endif

+    }

+    else

+    {

+        ret = -RED_EINVAL;

+    }

+

+    return ret;

+}

+

+

+/** @brief Leave the file system driver.

+*/

+static void FseLeave(void)

+{

+    REDASSERT(gfFseInited);

+

+  #if REDCONF_TASK_COUNT > 1U

+    RedOsMutexRelease();

+  #endif

+}

+

+

+#endif /* REDCONF_API_FSE == 1 */

+

diff --git a/FreeRTOS-Plus/Source/Reliance-Edge/include/redapimacs.h b/FreeRTOS-Plus/Source/Reliance-Edge/include/redapimacs.h
new file mode 100644
index 0000000..13de409
--- /dev/null
+++ b/FreeRTOS-Plus/Source/Reliance-Edge/include/redapimacs.h
@@ -0,0 +1,112 @@
+/*             ----> DO NOT REMOVE THE FOLLOWING NOTICE <----

+

+                   Copyright (c) 2014-2015 Datalight, Inc.

+                       All Rights Reserved Worldwide.

+

+    This program is free software; you can redistribute it and/or modify

+    it under the terms of the GNU General Public License as published by

+    the Free Software Foundation; use version 2 of the License.

+

+    This program is distributed in the hope that it will be useful,

+    but "AS-IS," WITHOUT ANY WARRANTY; without even the implied warranty

+    of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the

+    GNU General Public License for more details.

+

+    You should have received a copy of the GNU General Public License along

+    with this program; if not, write to the Free Software Foundation, Inc.,

+    51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.

+*/

+/*  Businesses and individuals that for commercial or other reasons cannot

+    comply with the terms of the GPLv2 license may obtain a commercial license

+    before incorporating Reliance Edge into proprietary software for

+    distribution in any form.  Visit http://www.datalight.com/reliance-edge for

+    more information.

+*/

+/** @file

+    @brief Defines macros used to interact with the Reliance Edge API.

+*/

+#ifndef REDAPIMACS_H

+#define REDAPIMACS_H

+

+

+/** Clear all events: manual transactions only. */

+#define RED_TRANSACT_MANUAL     0x00000000U

+

+/** Transact prior to unmounting in red_umount() or RedFseUnmount(). */

+#define RED_TRANSACT_UMOUNT     0x00000001U

+

+/** Transact after a successful red_open() which created a file. */

+#define RED_TRANSACT_CREAT      0x00000002U

+

+/** Transact after a successful red_unlink() or red_rmdir(). */

+#define RED_TRANSACT_UNLINK     0x00000004U

+

+/** Transact after a successful red_mkdir(). */

+#define RED_TRANSACT_MKDIR      0x00000008U

+

+/** Transact after a successful red_rename(). */

+#define RED_TRANSACT_RENAME     0x00000010U

+

+/** Transact after a successful red_link(). */

+#define RED_TRANSACT_LINK       0x00000020U

+

+/** Transact after a successful red_close(). */

+#define RED_TRANSACT_CLOSE      0x00000040U

+

+/** Transact after a successful red_write() or RedFseWrite(). */

+#define RED_TRANSACT_WRITE      0x00000080U

+

+/** Transact after a successful red_fsync(). */

+#define RED_TRANSACT_FSYNC      0x00000100U

+

+/** Transact after a successful red_ftruncate(), RedFseTruncate(), or red_open() with RED_O_TRUNC that actually truncates. */

+#define RED_TRANSACT_TRUNCATE   0x00000200U

+

+/** Transact to free space in disk full situations. */

+#define RED_TRANSACT_VOLFULL    0x00000400U

+

+#if REDCONF_READ_ONLY == 1

+

+/** Mask of all supported automatic transaction events. */

+#define RED_TRANSACT_MASK       0U

+

+#elif REDCONF_API_POSIX == 1

+

+/** @brief Mask of all supported automatic transaction events.

+*/

+#define RED_TRANSACT_MASK                                                   \

+(                                                                           \

+    RED_TRANSACT_UMOUNT                                                 |   \

+    RED_TRANSACT_CREAT                                                  |   \

+    ((REDCONF_API_POSIX_UNLINK    == 1) ? RED_TRANSACT_UNLINK   : 0U)   |   \

+    ((REDCONF_API_POSIX_MKDIR     == 1) ? RED_TRANSACT_MKDIR    : 0U)   |   \

+    ((REDCONF_API_POSIX_RENAME    == 1) ? RED_TRANSACT_RENAME   : 0U)   |   \

+    ((REDCONF_API_POSIX_LINK      == 1) ? RED_TRANSACT_LINK     : 0U)   |   \

+    RED_TRANSACT_CLOSE                                                  |   \

+    RED_TRANSACT_WRITE                                                  |   \

+    RED_TRANSACT_FSYNC                                                  |   \

+    ((REDCONF_API_POSIX_FTRUNCATE == 1) ? RED_TRANSACT_TRUNCATE : 0U)   |   \

+    RED_TRANSACT_VOLFULL                                                    \

+)

+

+#else /* REDCONF_API_FSE == 1 */

+

+/** @brief Mask of all supported automatic transaction events.

+*/

+#define RED_TRANSACT_MASK                                               \

+(                                                                       \

+    RED_TRANSACT_UMOUNT                                             |   \

+    RED_TRANSACT_WRITE                                              |   \

+    ((REDCONF_API_FSE_TRUNCATE == 1) ? RED_TRANSACT_TRUNCATE : 0U)  |   \

+    RED_TRANSACT_VOLFULL                                                \

+)

+

+#endif /* REDCONF_READ_ONLY */

+

+#if (REDCONF_TRANSACT_DEFAULT & RED_TRANSACT_MASK) != REDCONF_TRANSACT_DEFAULT

+#error "Configuration error: invalid value of REDCONF_TRANSACT_DEFAULT"

+#endif

+

+

+#endif

+

diff --git a/FreeRTOS-Plus/Source/Reliance-Edge/include/redconfigchk.h b/FreeRTOS-Plus/Source/Reliance-Edge/include/redconfigchk.h
new file mode 100644
index 0000000..a1d86fd
--- /dev/null
+++ b/FreeRTOS-Plus/Source/Reliance-Edge/include/redconfigchk.h
@@ -0,0 +1,317 @@
+/*             ----> DO NOT REMOVE THE FOLLOWING NOTICE <----

+

+                   Copyright (c) 2014-2015 Datalight, Inc.

+                       All Rights Reserved Worldwide.

+

+    This program is free software; you can redistribute it and/or modify

+    it under the terms of the GNU General Public License as published by

+    the Free Software Foundation; use version 2 of the License.

+

+    This program is distributed in the hope that it will be useful,

+    but "AS-IS," WITHOUT ANY WARRANTY; without even the implied warranty

+    of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the

+    GNU General Public License for more details.

+

+    You should have received a copy of the GNU General Public License along

+    with this program; if not, write to the Free Software Foundation, Inc.,

+    51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.

+*/

+/*  Businesses and individuals that for commercial or other reasons cannot

+    comply with the terms of the GPLv2 license may obtain a commercial license

+    before incorporating Reliance Edge into proprietary software for

+    distribution in any form.  Visit http://www.datalight.com/reliance-edge for

+    more information.

+*/

+/** @file

+    @brief Compile-time validity checks for the REDCONF macros.

+*/

+#ifndef REDCONFIGCHK_H

+#define REDCONFIGCHK_H

+

+#ifndef REDCONF_READ_ONLY

+  #error "Configuration error: REDCONF_READ_ONLY must be defined."

+#endif

+#ifndef REDCONF_API_POSIX

+  #error "Configuration error: REDCONF_API_POSIX must be defined."

+#endif

+#ifndef REDCONF_API_FSE

+  #error "Configuration error: REDCONF_API_FSE must be defined."

+#endif

+

+#if REDCONF_API_POSIX == 1

+  #ifndef REDCONF_API_POSIX_FORMAT

+    #error "Configuration error: REDCONF_API_POSIX_FORMAT must be defined."

+  #endif

+  #ifndef REDCONF_API_POSIX_UNLINK

+    #error "Configuration error: REDCONF_API_POSIX_UNLINK must be defined."

+  #endif

+  #ifndef REDCONF_API_POSIX_MKDIR

+    #error "Configuration error: REDCONF_API_POSIX_MKDIR must be defined."

+  #endif

+  #ifndef REDCONF_API_POSIX_RMDIR

+    #error "Configuration error: REDCONF_API_POSIX_RMDIR must be defined."

+  #endif

+  #ifndef REDCONF_API_POSIX_RENAME

+    #error "Configuration error: REDCONF_API_POSIX_RENAME must be defined."

+  #endif

+  #ifndef REDCONF_API_POSIX_LINK

+    #error "Configuration error: REDCONF_API_POSIX_LINK must be defined."

+  #endif

+  #ifndef REDCONF_API_POSIX_FTRUNCATE

+    #error "Configuration error: REDCONF_API_POSIX_FTRUNCATE must be defined."

+  #endif

+  #ifndef REDCONF_API_POSIX_READDIR

+    #error "Configuration error: REDCONF_API_POSIX_READDIR must be defined."

+  #endif

+  #ifndef REDCONF_NAME_MAX

+    #error "Configuration error: REDCONF_NAME_MAX must be defined."

+  #endif

+  #ifndef REDCONF_PATH_SEPARATOR

+    #error "Configuration error: REDCONF_PATH_SEPARATOR must be defined."

+  #endif

+  #ifndef REDCONF_RENAME_ATOMIC

+    #error "Configuration error: REDCONF_RENAME_ATOMIC must be defined."

+  #endif

+  #ifndef REDCONF_HANDLE_COUNT

+    #error "Configuration error: REDCONF_HANDLE_COUNT must be defined."

+  #endif

+#endif

+#if REDCONF_API_FSE == 1

+  #ifndef REDCONF_API_FSE_FORMAT

+    #error "Configuration error: REDCONF_API_FSE_FORMAT must be defined."

+  #endif

+  #ifndef REDCONF_API_FSE_TRUNCATE

+    #error "Configuration error: REDCONF_API_FSE_TRUNCATE must be defined."

+  #endif

+  #ifndef REDCONF_API_FSE_TRANSMASKSET

+    #error "Configuration error: REDCONF_API_FSE_TRANSMASKSET must be defined."

+  #endif

+  #ifndef REDCONF_API_FSE_TRANSMASKGET

+    #error "Configuration error: REDCONF_API_FSE_TRANSMASKGET must be defined."

+  #endif

+#endif

+

+#ifndef REDCONF_TASK_COUNT

+  #error "Configuration error: REDCONF_TASK_COUNT must be defined."

+#endif

+#ifndef REDCONF_ENDIAN_BIG

+  #error "Configuration error: REDCONF_ENDIAN_BIG must be defined."

+#endif

+#ifndef REDCONF_ALIGNMENT_SIZE

+  #error "Configuration error: REDCONF_ALIGNMENT_SIZE must be defined."

+#endif

+#ifndef REDCONF_CRC_ALGORITHM

+  #error "Configuration error: REDCONF_CRC_ALGORITHM must be defined."

+#endif

+#ifndef REDCONF_INODE_TIMESTAMPS

+  #error "Configuration error: REDCONF_INODE_TIMESTAMPS must be defined."

+#endif

+#ifndef REDCONF_ATIME

+  #error "Configuration error: REDCONF_ATIME must be defined."

+#endif

+#ifndef REDCONF_DIRECT_POINTERS

+  #error "Configuration error: REDCONF_DIRECT_POINTERS must be defined."

+#endif

+#ifndef REDCONF_INDIRECT_POINTERS

+  #error "Configuration error: REDCONF_INDIRECT_POINTERS must be defined."

+#endif

+#ifndef REDCONF_INODE_BLOCKS

+  #error "Configuration error: REDCONF_INODE_BLOCKS must be defined."

+#endif

+#ifndef REDCONF_IMAP_EXTERNAL

+  #error "Configuration error: REDCONF_IMAP_EXTERNAL must be defined."

+#endif

+#ifndef REDCONF_IMAP_INLINE

+  #error "Configuration error: REDCONF_IMAP_INLINE must be defined."

+#endif

+#ifndef REDCONF_OUTPUT

+  #error "Configuration error: REDCONF_OUTPUT must be defined."

+#endif

+#ifndef REDCONF_ASSERTS

+  #error "Configuration error: REDCONF_ASSERTS must be defined."

+#endif

+#ifndef REDCONF_TRANSACT_DEFAULT

+  #error "Configuration error: REDCONF_TRANSACT_DEFAULT must be defined."

+#endif

+#ifndef REDCONF_BUFFER_COUNT

+  #error "Configuration error: REDCONF_BUFFER_COUNT must be defined."

+#endif

+#ifndef REDCONF_BLOCK_SIZE

+  #error "Configuration error: REDCONF_BLOCK_SIZE must be defined."

+#endif

+#ifndef REDCONF_VOLUME_COUNT

+  #error "Configuration error: REDCONF_VOLUME_COUNT must be defined."

+#endif

+#ifndef REDCONF_IMAGE_BUILDER

+  #error "Configuration error: REDCONF_IMAGE_BUILDER must be defined."

+#endif

+#ifndef REDCONF_CHECKER

+  #error "Configuration error: REDCONF_CHECKER must be defined."

+#endif

+

+

+#if (REDCONF_READ_ONLY != 0) && (REDCONF_READ_ONLY != 1)

+  #error "Configuration error: REDCONF_READ_ONLY must be either 0 or 1"

+#endif

+

+#if (REDCONF_API_POSIX != 0) && (REDCONF_API_POSIX != 1)

+  #error "Configuration error: REDCONF_API_POSIX must be either 0 or 1."

+#endif

+#if (REDCONF_API_FSE != 0) && (REDCONF_API_FSE != 1)

+  #error "Configuration error: REDCONF_API_FSE must be either 0 or 1."

+#endif

+

+#if (REDCONF_API_FSE == 0) && (REDCONF_API_POSIX == 0)

+  #error "Configuration error: either REDCONF_API_FSE or REDCONF_API_POSIX must be set to 1."

+#endif

+

+#if REDCONF_API_POSIX == 1

+  #if REDCONF_API_FSE != 0

+    #error "Configuration error: REDCONF_API_FSE must be 0 if REDCONF_API_POSIX is 1"

+  #endif

+

+  #if (REDCONF_API_POSIX_FORMAT != 0) && (REDCONF_API_POSIX_FORMAT != 1)

+    #error "Configuration error: REDCONF_API_POSIX_FORMAT must be either 0 or 1."

+  #endif

+

+  #if (REDCONF_API_POSIX_UNLINK != 0) && (REDCONF_API_POSIX_UNLINK != 1)

+    #error "Configuration error: REDCONF_API_POSIX_UNLINK must be either 0 or 1."

+  #endif

+

+  #if (REDCONF_API_POSIX_MKDIR != 0) && (REDCONF_API_POSIX_MKDIR != 1)

+    #error "Configuration error: REDCONF_API_POSIX_MKDIR must be either 0 or 1."

+  #endif

+

+  #if (REDCONF_API_POSIX_RMDIR != 0) && (REDCONF_API_POSIX_RMDIR != 1)

+    #error "Configuration error: REDCONF_API_POSIX_RMDIR must be either 0 or 1."

+  #endif

+

+  #if (REDCONF_API_POSIX_RENAME != 0) && (REDCONF_API_POSIX_RENAME != 1)

+    #error "Configuration error: REDCONF_API_POSIX_RENAME must be either 0 or 1."

+  #endif

+

+  #if (REDCONF_API_POSIX_LINK != 0) && (REDCONF_API_POSIX_LINK != 1)

+    #error "Configuration error: REDCONF_API_POSIX_LINK must be either 0 or 1."

+  #endif

+

+  #if (REDCONF_API_POSIX_FTRUNCATE != 0) && (REDCONF_API_POSIX_FTRUNCATE != 1)

+    #error "Configuration error: REDCONF_API_POSIX_FTRUNCATE must be either 0 or 1."

+  #endif

+

+  #if (REDCONF_API_POSIX_READDIR != 0) && (REDCONF_API_POSIX_READDIR != 1)

+    #error "Configuration error: REDCONF_API_POSIX_READDIR must be either 0 or 1."

+  #endif

+

+  #if (REDCONF_NAME_MAX < 1U) || (REDCONF_NAME_MAX > (REDCONF_BLOCK_SIZE - 4U))

+    #error "Configuration error: invalid value of REDCONF_NAME_MAX"

+  #endif

+

+  #if (REDCONF_PATH_SEPARATOR < 1) || (REDCONF_PATH_SEPARATOR > 127)

+    #error "Configuration error: invalid value of REDCONF_PATH_SEPARATOR"

+  #endif

+

+  #if (REDCONF_RENAME_ATOMIC != 0) && (REDCONF_RENAME_ATOMIC != 1)

+    #error "Configuration error: REDCONF_RENAME_ATOMIC must be either 0 or 1."

+  #endif

+

+  #if (REDCONF_HANDLE_COUNT < 1U) || (REDCONF_HANDLE_COUNT > 4096U)

+    #error "Configuration error: invalid value of REDCONF_HANDLE_COUNT"

+  #endif

+#endif

+#if REDCONF_API_FSE == 1

+  #if (REDCONF_API_FSE_FORMAT != 0) && (REDCONF_API_FSE_FORMAT != 1)

+    #error "Configuration error: REDCONF_API_FSE_FORMAT must be either 0 or 1."

+  #endif

+

+  #if (REDCONF_API_FSE_TRUNCATE != 0) && (REDCONF_API_FSE_TRUNCATE != 1)

+    #error "Configuration error: REDCONF_API_FSE_TRUNCATE must be either 0 or 1."

+  #endif

+

+  #if (REDCONF_API_FSE_TRANSMASKSET != 0) && (REDCONF_API_FSE_TRANSMASKSET != 1)

+    #error "Configuration error: REDCONF_API_FSE_TRANSMASKSET must be either 0 or 1."

+  #endif

+

+  #if (REDCONF_API_FSE_TRANSMASKGET != 0) && (REDCONF_API_FSE_TRANSMASKGET != 1)

+    #error "Configuration error: REDCONF_API_FSE_TRANSMASKGET must be either 0 or 1."

+  #endif

+#endif

+

+#if REDCONF_TASK_COUNT < 1U

+  #error "Configuration error: invalid value of REDCONF_TASK_COUNT"

+#endif

+

+#if (REDCONF_ENDIAN_BIG != 0) && (REDCONF_ENDIAN_BIG != 1)

+  #error "Configuration error: REDCONF_ENDIAN_BIG must be either 0 or 1."

+#endif

+

+#if (REDCONF_ALIGNMENT_SIZE != 1U) && (REDCONF_ALIGNMENT_SIZE != 2U) && (REDCONF_ALIGNMENT_SIZE != 4U) && (REDCONF_ALIGNMENT_SIZE != 8U)

+  #error "Configuration error: invalid value REDCONF_ALIGNMENT_SIZE"

+#endif

+

+/*  REDCONF_CRC_ALGORITHM checked in crc.c

+*/

+

+#if (REDCONF_INODE_TIMESTAMPS != 0) && (REDCONF_INODE_TIMESTAMPS != 1)

+  #error "Configuration error: REDCONF_INODE_TIMESTAMPS must be either 0 or 1."

+#endif

+

+#if (REDCONF_ATIME != 0) && (REDCONF_ATIME != 1)

+  #error "Configuration error: REDCONF_ATIME must be either 0 or 1."

+#endif

+

+#if (REDCONF_INODE_TIMESTAMPS == 0) && (REDCONF_ATIME == 1)

+  #error "Configuration error: REDCONF_ATIME must be 0 when REDCONF_INODE_TIMESTAMPS is 0."

+#endif

+

+/*  REDCONF_DIRECT_POINTERS and REDCONF_INDIRECT_POINTERS checked in rednodes.h

+*/

+

+#if (REDCONF_INODE_BLOCKS != 0) && (REDCONF_INODE_BLOCKS != 1)

+  #error "Configuration error: REDCONF_INODE_BLOCKS must be either 0 or 1."

+#endif

+

+/*  Further validity checking of imap specs done in RelCoreInit()

+*/

+#if (REDCONF_IMAP_EXTERNAL != 0) && (REDCONF_IMAP_EXTERNAL != 1)

+  #error "Configuration error: REDCONF_IMAP_EXTERNAL must be either 0 or 1."

+#endif

+#if (REDCONF_IMAP_INLINE != 0) && (REDCONF_IMAP_INLINE != 1)

+  #error "Configuration error: REDCONF_IMAP_INLINE must be either 0 or 1."

+#endif

+#if (REDCONF_IMAP_INLINE == 0) && (REDCONF_IMAP_EXTERNAL == 0)

+  #error "Configuration error: At least one of REDCONF_IMAP_INLINE and REDCONF_IMAP_EXTERNAL must be set"

+#endif

+

+#if (REDCONF_OUTPUT != 0) && (REDCONF_OUTPUT != 1)

+  #error "Configuration error: REDCONF_OUTPUT must be either 0 or 1."

+#endif

+

+#if (REDCONF_ASSERTS != 0) && (REDCONF_ASSERTS != 1)

+  #error "Configuration error: REDCONF_ASSERTS must be either 0 or 1."

+#endif

+

+/*  REDCONF_BLOCK_SIZE checked in redmacs.h

+*/

+

+#if (REDCONF_VOLUME_COUNT < 1U) || (REDCONF_VOLUME_COUNT > 255U)

+  #error "REDCONF_VOLUME_COUNT must be an integer between 1 and 255"

+#endif

+

+/*  REDCONF_BUFFER_COUNT lower limit checked in buffer.c

+*/

+#if REDCONF_BUFFER_COUNT > 255U

+  #error "REDCONF_BUFFER_COUNT cannot be greater than 255"

+#endif

+

+#if (REDCONF_IMAGE_BUILDER != 0) && (REDCONF_IMAGE_BUILDER != 1)

+  #error "Configuration error: REDCONF_IMAGE_BUILDER must be either 0 or 1."

+#endif

+

+#if (REDCONF_CHECKER != 0) && (REDCONF_CHECKER != 1)

+  #error "Configuration error: REDCONF_CHECKER must be either 0 or 1."

+#endif

+

+

+#endif

+

+

diff --git a/FreeRTOS-Plus/Source/Reliance-Edge/include/redcoreapi.h b/FreeRTOS-Plus/Source/Reliance-Edge/include/redcoreapi.h
new file mode 100644
index 0000000..20c6691
--- /dev/null
+++ b/FreeRTOS-Plus/Source/Reliance-Edge/include/redcoreapi.h
@@ -0,0 +1,97 @@
+/*             ----> DO NOT REMOVE THE FOLLOWING NOTICE <----

+

+                   Copyright (c) 2014-2015 Datalight, Inc.

+                       All Rights Reserved Worldwide.

+

+    This program is free software; you can redistribute it and/or modify

+    it under the terms of the GNU General Public License as published by

+    the Free Software Foundation; use version 2 of the License.

+

+    This program is distributed in the hope that it will be useful,

+    but "AS-IS," WITHOUT ANY WARRANTY; without even the implied warranty

+    of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the

+    GNU General Public License for more details.

+

+    You should have received a copy of the GNU General Public License along

+    with this program; if not, write to the Free Software Foundation, Inc.,

+    51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.

+*/

+/*  Businesses and individuals that for commercial or other reasons cannot

+    comply with the terms of the GPLv2 license may obtain a commercial license

+    before incorporating Reliance Edge into proprietary software for

+    distribution in any form.  Visit http://www.datalight.com/reliance-edge for

+    more information.

+*/

+/** @file

+*/

+#ifndef REDCOREAPI_H

+#define REDCOREAPI_H

+

+

+#include <redstat.h>

+

+

+REDSTATUS RedCoreInit(void);

+REDSTATUS RedCoreUninit(void);

+

+REDSTATUS RedCoreVolSetCurrent(uint8_t bVolNum);

+

+#if FORMAT_SUPPORTED

+REDSTATUS RedCoreVolFormat(void);

+#endif

+#if REDCONF_CHECKER == 1

+REDSTATUS RedCoreVolCheck(void);

+#endif

+REDSTATUS RedCoreVolMount(void);

+REDSTATUS RedCoreVolUnmount(void);

+#if REDCONF_READ_ONLY == 0

+REDSTATUS RedCoreVolTransact(void);

+#endif

+#if REDCONF_API_POSIX == 1

+REDSTATUS RedCoreVolStat(REDSTATFS *pStatFS);

+#endif

+

+#if (REDCONF_READ_ONLY == 0) && ((REDCONF_API_POSIX == 1) || (REDCONF_API_FSE_TRANSMASKSET == 1))

+REDSTATUS RedCoreTransMaskSet(uint32_t ulEventMask);

+#endif

+#if (REDCONF_API_POSIX == 1) || (REDCONF_API_FSE_TRANSMASKGET == 1)

+REDSTATUS RedCoreTransMaskGet(uint32_t *pulEventMask);

+#endif

+

+#if (REDCONF_READ_ONLY == 0) && (REDCONF_API_POSIX == 1)

+REDSTATUS RedCoreCreate(uint32_t ulPInode, const char *pszName, bool fDir, uint32_t *pulInode);

+#endif

+#if (REDCONF_READ_ONLY == 0) && (REDCONF_API_POSIX == 1) && (REDCONF_API_POSIX_LINK == 1)

+REDSTATUS RedCoreLink(uint32_t ulPInode, const char *pszName, uint32_t ulInode);

+#endif

+#if (REDCONF_READ_ONLY == 0) && (REDCONF_API_POSIX == 1) && ((REDCONF_API_POSIX_UNLINK == 1) || (REDCONF_API_POSIX_RMDIR == 1))

+REDSTATUS RedCoreUnlink(uint32_t ulPInode, const char *pszName);

+#endif

+#if REDCONF_API_POSIX == 1

+REDSTATUS RedCoreLookup(uint32_t ulPInode, const char *pszName, uint32_t *pulInode);

+#endif

+#if (REDCONF_READ_ONLY == 0) && (REDCONF_API_POSIX == 1) && (REDCONF_API_POSIX_RENAME == 1)

+REDSTATUS RedCoreRename(uint32_t ulSrcPInode, const char *pszSrcName, uint32_t ulDstPInode, const char *pszDstName);

+#endif

+#if REDCONF_API_POSIX == 1

+REDSTATUS RedCoreStat(uint32_t ulInode, REDSTAT *pStat);

+#endif

+#if REDCONF_API_FSE == 1

+REDSTATUS RedCoreFileSizeGet(uint32_t ulInode, uint64_t *pullSize);

+#endif

+

+REDSTATUS RedCoreFileRead(uint32_t ulInode, uint64_t ullStart, uint32_t *pulLen, void *pBuffer);

+#if REDCONF_READ_ONLY == 0

+REDSTATUS RedCoreFileWrite(uint32_t ulInode, uint64_t ullStart, uint32_t *pulLen, const void *pBuffer);

+#endif

+#if TRUNCATE_SUPPORTED

+REDSTATUS RedCoreFileTruncate(uint32_t ulInode, uint64_t ullSize);

+#endif

+

+#if (REDCONF_API_POSIX == 1) && (REDCONF_API_POSIX_READDIR == 1)

+REDSTATUS RedCoreDirRead(uint32_t ulInode, uint32_t *pulPos, char *pszName, uint32_t *pulInode);

+#endif

+

+

+#endif

+

diff --git a/FreeRTOS-Plus/Source/Reliance-Edge/include/reddeviations.h b/FreeRTOS-Plus/Source/Reliance-Edge/include/reddeviations.h
new file mode 100644
index 0000000..302f333
--- /dev/null
+++ b/FreeRTOS-Plus/Source/Reliance-Edge/include/reddeviations.h
@@ -0,0 +1,224 @@
+/*             ----> DO NOT REMOVE THE FOLLOWING NOTICE <----

+

+                   Copyright (c) 2014-2015 Datalight, Inc.

+                       All Rights Reserved Worldwide.

+

+    This program is free software; you can redistribute it and/or modify

+    it under the terms of the GNU General Public License as published by

+    the Free Software Foundation; use version 2 of the License.

+

+    This program is distributed in the hope that it will be useful,

+    but "AS-IS," WITHOUT ANY WARRANTY; without even the implied warranty

+    of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the

+    GNU General Public License for more details.

+

+    You should have received a copy of the GNU General Public License along

+    with this program; if not, write to the Free Software Foundation, Inc.,

+    51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.

+*/

+/*  Businesses and individuals that for commercial or other reasons cannot

+    comply with the terms of the GPLv2 license may obtain a commercial license

+    before incorporating Reliance Edge into proprietary software for

+    distribution in any form.  Visit http://www.datalight.com/reliance-edge for

+    more information.

+*/

+/** @file

+    @brief This header contains macros which deviate from MISRA C:2012

+*/

+#ifndef REDDEVIATIONS_H

+#define REDDEVIATIONS_H

+

+

+/** @brief Append a suffix to a constant so that it is an unsigned 64-bit value.

+

+    Usages of this macro deviate from MISRA C:2012 Rule 1.2 (advisory).  The

+    rule prohibits the use of language extensions.  The ULL suffix became part

+    of the C standard with C99.  Since this code base adheres to C89, use of

+    this suffix is a language extension.  Reliance Edge needs to deal with

+    64-bit quantities, which by convention are explicitly suffixed.  In at

+    least one case, with the INODE_SIZE_MAX macro, the code needs a way to force

+    a constant to be 64-bits even though its value is not so large that it would

+    be automatically promoted to 64-bits.  Thus the need for this macro and the

+    deviation.  In practice, the ULL suffix has proven to be a nearly universal

+    extension among C89 compilers.

+

+    As rule 19.2 is advisory, a deviation record is not required.  This notice

+    is the only record of the deviation.  PC-Lint does not issue an error for

+    this deviation so there is no error inhibition option.

+

+    Usages of this macro also deviate from MISRA C:2012 Rule 20.10 (advisory).

+    The rule prohibits use of the ## preprocessor operator.  The code is not

+    obscure, and the operator is used only once, so this is deemed to be safe.

+

+    As rule 20.10 is advisory, a deviation record is not required.  This notice

+    is the only record of the deviation.

+

+    Consistent use of this macro, even in non MISRA C code, is encouraged to

+    make it easier to search for 64-bit values.

+

+*/

+#define UINT64_SUFFIX(number) (number##ULL)

+

+

+/** @brief Append a suffix to a constant so that it is a signed 64-bit value.

+

+    Usages of this macro deviate from MISRA C:2012 Rule 1.2 (advisory).  See the

+    description of UINT64_SUFFIX() for details.

+

+    Usages of this macro deviate from MISRA C:2012 Rule 20.10 (advisory).  See

+    the description of UINT64_SUFFIX() for details.

+*/

+#define INT64_SUFFIX(number) (number##LL)

+

+

+/** @brief Cast a pointer to a const uint8_t pointer.

+

+    All usages of this macro deviate from MISRA C:2012 Rule 11.5 (advisory).

+    Because there are no alignment requirements for a uint8_t pointer, this is

+    safe.  However, it is technically a deviation from the rule.

+

+    As Rule 11.5 is advisory, a deviation record is not required.  This notice

+    and the PC-Lint error inhibition option are the only records of the

+    deviation.

+*/

+#define CAST_VOID_PTR_TO_CONST_UINT8_PTR(PTR) ((const uint8_t *)(PTR))

+

+

+/** @brief Cast a pointer to a uint8_t pointer.

+

+    All usages of this macro deviate from MISRA C:2012 Rule 11.5 (advisory).

+    Because there are no alignment requirements for a uint8_t pointer, this is

+    safe.  However, it is technically a deviation from the rule.

+

+    As Rule 11.5 is advisory, a deviation record is not required.  This notice

+    and the PC-Lint error inhibition option are the only records of the

+    deviation.

+*/

+#define CAST_VOID_PTR_TO_UINT8_PTR(PTR) ((uint8_t *)(PTR))

+

+

+/** @brief Cast a pointer to a const uint32_t pointer.

+

+    Usages of this macro may deviate from MISRA C:2012 Rule 11.5 (advisory).

+    It is only used in cases where the pointer is known to be aligned, and thus

+    it is safe to do so.

+

+    As Rule 11.5 is advisory, a deviation record is not required.  This notice

+    and the PC-Lint error inhibition option are the only records of the

+    deviation.

+

+    Usages of this macro may deviate from MISRA C:2012 Rule 11.3 (required).

+    As Rule 11.3 is required, a separate deviation record is required.

+

+    Regarding the cast to (const void *): this is there to placate some

+    compilers which emit warnings when a type with lower alignment requirements

+    (such as const uint8_t *) is cast to a type with higher alignment

+    requirements.  In the places where this macro is used, the pointer is

+    checked to be of sufficient alignment.

+*/

+#define CAST_CONST_UINT32_PTR(PTR) ((const uint32_t *)(const void *)(PTR))

+

+

+/** @brief Cast a pointer to a pointer to (void **).

+

+    Usages of this macro deviate from MISRA C:2012 Rule 11.3 (required).

+    It is only used for populating a node structure pointer with a buffer

+    pointer.  Buffer pointers are 8-byte aligned, thus it is safe to do so.

+

+    As Rule 11.3 is required, a separate deviation record is required.

+*/

+#define CAST_VOID_PTR_PTR(PTRPTR) ((void **)(PTRPTR))

+

+

+/** @brief Create a two-dimensional byte array which is safely aligned.

+

+    Usages of this macro deviate from MISRA C:2012 Rule 19.2 (advisory).

+    A union is required to force alignment of the block buffers, which are used

+    to access metadata nodes, which must be safely aligned for 64-bit types.

+

+    As rule 19.2 is advisory, a deviation record is not required.  This notice

+    and the PC-Lint error inhibition option are the only records of the

+    deviation.

+*/

+#define ALIGNED_2D_BYTE_ARRAY(un, nam, size1, size2)    \

+    union                                               \

+    {                                                   \

+        uint8_t     nam[size1][size2];                  \

+        uint64_t    DummyAlign;                         \

+    } un

+

+

+/** @brief Determine whether RedMemMove() must copy memory in the forward

+           direction, instead of in the reverse.

+

+    In order to copy between overlapping memory regions, RedMemMove() must copy

+    forward if the destination memory is lower, and backward if the destination

+    memory is higher.  Failure to do so would yield incorrect results.

+

+    The only way to make this determination without gross inefficiency is to

+    use pointer comparison.  Pointer comparisons are undefined unless both

+    pointers point within the same object or array (or one element past the end

+    of the array); see section 6.3.8 of ANSI C89.  While RedMemMove() is

+    normally only used when memory regions overlap, which would not result in

+    undefined behavior, it (like memmove()) is supposed to work even for non-

+    overlapping regions, which would make this function invoke undefined

+    behavior.  Experience has shown the pointer comparisons of this sort behave

+    intuitively on common platforms, even though the behavior is undefined.  For

+    those platforms where this is not the case, this implementation of memmove()

+    should be replaced with an alternate one.

+

+    Usages of this macro deviate from MISRA-C:2012 Rule 18.3 (required).  As

+    Rule 18.3 is required, a separate deviation record is required.

+*/

+#define MEMMOVE_MUST_COPY_FORWARD(dest, src) ((dest) < (src))

+

+

+/** @brief Cast a pointer to a (const DIRENT *).

+

+    Usages of this macro deviate from MISRA-C:2012 Rule 11.3 (required).

+    It is used for populating a directory entry structure pointer with a

+    buffer pointer.  Buffer pointers are 8-byte aligned, and DIRENT only

+    requires 4-byte alignment, thus the typecast is safe.

+

+    As Rule 11.3 is required, a separate deviation record is required.

+*/

+#define CAST_CONST_DIRENT_PTR(PTR) ((const DIRENT *)(PTR))

+

+

+/** @brief Determine whether a pointer is aligned.

+

+    A pointer is aligned if its address is an even multiple of

+    ::REDCONF_ALIGNMENT_SIZE.

+

+    This is used in the slice-by-8 RedCrc32Update() function, which needs to

+    know whether a pointer is aligned, since the slice-by-8 algorithm needs to

+    access the memory in an aligned fashion, and if the pointer is not aligned,

+    this can result in faults or suboptimal performance (depending on platform).

+

+    There is no way to perform this check without deviating from MISRA C rules

+    against casting pointers to integer types.  Usage of this macro deviates

+    from MISRA C:2012 Rule 11.4 (advisory).  The main rationale the rule cites

+    against converting pointers to integers is that the chosen integer type may

+    not be able to represent the pointer; this is a non-issue here since we use

+    uintptr_t.  The text says the rule still applies when using uintptr_t due to

+    concern about unaligned pointers, but that is not an issue here since the

+    integer value of the pointer is not saved and not converted back into a

+    pointer and dereferenced.  The result of casting a pointer to a sufficiently

+    large integer is implementation-defined, but macros similar to this one have

+    been used by Datalight for a long time in a wide variety of environments and

+    they have always worked as expected.

+

+    As Rule 11.4 is advisory, a deviation record is not required.  This notice

+    and the PC-Lint error inhibition option are the only records of the

+    deviation.

+

+    @note PC-Lint also thinks this macro as it is used below violates Rule 11.6

+          (required).  This is a false positive, since Rule 11.6 only applies to

+          void pointers.  Below, we use it on a pointer-to-object (uint8_t *),

+          which is covered by Rule 11.4.

+*/

+#define IS_ALIGNED_PTR(ptr) (((uintptr_t)(ptr) & (REDCONF_ALIGNMENT_SIZE - 1U)) == 0U)

+

+

+#endif

+

diff --git a/FreeRTOS-Plus/Source/Reliance-Edge/include/rederrno.h b/FreeRTOS-Plus/Source/Reliance-Edge/include/rederrno.h
new file mode 100644
index 0000000..9b71060
--- /dev/null
+++ b/FreeRTOS-Plus/Source/Reliance-Edge/include/rederrno.h
@@ -0,0 +1,114 @@
+/*             ----> DO NOT REMOVE THE FOLLOWING NOTICE <----

+

+                   Copyright (c) 2014-2015 Datalight, Inc.

+                       All Rights Reserved Worldwide.

+

+    This program is free software; you can redistribute it and/or modify

+    it under the terms of the GNU General Public License as published by

+    the Free Software Foundation; use version 2 of the License.

+

+    This program is distributed in the hope that it will be useful,

+    but "AS-IS," WITHOUT ANY WARRANTY; without even the implied warranty

+    of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the

+    GNU General Public License for more details.

+

+    You should have received a copy of the GNU General Public License along

+    with this program; if not, write to the Free Software Foundation, Inc.,

+    51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.

+*/

+/*  Businesses and individuals that for commercial or other reasons cannot

+    comply with the terms of the GPLv2 license may obtain a commercial license

+    before incorporating Reliance Edge into proprietary software for

+    distribution in any form.  Visit http://www.datalight.com/reliance-edge for

+    more information.

+*/

+/** @file

+    @brief Error values for Reliance Edge APIs

+*/

+#ifndef REDERRNO_H

+#define REDERRNO_H

+

+

+/** @brief Return type for Reliance Edge error values.

+*/

+typedef int32_t REDSTATUS;

+

+

+/*  The errno numbers are the same as Linux.

+*/

+

+/** Operation not permitted. */

+#define RED_EPERM            1

+

+/** No such file or directory. */

+#define RED_ENOENT           2

+

+/** I/O error. */

+#define RED_EIO              5

+

+/** Bad file number. */

+#define RED_EBADF            9

+

+/** Out of memory */

+#define RED_ENOMEM          12

+

+/** Device or resource busy. */

+#define RED_EBUSY           16

+

+/** File exists. */

+#define RED_EEXIST          17

+

+/** Cross-device link. */

+#define RED_EXDEV           18

+

+/** Not a directory. */

+#define RED_ENOTDIR         20

+

+/** Is a directory. */

+#define RED_EISDIR          21

+

+/** Invalid argument. */

+#define RED_EINVAL          22

+

+/** File table overflow. */

+#define RED_ENFILE          23

+

+/** Too many open files. */

+#define RED_EMFILE          24

+

+/** File too large. */

+#define RED_EFBIG           27

+

+/** No space left on device. */

+#define RED_ENOSPC          28

+

+/** Read-only file system. */

+#define RED_EROFS           30

+

+/** Too many links. */

+#define RED_EMLINK          31

+

+/** Math result not representable. */

+#define RED_ERANGE          34

+

+/** File name too long. */

+#define RED_ENAMETOOLONG    36

+

+/** Function not implemented. */

+#define RED_ENOSYS          38

+

+/** Directory not empty. */

+#define RED_ENOTEMPTY       39

+

+/** No data available. */

+#define RED_ENODATA         61

+

+/** Too many users. */

+#define RED_EUSERS          87

+

+/** Nothing will be okay ever again. */

+#define RED_EFUBAR          RED_EINVAL

+

+

+#endif

+

diff --git a/FreeRTOS-Plus/Source/Reliance-Edge/include/redexclude.h b/FreeRTOS-Plus/Source/Reliance-Edge/include/redexclude.h
new file mode 100644
index 0000000..6d149a3
--- /dev/null
+++ b/FreeRTOS-Plus/Source/Reliance-Edge/include/redexclude.h
@@ -0,0 +1,54 @@
+/*             ----> DO NOT REMOVE THE FOLLOWING NOTICE <----

+

+                   Copyright (c) 2014-2015 Datalight, Inc.

+                       All Rights Reserved Worldwide.

+

+    This program is free software; you can redistribute it and/or modify

+    it under the terms of the GNU General Public License as published by

+    the Free Software Foundation; use version 2 of the License.

+

+    This program is distributed in the hope that it will be useful,

+    but "AS-IS," WITHOUT ANY WARRANTY; without even the implied warranty

+    of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the

+    GNU General Public License for more details.

+

+    You should have received a copy of the GNU General Public License along

+    with this program; if not, write to the Free Software Foundation, Inc.,

+    51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.

+*/

+/*  Businesses and individuals that for commercial or other reasons cannot

+    comply with the terms of the GPLv2 license may obtain a commercial license

+    before incorporating Reliance Edge into proprietary software for

+    distribution in any form.  Visit http://www.datalight.com/reliance-edge for

+    more information.

+*/

+/** @file

+*/

+#ifndef REDEXCLUDE_H

+#define REDEXCLUDE_H

+

+

+#define DELETE_SUPPORTED \

+  ( \

+       (REDCONF_READ_ONLY == 0) \

+    && (    (REDCONF_API_POSIX == 1) \

+         && (    (REDCONF_API_POSIX_RMDIR == 1) \

+              || (REDCONF_API_POSIX_UNLINK == 1) \

+              || ((REDCONF_API_POSIX_RENAME == 1) && (REDCONF_RENAME_ATOMIC == 1)))))

+

+#define TRUNCATE_SUPPORTED \

+  ( \

+       (REDCONF_READ_ONLY == 0) \

+    && (    ((REDCONF_API_POSIX == 1) && (REDCONF_API_POSIX_FTRUNCATE == 1)) \

+         || ((REDCONF_API_FSE == 1) && (REDCONF_API_FSE_TRUNCATE == 1))))

+

+#define FORMAT_SUPPORTED \

+    ( \

+         (REDCONF_READ_ONLY == 0) \

+      && (    ((REDCONF_API_POSIX == 1) && (REDCONF_API_POSIX_FORMAT == 1)) \

+           || ((REDCONF_API_FSE == 1) && (REDCONF_API_FSE_FORMAT == 1)) \

+           || (REDCONF_IMAGE_BUILDER == 1)))

+

+

+#endif

+

diff --git a/FreeRTOS-Plus/Source/Reliance-Edge/include/redfs.h b/FreeRTOS-Plus/Source/Reliance-Edge/include/redfs.h
new file mode 100644
index 0000000..8875afb
--- /dev/null
+++ b/FreeRTOS-Plus/Source/Reliance-Edge/include/redfs.h
@@ -0,0 +1,46 @@
+/*             ----> DO NOT REMOVE THE FOLLOWING NOTICE <----

+

+                   Copyright (c) 2014-2015 Datalight, Inc.

+                       All Rights Reserved Worldwide.

+

+    This program is free software; you can redistribute it and/or modify

+    it under the terms of the GNU General Public License as published by

+    the Free Software Foundation; use version 2 of the License.

+

+    This program is distributed in the hope that it will be useful,

+    but "AS-IS," WITHOUT ANY WARRANTY; without even the implied warranty

+    of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the

+    GNU General Public License for more details.

+

+    You should have received a copy of the GNU General Public License along

+    with this program; if not, write to the Free Software Foundation, Inc.,

+    51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.

+*/

+/*  Businesses and individuals that for commercial or other reasons cannot

+    comply with the terms of the GPLv2 license may obtain a commercial license

+    before incorporating Reliance Edge into proprietary software for

+    distribution in any form.  Visit http://www.datalight.com/reliance-edge for

+    more information.

+*/

+/** @file

+*/

+#ifndef REDFS_H

+#define REDFS_H

+

+

+#include <redconf.h>

+#include "redconfigchk.h"

+#include <redtypes.h>

+#include "rederrno.h"

+#include "reddeviations.h"

+#include "redmacs.h"

+#include "redapimacs.h"

+#include "redutils.h"

+#include "redosserv.h"

+#include "redmisc.h"

+#include "redver.h"

+#include "redexclude.h"

+

+

+#endif

+

diff --git a/FreeRTOS-Plus/Source/Reliance-Edge/include/redfse.h b/FreeRTOS-Plus/Source/Reliance-Edge/include/redfse.h
new file mode 100644
index 0000000..3b0ef88
--- /dev/null
+++ b/FreeRTOS-Plus/Source/Reliance-Edge/include/redfse.h
@@ -0,0 +1,105 @@
+/*             ----> DO NOT REMOVE THE FOLLOWING NOTICE <----

+

+                   Copyright (c) 2014-2015 Datalight, Inc.

+                       All Rights Reserved Worldwide.

+

+    This program is free software; you can redistribute it and/or modify

+    it under the terms of the GNU General Public License as published by

+    the Free Software Foundation; use version 2 of the License.

+

+    This program is distributed in the hope that it will be useful,

+    but "AS-IS," WITHOUT ANY WARRANTY; without even the implied warranty

+    of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the

+    GNU General Public License for more details.

+

+    You should have received a copy of the GNU General Public License along

+    with this program; if not, write to the Free Software Foundation, Inc.,

+    51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.

+*/

+/*  Businesses and individuals that for commercial or other reasons cannot

+    comply with the terms of the GPLv2 license may obtain a commercial license

+    before incorporating Reliance Edge into proprietary software for

+    distribution in any form.  Visit http://www.datalight.com/reliance-edge for

+    more information.

+*/

+/** @file

+    @brief Interface for the Reliance Edge FSE API.

+

+    The FSE (File Systems Essentials) API is a minimalist file system API

+    intended for simple use cases with a fixed number of statically-defined

+    files.  It does not support creating or deleting files dynamically.  Files

+    are referenced by a fixed file number, rather than by name; there are no

+    file names and no directories.  There are also no file handles: files are

+    not opened or closed, and file offsets are given explicitly.

+

+    If the FSE API is too limited to meet the needs of your application,

+    consider using the more feature-rich POSIX-like file system API instead.

+*/

+#ifndef REDFSE_H

+#define REDFSE_H

+

+/*  This header is intended for application use; some applications are written

+    in C++.

+*/

+#ifdef __cplusplus

+extern "C" {

+#endif

+

+#include <redconf.h>

+

+#if REDCONF_API_FSE == 1

+

+#include <redtypes.h>

+#include "redapimacs.h"

+#include "rederrno.h"

+

+

+/** @brief First valid file number.

+

+    This macro can be used to statically define file numbers for given files,

+    as in the below example:

+

+    ~~~{.c}

+    #define LOG_FILE        (RED_FILENUM_FIRST_VALID)

+    #define DATABASE_FILE   (RED_FILENUM_FIRST_VALID + 1U)

+    #define ICON1_FILE      (RED_FILENUM_FIRST_VALID + 2U)

+    #define ICON2_FILE      (RED_FILENUM_FIRST_VALID + 3U)

+    ~~~

+*/

+#define RED_FILENUM_FIRST_VALID (2U)

+

+

+REDSTATUS RedFseInit(void);

+REDSTATUS RedFseUninit(void);

+REDSTATUS RedFseMount(uint8_t bVolNum);

+REDSTATUS RedFseUnmount(uint8_t bVolNum);

+#if (REDCONF_READ_ONLY == 0) && (REDCONF_API_FSE_FORMAT == 1)

+REDSTATUS RedFseFormat(uint8_t bVolNum);

+#endif

+int32_t RedFseRead(uint8_t bVolNum, uint32_t ulFileNum, uint64_t ullFileOffset, uint32_t ulLength, void *pBuffer);

+#if REDCONF_READ_ONLY == 0

+int32_t RedFseWrite(uint8_t bVolNum, uint32_t ulFileNum, uint64_t ullFileOffset, uint32_t ulLength, const void *pBuffer);

+#endif

+#if (REDCONF_READ_ONLY == 0) && (REDCONF_API_FSE_TRUNCATE == 1)

+REDSTATUS RedFseTruncate(uint8_t bVolNum, uint32_t ulFileNum, uint64_t ullNewFileSize);

+#endif

+int64_t RedFseSizeGet(uint8_t bVolNum, uint32_t ulFileNum);

+#if (REDCONF_READ_ONLY == 0) && (REDCONF_API_FSE_TRANSMASKSET == 1)

+REDSTATUS RedFseTransMaskSet(uint8_t bVolNum, uint32_t ulEventMask);

+#endif

+#if REDCONF_API_FSE_TRANSMASKGET == 1

+REDSTATUS RedFseTransMaskGet(uint8_t bVolNum, uint32_t *pulEventMask);

+#endif

+#if REDCONF_READ_ONLY == 0

+REDSTATUS RedFseTransact(uint8_t bVolNum);

+#endif

+

+#endif /* REDCONF_API_FSE == 1 */

+

+

+#ifdef __cplusplus

+}

+#endif

+

+#endif

+

diff --git a/FreeRTOS-Plus/Source/Reliance-Edge/include/redgetopt.h b/FreeRTOS-Plus/Source/Reliance-Edge/include/redgetopt.h
new file mode 100644
index 0000000..11c1206
--- /dev/null
+++ b/FreeRTOS-Plus/Source/Reliance-Edge/include/redgetopt.h
@@ -0,0 +1,77 @@
+/*-

+ * Copyright (c) 2000 The NetBSD Foundation, Inc.

+ * All rights reserved.

+ *

+ * This code is derived from software contributed to The NetBSD Foundation

+ * by Dieter Baron and Thomas Klausner.

+ *

+ * 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.

+ *

+ * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. 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 FOUNDATION 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.

+ */

+/** @file

+    @brief Interfaces for getopt() and getopt_long() work-alike functions.

+

+    This code was taken from FreeBSD and slightly modified, mostly to rename

+    symbols with external linkage to avoid naming conflicts in systems where

+    there are real getopt()/getopt_long() implementations.  Changed to use

+    fixed-width types to allow code using these interfaces to be consistent

+    with the rest of the product.

+*/

+#ifndef REDGETOPT_H

+#define REDGETOPT_H

+

+

+#define red_no_argument         0

+#define red_required_argument   1

+#define red_optional_argument   2

+

+

+/** @brief Specifies a long option.

+*/

+typedef struct

+{

+    /* name of long option */

+    const char *name;

+    /*

+     * one of red_no_argument, red_required_argument, and red_optional_argument:

+     * whether option takes an argument

+     */

+    int32_t has_arg;

+    /* if not NULL, set *flag to val when option found */

+    int32_t *flag;

+    /* if flag not NULL, value to set *flag to; else return value */

+    int32_t val;

+} REDOPTION;

+

+

+int32_t RedGetopt(int32_t nargc, char * const *nargv, const char *options);

+int32_t RedGetoptLong(int32_t nargc, char * const *nargv, const char *options, const REDOPTION *long_options, int32_t *idx);

+

+

+extern const char *red_optarg;

+extern int32_t red_optind;

+extern int32_t red_opterr;

+extern int32_t red_optopt;

+extern int32_t red_optreset;

+

+

+#endif

+

diff --git a/FreeRTOS-Plus/Source/Reliance-Edge/include/redmacs.h b/FreeRTOS-Plus/Source/Reliance-Edge/include/redmacs.h
new file mode 100644
index 0000000..0fe8a57
--- /dev/null
+++ b/FreeRTOS-Plus/Source/Reliance-Edge/include/redmacs.h
@@ -0,0 +1,103 @@
+/*             ----> DO NOT REMOVE THE FOLLOWING NOTICE <----

+

+                   Copyright (c) 2014-2015 Datalight, Inc.

+                       All Rights Reserved Worldwide.

+

+    This program is free software; you can redistribute it and/or modify

+    it under the terms of the GNU General Public License as published by

+    the Free Software Foundation; use version 2 of the License.

+

+    This program is distributed in the hope that it will be useful,

+    but "AS-IS," WITHOUT ANY WARRANTY; without even the implied warranty

+    of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the

+    GNU General Public License for more details.

+

+    You should have received a copy of the GNU General Public License along

+    with this program; if not, write to the Free Software Foundation, Inc.,

+    51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.

+*/

+/*  Businesses and individuals that for commercial or other reasons cannot

+    comply with the terms of the GPLv2 license may obtain a commercial license

+    before incorporating Reliance Edge into proprietary software for

+    distribution in any form.  Visit http://www.datalight.com/reliance-edge for

+    more information.

+*/

+/** @file

+*/

+#ifndef REDMACS_H

+#define REDMACS_H

+

+

+#ifndef NULL

+#define NULL ((void *)0)

+#endif

+

+#ifndef UINT8_MAX

+#define UINT8_MAX   (0xFFU)

+#endif

+#ifndef UINT16_MAX

+#define UINT16_MAX  (0xFFFFU)

+#endif

+#ifndef UINT32_MAX

+#define UINT32_MAX  (0xFFFFFFFFU)

+#endif

+#ifndef UINT64_MAX

+#define UINT64_MAX  UINT64_SUFFIX(0xFFFFFFFFFFFFFFFF)

+#endif

+#ifndef INT32_MAX

+#define INT32_MAX   (0x7FFFFFFF)

+#endif

+#ifndef INT64_MAX

+#define INT64_MAX   INT64_SUFFIX(0x7FFFFFFFFFFFFFFF)

+#endif

+

+#ifndef true

+#define true (1)

+#endif

+#ifndef false

+#define false (0)

+#endif

+

+#define SECTOR_SIZE_MIN (256U)

+

+#if   REDCONF_BLOCK_SIZE == 256U

+#define BLOCK_SIZE_P2 8U

+#elif REDCONF_BLOCK_SIZE == 512U

+#define BLOCK_SIZE_P2 9U

+#elif REDCONF_BLOCK_SIZE == 1024U

+#define BLOCK_SIZE_P2 10U

+#elif REDCONF_BLOCK_SIZE == 2048U

+#define BLOCK_SIZE_P2 11U

+#elif REDCONF_BLOCK_SIZE == 4096U

+#define BLOCK_SIZE_P2 12U

+#elif REDCONF_BLOCK_SIZE == 8192U

+#define BLOCK_SIZE_P2 13U

+#elif REDCONF_BLOCK_SIZE == 16384U

+#define BLOCK_SIZE_P2 14U

+#elif REDCONF_BLOCK_SIZE == 32768U

+#define BLOCK_SIZE_P2 15U

+#elif REDCONF_BLOCK_SIZE == 65536U

+#define BLOCK_SIZE_P2 16U

+#else

+#error "REDCONF_BLOCK_SIZE must be a power of two value between 256 and 65536"

+#endif

+

+#define REDMIN(a, b) (((a) < (b)) ? (a) : (b))

+

+#define INODE_INVALID       (0U) /* General-purpose invalid inode number (must be zero). */

+#define INODE_FIRST_VALID   (2U) /* First valid inode number. */

+#define INODE_ROOTDIR       (INODE_FIRST_VALID) /* Inode number of the root directory. */

+

+/*  Expands to a "const" qualifier when the volume count is one, otherwise

+    expands to nothing.  This is useful for variables that never change in

+    single-volume configurations but do change in multi-volume configurations.

+*/

+#if REDCONF_VOLUME_COUNT == 1U

+  #define CONST_IF_ONE_VOLUME const

+#else

+  #define CONST_IF_ONE_VOLUME

+#endif

+

+

+#endif

+

diff --git a/FreeRTOS-Plus/Source/Reliance-Edge/include/redmisc.h b/FreeRTOS-Plus/Source/Reliance-Edge/include/redmisc.h
new file mode 100644
index 0000000..8ad8105
--- /dev/null
+++ b/FreeRTOS-Plus/Source/Reliance-Edge/include/redmisc.h
@@ -0,0 +1,48 @@
+/*             ----> DO NOT REMOVE THE FOLLOWING NOTICE <----

+

+                   Copyright (c) 2014-2015 Datalight, Inc.

+                       All Rights Reserved Worldwide.

+

+    This program is free software; you can redistribute it and/or modify

+    it under the terms of the GNU General Public License as published by

+    the Free Software Foundation; use version 2 of the License.

+

+    This program is distributed in the hope that it will be useful,

+    but "AS-IS," WITHOUT ANY WARRANTY; without even the implied warranty

+    of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the

+    GNU General Public License for more details.

+

+    You should have received a copy of the GNU General Public License along

+    with this program; if not, write to the Free Software Foundation, Inc.,

+    51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.

+*/

+/*  Businesses and individuals that for commercial or other reasons cannot

+    comply with the terms of the GPLv2 license may obtain a commercial license

+    before incorporating Reliance Edge into proprietary software for

+    distribution in any form.  Visit http://www.datalight.com/reliance-edge for

+    more information.

+*/

+/** @file

+*/

+#ifndef REDMISC_H

+#define REDMISC_H

+

+

+/** @brief Type of an inode or handle.

+

+    Used to indicate the actual or expected type of an inode or handle.

+*/

+typedef enum

+{

+    FTYPE_FILE,     /**< Type is file. */

+    FTYPE_DIR,      /**< Type is directory. */

+

+    /** Type is either file or directory: used only to indicate an expected

+        type, never as an actual type.

+    */

+    FTYPE_EITHER

+} FTYPE;

+

+

+#endif

+

diff --git a/FreeRTOS-Plus/Source/Reliance-Edge/include/redosserv.h b/FreeRTOS-Plus/Source/Reliance-Edge/include/redosserv.h
new file mode 100644
index 0000000..66c11c6
--- /dev/null
+++ b/FreeRTOS-Plus/Source/Reliance-Edge/include/redosserv.h
@@ -0,0 +1,86 @@
+/*             ----> DO NOT REMOVE THE FOLLOWING NOTICE <----

+

+                   Copyright (c) 2014-2015 Datalight, Inc.

+                       All Rights Reserved Worldwide.

+

+    This program is free software; you can redistribute it and/or modify

+    it under the terms of the GNU General Public License as published by

+    the Free Software Foundation; use version 2 of the License.

+

+    This program is distributed in the hope that it will be useful,

+    but "AS-IS," WITHOUT ANY WARRANTY; without even the implied warranty

+    of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the

+    GNU General Public License for more details.

+

+    You should have received a copy of the GNU General Public License along

+    with this program; if not, write to the Free Software Foundation, Inc.,

+    51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.

+*/

+/*  Businesses and individuals that for commercial or other reasons cannot

+    comply with the terms of the GPLv2 license may obtain a commercial license

+    before incorporating Reliance Edge into proprietary software for

+    distribution in any form.  Visit http://www.datalight.com/reliance-edge for

+    more information.

+*/

+/** @file

+*/

+#ifndef REDOSSERV_H

+#define REDOSSERV_H

+

+

+#include <redostypes.h>

+

+

+/** @brief Type of access requested when opening a block device.

+*/

+typedef enum

+{

+    BDEV_O_RDONLY,  /**< Open block device for read access. */

+    BDEV_O_WRONLY,  /**< Open block device for write access. */

+    BDEV_O_RDWR     /**< Open block device for read and write access. */

+} BDEVOPENMODE;

+

+REDSTATUS RedOsBDevOpen(uint8_t bVolNum, BDEVOPENMODE mode);

+REDSTATUS RedOsBDevClose(uint8_t bVolNum);

+REDSTATUS RedOsBDevRead(uint8_t bVolNum, uint64_t ullSectorStart, uint32_t ulSectorCount, void *pBuffer);

+

+#if REDCONF_READ_ONLY == 0

+REDSTATUS RedOsBDevWrite(uint8_t bVolNum, uint64_t ullSectorStart, uint32_t ulSectorCount, const void *pBuffer);

+REDSTATUS RedOsBDevFlush(uint8_t bVolNum);

+#endif

+

+/*  Non-standard API: for host machines only.

+*/

+REDSTATUS RedOsBDevConfig(uint8_t bVolNum, const char *pszBDevSpec);

+

+

+#if REDCONF_TASK_COUNT > 1U

+REDSTATUS RedOsMutexInit(void);

+REDSTATUS RedOsMutexUninit(void);

+void RedOsMutexAcquire(void);

+void RedOsMutexRelease(void);

+#endif

+#if (REDCONF_TASK_COUNT > 1U) && (REDCONF_API_POSIX == 1)

+uint32_t RedOsTaskId(void);

+#endif

+

+REDSTATUS RedOsClockInit(void);

+REDSTATUS RedOsClockUninit(void);

+uint32_t RedOsClockGetTime(void);

+

+REDSTATUS RedOsTimestampInit(void);

+REDSTATUS RedOsTimestampUninit(void);

+REDTIMESTAMP RedOsTimestamp(void);

+uint64_t RedOsTimePassed(REDTIMESTAMP tsSince);

+

+#if REDCONF_OUTPUT == 1

+void RedOsOutputString(const char *pszString);

+#endif

+

+#if REDCONF_ASSERTS == 1

+void RedOsAssertFail(const char *pszFileName, uint32_t ulLineNum);

+#endif

+

+

+#endif

+

diff --git a/FreeRTOS-Plus/Source/Reliance-Edge/include/redposix.h b/FreeRTOS-Plus/Source/Reliance-Edge/include/redposix.h
new file mode 100644
index 0000000..bedb008
--- /dev/null
+++ b/FreeRTOS-Plus/Source/Reliance-Edge/include/redposix.h
@@ -0,0 +1,196 @@
+/*             ----> DO NOT REMOVE THE FOLLOWING NOTICE <----

+

+                   Copyright (c) 2014-2015 Datalight, Inc.

+                       All Rights Reserved Worldwide.

+

+    This program is free software; you can redistribute it and/or modify

+    it under the terms of the GNU General Public License as published by

+    the Free Software Foundation; use version 2 of the License.

+

+    This program is distributed in the hope that it will be useful,

+    but "AS-IS," WITHOUT ANY WARRANTY; without even the implied warranty

+    of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the

+    GNU General Public License for more details.

+

+    You should have received a copy of the GNU General Public License along

+    with this program; if not, write to the Free Software Foundation, Inc.,

+    51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.

+*/

+/*  Businesses and individuals that for commercial or other reasons cannot

+    comply with the terms of the GPLv2 license may obtain a commercial license

+    before incorporating Reliance Edge into proprietary software for

+    distribution in any form.  Visit http://www.datalight.com/reliance-edge for

+    more information.

+*/

+/** @file

+    @brief Interface for the Reliance Edge POSIX-like API.

+

+    The POSIX-like file system API is the primary file system API for

+    Reliance Edge, which supports the full functionality of the file system.

+    This API aims to be compatible with POSIX where reasonable, but it is

+    simplified considerably to meet the needs of resource-constrained embedded

+    systems.  The API has also been extended to provide access to the unique

+    features of Reliance Edge, and to cover areas (like mountins and formatting)

+    which do not have APIs in the POSIX specification.

+*/

+#ifndef REDPOSIX_H

+#define REDPOSIX_H

+

+/*  This header is intended for application use; some applications are written

+    in C++.

+*/

+#ifdef __cplusplus

+extern "C" {

+#endif

+

+#include <redconf.h>

+

+#if REDCONF_API_POSIX == 1

+

+#include <redtypes.h>

+#include "redapimacs.h"

+#include "rederrno.h"

+#include "redstat.h"

+

+/** Open for reading only. */

+#define RED_O_RDONLY    0x00000001U

+

+/** Open for writing only. */

+#define RED_O_WRONLY    0x00000002U

+

+/** Open for reading and writing. */

+#define RED_O_RDWR      0x00000004U

+

+/** File offset for all writes is end-of-file. */

+#define RED_O_APPEND    0x00000008U

+

+/** Create the file. */

+#define RED_O_CREAT     0x00000010U

+

+/** Error if path already exists. */

+#define RED_O_EXCL      0x00000020U

+

+/** Truncate file to size zero. */

+#define RED_O_TRUNC     0x00000040U

+

+

+/** @brief Last file system error (errno).

+

+    Under normal circumstances, each task using the file system has an

+    independent `red_errno` value.  Applications do not need to worry about

+    one task obliterating an error value that another task needed to read.  The

+    value is initially zero.  When one of the POSIX-like APIs return an

+    indication of error, `red_errno` is set to an error value.

+

+    In some circumstances, `red_errno` will be a global errno location which

+    is shared by multiple tasks.  If the calling task is not registered as a

+    file system user and all of the task slots are full, there can be no

+    task-specific errno, so the global errno is used.  Likewise, if the file

+    system driver is uninitialized, there are no registered file system users

+    and `red_errno` always refers to the global errno.  Under these

+    circumstances, multiple tasks manipulating `red_errno` could be

+    problematic.  When the task count is set to one, `red_errno` always refers

+    to the global errno.

+

+    Note that `red_errno` is usable as an lvalue; i.e., in addition to reading

+    the error value, the error value can be set:

+

+    ~~~{.c}

+    red_errno = 0;

+    ~~~

+*/

+#define red_errno (*red_errnoptr())

+

+

+/** @brief Positions from which to seek within a file.

+*/

+typedef enum

+{

+    /*  0/1/2 are the traditional values for SET/CUR/END, respectively.  Prior

+        to the release of Unix System V in 1983, the SEEK_* symbols did not

+        exist and C programs hard-coded the 0/1/2 values with those meanings.

+    */

+    RED_SEEK_SET = 0,   /**< Set file offset to given offset. */

+    RED_SEEK_CUR = 1,   /**< Set file offset to current offset plus signed offset. */

+    RED_SEEK_END = 2    /**< Set file offset to EOF plus signed offset. */

+} REDWHENCE;

+

+

+#if REDCONF_API_POSIX_READDIR == 1

+/** @brief Opaque directory handle.

+*/

+typedef struct sREDHANDLE REDDIR;

+

+

+/** @brief Directory entry information.

+*/

+typedef struct

+{

+    uint32_t    d_ino;  /**< File serial number (inode number). */

+    char        d_name[REDCONF_NAME_MAX+1U];    /**< Name of entry. */

+    REDSTAT     d_stat; /**< File information (POSIX extension). */

+} REDDIRENT;

+#endif

+

+

+int32_t red_init(void);

+int32_t red_uninit(void);

+int32_t red_mount(const char *pszVolume);

+int32_t red_umount(const char *pszVolume);

+#if (REDCONF_READ_ONLY == 0) && (REDCONF_API_POSIX_FORMAT == 1)

+int32_t red_format(const char *pszVolume);

+#endif

+#if REDCONF_READ_ONLY == 0

+int32_t red_transact(const char *pszVolume);

+#endif

+#if REDCONF_READ_ONLY == 0

+int32_t red_settransmask(const char *pszVolume, uint32_t ulEventMask);

+#endif

+int32_t red_gettransmask(const char *pszVolume, uint32_t *pulEventMask);

+int32_t red_statvfs(const char *pszVolume, REDSTATFS *pStatvfs);

+int32_t red_open(const char *pszPath, uint32_t ulOpenMode);

+#if (REDCONF_READ_ONLY == 0) && (REDCONF_API_POSIX_UNLINK == 1)

+int32_t red_unlink(const char *pszPath);

+#endif

+#if (REDCONF_READ_ONLY == 0) && (REDCONF_API_POSIX_MKDIR == 1)

+int32_t red_mkdir(const char *pszPath);

+#endif

+#if (REDCONF_READ_ONLY == 0) && (REDCONF_API_POSIX_RMDIR == 1)

+int32_t red_rmdir(const char *pszPath);

+#endif

+#if (REDCONF_READ_ONLY == 0) && (REDCONF_API_POSIX_RENAME == 1)

+int32_t red_rename(const char *pszOldPath, const char *pszNewPath);

+#endif

+#if (REDCONF_READ_ONLY == 0) && (REDCONF_API_POSIX_LINK == 1)

+int32_t red_link(const char *pszPath, const char *pszHardLink);

+#endif

+int32_t red_close(int32_t iFildes);

+int32_t red_read(int32_t iFildes, void *pBuffer, uint32_t ulLength);

+#if REDCONF_READ_ONLY == 0

+int32_t red_write(int32_t iFildes, const void *pBuffer, uint32_t ulLength);

+#endif

+#if REDCONF_READ_ONLY == 0

+int32_t red_fsync(int32_t iFildes);

+#endif

+int64_t red_lseek(int32_t iFildes, int64_t llOffset, REDWHENCE whence);

+#if (REDCONF_READ_ONLY == 0) && (REDCONF_API_POSIX_FTRUNCATE == 1)

+int32_t red_ftruncate(int32_t iFildes, uint64_t ullSize);

+#endif

+int32_t red_fstat(int32_t iFildes, REDSTAT *pStat);

+#if REDCONF_API_POSIX_READDIR == 1

+REDDIR *red_opendir(const char *pszPath);

+REDDIRENT *red_readdir(REDDIR *pDirStream);

+void red_rewinddir(REDDIR *pDirStream);

+int32_t red_closedir(REDDIR *pDirStream);

+#endif

+REDSTATUS *red_errnoptr(void);

+

+#endif /* REDCONF_API_POSIX */

+

+

+#ifdef __cplusplus

+}

+#endif

+

+#endif

+

diff --git a/FreeRTOS-Plus/Source/Reliance-Edge/include/redstat.h b/FreeRTOS-Plus/Source/Reliance-Edge/include/redstat.h
new file mode 100644
index 0000000..bf38011
--- /dev/null
+++ b/FreeRTOS-Plus/Source/Reliance-Edge/include/redstat.h
@@ -0,0 +1,94 @@
+/*             ----> DO NOT REMOVE THE FOLLOWING NOTICE <----

+

+                   Copyright (c) 2014-2015 Datalight, Inc.

+                       All Rights Reserved Worldwide.

+

+    This program is free software; you can redistribute it and/or modify

+    it under the terms of the GNU General Public License as published by

+    the Free Software Foundation; use version 2 of the License.

+

+    This program is distributed in the hope that it will be useful,

+    but "AS-IS," WITHOUT ANY WARRANTY; without even the implied warranty

+    of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the

+    GNU General Public License for more details.

+

+    You should have received a copy of the GNU General Public License along

+    with this program; if not, write to the Free Software Foundation, Inc.,

+    51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.

+*/

+/*  Businesses and individuals that for commercial or other reasons cannot

+    comply with the terms of the GPLv2 license may obtain a commercial license

+    before incorporating Reliance Edge into proprietary software for

+    distribution in any form.  Visit http://www.datalight.com/reliance-edge for

+    more information.

+*/

+/** @file

+*/

+#ifndef REDSTAT_H

+#define REDSTAT_H

+

+

+/** Mode bit for a directory. */

+#define RED_S_IFDIR  0x4000U

+

+/** Mode bit for a regular file. */

+#define RED_S_IFREG  0x8000U

+

+/** @brief Test for a directory.

+*/

+#define RED_S_ISDIR(m)  (((m) & RED_S_IFDIR) != 0U)

+

+/** @brief Test for a regular file.

+*/

+#define RED_S_ISREG(m)  (((m) & RED_S_IFREG) != 0U)

+

+

+/** File system is read-only. */

+#define RED_ST_RDONLY   0x00000001U

+

+/** File system ignores suid and sgid bits. */

+#define RED_ST_NOSUID   0x00000002U

+

+

+/** @brief Status information on an inode.

+*/

+typedef struct

+{

+    uint8_t     st_dev;     /**< Volume number of volume containing file. */

+    uint32_t    st_ino;     /**< File serial number (inode number). */

+    uint16_t    st_mode;    /**< Mode of file. */

+    uint16_t    st_nlink;   /**< Number of hard links to the file. */

+    uint64_t    st_size;    /**< File size in bytes. */

+  #if REDCONF_INODE_TIMESTAMPS == 1

+    uint32_t    st_atime;   /**< Time of last access (seconds since 01-01-1970). */

+    uint32_t    st_mtime;   /**< Time of last data modification (seconds since 01-01-1970). */

+    uint32_t    st_ctime;   /**< Time of last status change (seconds since 01-01-1970). */

+  #endif

+  #if REDCONF_INODE_BLOCKS == 1

+    uint32_t    st_blocks;  /**< Number of blocks allocated for this object. */

+  #endif

+} REDSTAT;

+

+

+/** @brief Status information on a file system volume.

+*/

+typedef struct

+{

+    uint32_t    f_bsize;    /**< File system block size. */

+    uint32_t    f_frsize;   /**< Fundamental file system block size. */

+    uint32_t    f_blocks;   /**< Total number of blocks on file system in units of f_frsize. */

+    uint32_t    f_bfree;    /**< Total number of free blocks. */

+    uint32_t    f_bavail;   /**< Number of free blocks available to non-privileged process. */

+    uint32_t    f_files;    /**< Total number of file serial numbers. */

+    uint32_t    f_ffree;    /**< Total number of free file serial numbers. */

+    uint32_t    f_favail;   /**< Number of file serial numbers available to non-privileged process. */

+    uint32_t    f_fsid;     /**< File system ID (useless, populated with zero). */

+    uint32_t    f_flag;     /**< Bit mask of f_flag values.  Includes read-only file system flag. */

+    uint32_t    f_namemax;  /**< Maximum filename length. */

+    uint64_t    f_maxfsize; /**< Maximum file size (POSIX extension). */

+    uint32_t    f_dev;      /**< Volume number (POSIX extension). */

+} REDSTATFS;

+

+

+#endif

+

diff --git a/FreeRTOS-Plus/Source/Reliance-Edge/include/redtests.h b/FreeRTOS-Plus/Source/Reliance-Edge/include/redtests.h
new file mode 100644
index 0000000..017061e
--- /dev/null
+++ b/FreeRTOS-Plus/Source/Reliance-Edge/include/redtests.h
@@ -0,0 +1,249 @@
+/*             ----> DO NOT REMOVE THE FOLLOWING NOTICE <----

+

+                   Copyright (c) 2014-2015 Datalight, Inc.

+                       All Rights Reserved Worldwide.

+

+    This program is free software; you can redistribute it and/or modify

+    it under the terms of the GNU General Public License as published by

+    the Free Software Foundation; use version 2 of the License.

+

+    This program is distributed in the hope that it will be useful,

+    but "AS-IS," WITHOUT ANY WARRANTY; without even the implied warranty

+    of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the

+    GNU General Public License for more details.

+

+    You should have received a copy of the GNU General Public License along

+    with this program; if not, write to the Free Software Foundation, Inc.,

+    51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.

+*/

+/*  Businesses and individuals that for commercial or other reasons cannot

+    comply with the terms of the GPLv2 license may obtain a commercial license

+    before incorporating Reliance Edge into proprietary software for

+    distribution in any form.  Visit http://www.datalight.com/reliance-edge for

+    more information.

+*/

+/** @file

+    @brief Prototypes for Reliance Edge test entry points.

+*/

+#ifndef REDTESTS_H

+#define REDTESTS_H

+

+#include <redtypes.h>

+#include "redtestutils.h"

+#include "redver.h"

+

+/*  This macro is only defined by the error injection project.

+*/

+#ifdef REDCONF_ERROR_INJECTION

+#include <rederrinject.h>

+#endif

+

+#define FSSTRESS_SUPPORTED  \

+    (    ((RED_KIT == RED_KIT_GPL) || (RED_KIT == RED_KIT_SANDBOX)) \

+      && (REDCONF_OUTPUT == 1) && (REDCONF_READ_ONLY == 0) && (REDCONF_PATH_SEPARATOR == '/') \

+      && (REDCONF_API_POSIX == 1) && (REDCONF_API_POSIX_UNLINK == 1) && (REDCONF_API_POSIX_MKDIR == 1) \

+      && (REDCONF_API_POSIX_RMDIR == 1) && (REDCONF_API_POSIX_RENAME == 1) && (REDCONF_API_POSIX_LINK == 1) \

+      && (REDCONF_API_POSIX_FTRUNCATE == 1) && (REDCONF_API_POSIX_READDIR == 1))

+

+#define FSE_STRESS_TEST_SUPPORTED \

+    (    ((RED_KIT == RED_KIT_COMMERCIAL) || (RED_KIT == RED_KIT_SANDBOX)) \

+      && (REDCONF_OUTPUT == 1) && (REDCONF_READ_ONLY == 0) && (REDCONF_API_FSE == 1) \

+      && (REDCONF_API_FSE_FORMAT == 1) && (REDCONF_API_FSE_TRANSMASKSET == 1) && (REDCONF_API_FSE_TRANSMASKGET == 1) \

+      && (REDCONF_API_FSE_TRUNCATE == 1))

+

+#define POSIX_API_TEST_SUPPORTED \

+    (    ((RED_KIT == RED_KIT_COMMERCIAL) || (RED_KIT == RED_KIT_SANDBOX)) \

+      && (REDCONF_OUTPUT == 1) && (REDCONF_READ_ONLY == 0) && (REDCONF_API_POSIX == 1) \

+      && (REDCONF_API_POSIX_FORMAT == 1) && (REDCONF_API_POSIX_UNLINK == 1))

+

+#define FSE_API_TEST_SUPPORTED \

+   (    ((RED_KIT == RED_KIT_COMMERCIAL) || (RED_KIT == RED_KIT_SANDBOX)) \

+      && (REDCONF_OUTPUT == 1) && (REDCONF_READ_ONLY == 0) && (REDCONF_API_FSE == 1) \

+      && (REDCONF_API_FSE_FORMAT == 1))

+

+#define STOCH_POSIX_TEST_SUPPORTED \

+    (    ((RED_KIT == RED_KIT_COMMERCIAL) || (RED_KIT == RED_KIT_SANDBOX)) \

+      && (REDCONF_OUTPUT == 1) && (REDCONF_READ_ONLY == 0) && (REDCONF_API_POSIX == 1) \

+      && (REDCONF_READ_ONLY == 0) && (REDCONF_API_POSIX_FORMAT == 1) && (REDCONF_API_POSIX_READDIR == 1) \

+      && (REDCONF_API_POSIX_MKDIR == 1) && (REDCONF_API_POSIX_RMDIR == 1) && (REDCONF_API_POSIX_UNLINK == 1) \

+      && (REDCONF_API_POSIX_RENAME == 1))

+

+#define FSIOTEST_SUPPORTED \

+    (    ((RED_KIT == RED_KIT_COMMERCIAL) || (RED_KIT == RED_KIT_SANDBOX)) \

+      && (REDCONF_OUTPUT == 1) && (REDCONF_API_POSIX == 1))

+

+#define BDEVTEST_SUPPORTED \

+    (    ((RED_KIT == RED_KIT_COMMERCIAL) || (RED_KIT == RED_KIT_SANDBOX)) \

+      && (REDCONF_OUTPUT == 1) && (REDCONF_READ_ONLY == 0))

+

+#define DISKFULL_TEST_SUPPORTED \

+   (    ((RED_KIT == RED_KIT_COMMERCIAL) || (RED_KIT == RED_KIT_SANDBOX)) \

+     && (REDCONF_OUTPUT == 1) && (REDCONF_READ_ONLY == 0) && (REDCONF_API_POSIX == 1) \

+     && (REDCONF_API_POSIX_FORMAT == 1) && (REDCONF_API_POSIX_FTRUNCATE == 1))

+

+

+typedef enum

+{

+    PARAMSTATUS_OK,     /* Parameters were good; continue. */

+    PARAMSTATUS_BAD,    /* Parameters were bad; stop. */

+    PARAMSTATUS_HELP    /* Help request; not an error, but stop. */

+} PARAMSTATUS;

+

+

+#if FSSTRESS_SUPPORTED

+typedef struct

+{

+    bool        fNoCleanup; /**< --no-cleanup */

+    uint32_t    ulLoops;    /**< --loops */

+    uint32_t    ulNops;     /**< --nops */

+    bool        fNamePad;   /**< --namepad */

+    uint32_t    ulSeed;     /**< --seed */

+    bool        fVerbose;   /**< --verbose */

+} FSSTRESSPARAM;

+

+PARAMSTATUS FsstressParseParams(int argc, char *argv[], FSSTRESSPARAM *pParam, uint8_t *pbVolNum, const char **ppszDevice);

+void FsstressDefaultParams(FSSTRESSPARAM *pParam);

+int FsstressStart(const FSSTRESSPARAM *pParam);

+#endif

+

+#if STOCH_POSIX_TEST_SUPPORTED

+typedef struct

+{

+    const char *pszVolume;          /**< Volume path prefix. */

+    uint32_t    ulIterations;       /**< --iterations */

+    uint32_t    ulFileListMax;      /**< --files */

+    uint32_t    ulDirListMax;       /**< --dirs */

+    uint32_t    ulOpenFileListMax;  /**< --open-files */

+    uint32_t    ulOpenDirListMax;   /**< --open-dirs */

+    uint32_t    ulRandomSeed;       /**< --seed */

+} STOCHPOSIXPARAM;

+

+PARAMSTATUS RedStochPosixParseParams(int argc, char *argv[], STOCHPOSIXPARAM *pParam, uint8_t *pbVolNum, const char **ppszDevice);

+void RedStochPosixDefaultParams(STOCHPOSIXPARAM *pParam);

+int RedStochPosixStart(const STOCHPOSIXPARAM *pParam);

+#endif

+

+#if FSE_STRESS_TEST_SUPPORTED

+typedef struct

+{

+    uint8_t     bVolNum;        /**< Volume number. */

+    uint32_t    ulFileCount;    /**< --files */

+    uint32_t    ulMaxFileSize;  /**< --max */

+    uint32_t    ulMaxOpSize;    /**< --buffer-size */

+    uint32_t    ulNops;         /**< --nops */

+    uint32_t    ulLoops;        /**< --loops */

+    uint32_t    ulSampleRate;   /**< --sample-rate */

+    uint64_t    ullSeed;        /**< --seed */

+} FSESTRESSPARAM;

+

+PARAMSTATUS FseStressParseParams(int argc, char *argv[], FSESTRESSPARAM *pParam, uint8_t *pbVolNum, const char **ppszDevice);

+void FseStressDefaultParams(FSESTRESSPARAM *pParam);

+int FseStressStart(const FSESTRESSPARAM *pParam);

+#endif

+

+#if POSIX_API_TEST_SUPPORTED

+typedef struct

+{

+    const char *pszVolume;      /**< Volume path prefix. */

+    bool        fQuick;         /**< --quick */

+    bool        fQuitOnFailure; /**< --quit-on-failure */

+    bool        fDebugErrors;   /**< --debug */

+} POSIXTESTPARAM;

+

+PARAMSTATUS RedPosixTestParseParams(int argc, char *argv[], POSIXTESTPARAM *pParam, uint8_t *pbVolNum, const char **ppszDevice);

+void RedPosixTestDefaultParams(POSIXTESTPARAM *pParam);

+int RedPosixTestStart(const POSIXTESTPARAM *pParam);

+#endif

+

+

+#if FSE_API_TEST_SUPPORTED

+typedef struct

+{

+    uint8_t bVolNum;        /**< Volume number. */

+    bool    fQuitOnFailure; /**< --quit-on-failure */

+    bool    fDebugErrors;   /**< --debug */

+} FSETESTPARAM;

+

+PARAMSTATUS RedFseTestParseParams(int argc, char *argv[], FSETESTPARAM *pParam, uint8_t *pbVolNum, const char **ppszDevice);

+void RedFseTestDefaultParams(FSETESTPARAM *pParam);

+int RedFseTestStart(const FSETESTPARAM *pParam);

+#endif

+

+#if FSIOTEST_SUPPORTED

+typedef enum

+{

+    TESTFS_RELEDGE, /* Datalight Reliance Edge */

+    TESTFS_FATFS,   /* ChaN's FatFs */

+    TESTFS_FATSL    /* FreeRTOS+FAT SL */

+} TESTFS;

+

+typedef struct

+{

+    TESTFS      testfs;                 /**< --fs */

+    const char *pszVolume;              /**< Volume path prefix. */

+    bool        fSeqRead;               /**< --seq=r */

+    bool        fSeqWrite;              /**< --seq=w */

+    bool        fSeqRewrite;            /**< --seq=e */

+    bool        fRandomRead;            /**< --rand=r */

+    bool        fRandomWrite;           /**< --rand=w */

+    bool        fMixedWrite;            /**< --mixed */

+    bool        fScanTest;              /**< --scan */

+    uint32_t    ulFSBlockSize;          /**< --block-size */

+    uint32_t    ulMaxFileSize;          /**< --max */

+    uint32_t    ulRandomReadPasses;     /**< --rand-pass=r:w (r part) */

+    uint32_t    ulRandomWritePasses;    /**< --rand-pass=r:w (w part) */

+    uint32_t    ulMixedWritePasses;     /**< --mixed-pass */

+    int32_t     iFlushOnWriteRatio;     /**< --rand-fow */

+    uint32_t    ulBufferMin;            /**< --start */

+    uint32_t    ulBufferSize;           /**< --buffer-size */

+    bool        fWriteVerify;           /**< --verify */

+    uint32_t    ulSampleRate;           /**< --sample-rate */

+    uint32_t    ulScanCount;            /**< --scan-files */

+    uint64_t    ullSeed;                /**< --seed */

+} FSIOTESTPARAM;

+

+PARAMSTATUS FSIOTestParseParams(int argc, char *argv[], FSIOTESTPARAM *pParam, uint8_t *pbVolNum, const char **ppszDevice);

+void FSIOTestDefaultParams(FSIOTESTPARAM *pParam);

+int FSIOTestStart(const FSIOTESTPARAM *pParam);

+#endif

+

+#if BDEVTEST_SUPPORTED

+typedef struct

+{

+    uint8_t     bDrvNum;        /**< Volume number (for sector size/count). */

+    bool        fSeqWrite;      /**< --seq:w */

+    bool        fSeqRead;       /**< --seq:r */

+    bool        fRandWrite;     /**< --rand:w */

+    bool        fRandRead;      /**< --rand:r */

+    uint32_t    ulSampleSecs;   /**< --sample-rate */

+    uint32_t    ulPasses;       /**< --passes */

+    uint32_t    ulMinIOSectors; /**< --count=min[:max] (min part) */

+    uint32_t    ulMaxIOSectors; /**< --count=min[:max] (max part) */

+    uint32_t    ulMaxSizeKB;    /**< --max */

+    uint32_t    ulTestSeconds;  /**< --time */

+    bool        fVerify;        /**< --verify */

+    bool        fAsyncWrites;   /**< --async */

+    uint64_t    ullSeed;        /**< --seed */

+} BDEVTESTPARAM;

+

+PARAMSTATUS BDevTestParseParams(int argc, char *argv[], BDEVTESTPARAM *pParam, uint8_t *pbVolNum, const char **ppszDevice);

+void BDevTestDefaultParams(BDEVTESTPARAM *pParam);

+int BDevTestStart(const BDEVTESTPARAM *pParam);

+#endif

+

+#if DISKFULL_TEST_SUPPORTED

+typedef struct

+{

+    const char *pszVolume;      /**< Volume path prefix. */

+    bool        fQuitOnFailure; /**< --quit-on-failure */

+    bool        fDebugErrors;   /**< --debug */

+} DISKFULLTESTPARAM;

+

+PARAMSTATUS DiskFullTestParseParams(int argc, char *argv[], DISKFULLTESTPARAM *pParam, uint8_t *pbVolNum, const char **ppszDevice);

+void DiskFullTestDefaultParams(DISKFULLTESTPARAM *pParam);

+int DiskFullTestStart(const DISKFULLTESTPARAM *pParam);

+#endif

+

+

+#endif

+

diff --git a/FreeRTOS-Plus/Source/Reliance-Edge/include/redtestutils.h b/FreeRTOS-Plus/Source/Reliance-Edge/include/redtestutils.h
new file mode 100644
index 0000000..294da5b
--- /dev/null
+++ b/FreeRTOS-Plus/Source/Reliance-Edge/include/redtestutils.h
@@ -0,0 +1,71 @@
+/*             ----> DO NOT REMOVE THE FOLLOWING NOTICE <----

+

+                   Copyright (c) 2014-2015 Datalight, Inc.

+                       All Rights Reserved Worldwide.

+

+    This program is free software; you can redistribute it and/or modify

+    it under the terms of the GNU General Public License as published by

+    the Free Software Foundation; use version 2 of the License.

+

+    This program is distributed in the hope that it will be useful,

+    but "AS-IS," WITHOUT ANY WARRANTY; without even the implied warranty

+    of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the

+    GNU General Public License for more details.

+

+    You should have received a copy of the GNU General Public License along

+    with this program; if not, write to the Free Software Foundation, Inc.,

+    51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.

+*/

+/*  Businesses and individuals that for commercial or other reasons cannot

+    comply with the terms of the GPLv2 license may obtain a commercial license

+    before incorporating Reliance Edge into proprietary software for

+    distribution in any form.  Visit http://www.datalight.com/reliance-edge for

+    more information.

+*/

+/** @file

+    @brief Reliance Edge utilities only needed for tests.

+*/

+#ifndef REDTESTUTILS_H

+#define REDTESTUTILS_H

+

+

+#define ISDIGIT(c)  (((c) >= '0') && ((c) <= '9'))

+

+

+void RedRandSeed(uint64_t ullSeed);

+uint64_t RedRand64(uint64_t *pullSeed);

+uint32_t RedRand32(uint32_t *pulSeed);

+

+char *RedRatio(char *pBuffer, uint32_t ulBufferLen, uint64_t ullDividend, uint64_t ullDivisor, uint32_t ulDecPlaces);

+uint64_t RedMulDiv64(uint64_t ullBase, uint32_t ulMultiplier, uint64_t ullDivisor);

+uint64_t RedUint64DivMod32(uint64_t ullDividend, uint32_t ulDivisor, uint32_t *pulRemainder);

+uint64_t RedUint64DivMod64(uint64_t ullDividend, uint64_t ullDivisor, uint64_t *pullRemainder);

+

+char *RedScaleBytes(uint32_t ulByteValue, char *pszBuffer, uint32_t ulBufferSize);

+char *RedScaleKB(uint32_t ulKBValue, char *pszBuffer, uint32_t ulBufferSize);

+uint32_t RedGetKBPerSecond(uint64_t ullKB, uint32_t ulMS);

+uint32_t RedGetKBPerSecondSectors(uint32_t ulBytesPerSector, uint64_t ullSectors, uint64_t ullUS);

+

+int32_t RedAtoI(const char *pszNum);

+const char *RedHtoUL(const char *pszNum, uint32_t *pulNum);

+const char *RedHtoULL(const char *pszNum, uint64_t *pullNum);

+const char *RedNtoUL(const char *pszNum, uint32_t *pulNum);

+const char *RedNtoULL(const char *pszNum, uint64_t *pullNum);

+const char *RedSizeToUL(const char *pszNum, uint32_t *pulResult);

+

+int32_t RedStrICmp(const char *pszStr1, const char *pszStr2);

+int32_t RedStrNICmp(const char *pszStr1, const char *pszStr2, uint32_t ulLen);

+char RedToLower(char c);

+

+#include <stdarg.h>

+

+#if REDCONF_OUTPUT == 1

+void RedPrintf(const char *pszFormat, ...);

+void RedVPrintf(const char *pszFormat, va_list arglist);

+#endif

+int32_t RedSNPrintf(char *pcBuffer, uint32_t ulBufferLen, const char *pszFormat, ...);

+int32_t RedVSNPrintf(char *pcBuffer, uint32_t ulBufferLen, const char *pszFormat, va_list arglist);

+

+

+#endif

+

diff --git a/FreeRTOS-Plus/Source/Reliance-Edge/include/redtoolcmn.h b/FreeRTOS-Plus/Source/Reliance-Edge/include/redtoolcmn.h
new file mode 100644
index 0000000..6a1f14f
--- /dev/null
+++ b/FreeRTOS-Plus/Source/Reliance-Edge/include/redtoolcmn.h
@@ -0,0 +1,36 @@
+/*             ----> DO NOT REMOVE THE FOLLOWING NOTICE <----

+

+                   Copyright (c) 2014-2015 Datalight, Inc.

+                       All Rights Reserved Worldwide.

+

+    This program is free software; you can redistribute it and/or modify

+    it under the terms of the GNU General Public License as published by

+    the Free Software Foundation; use version 2 of the License.

+

+    This program is distributed in the hope that it will be useful,

+    but "AS-IS," WITHOUT ANY WARRANTY; without even the implied warranty

+    of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the

+    GNU General Public License for more details.

+

+    You should have received a copy of the GNU General Public License along

+    with this program; if not, write to the Free Software Foundation, Inc.,

+    51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.

+*/

+/*  Businesses and individuals that for commercial or other reasons cannot

+    comply with the terms of the GPLv2 license may obtain a commercial license

+    before incorporating Reliance Edge into proprietary software for

+    distribution in any form.  Visit http://www.datalight.com/reliance-edge for

+    more information.

+*/

+/** @file

+    @brief Interfaces for common-code utilities for tools and tests.

+*/

+#ifndef REDTOOLCMN_H

+#define REDTOOLCMN_H

+

+

+uint8_t RedFindVolumeNumber(const char *pszVolume);

+

+

+#endif

+

diff --git a/FreeRTOS-Plus/Source/Reliance-Edge/include/redutils.h b/FreeRTOS-Plus/Source/Reliance-Edge/include/redutils.h
new file mode 100644
index 0000000..f2dd663
--- /dev/null
+++ b/FreeRTOS-Plus/Source/Reliance-Edge/include/redutils.h
@@ -0,0 +1,71 @@
+/*             ----> DO NOT REMOVE THE FOLLOWING NOTICE <----

+

+                   Copyright (c) 2014-2015 Datalight, Inc.

+                       All Rights Reserved Worldwide.

+

+    This program is free software; you can redistribute it and/or modify

+    it under the terms of the GNU General Public License as published by

+    the Free Software Foundation; use version 2 of the License.

+

+    This program is distributed in the hope that it will be useful,

+    but "AS-IS," WITHOUT ANY WARRANTY; without even the implied warranty

+    of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the

+    GNU General Public License for more details.

+

+    You should have received a copy of the GNU General Public License along

+    with this program; if not, write to the Free Software Foundation, Inc.,

+    51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.

+*/

+/*  Businesses and individuals that for commercial or other reasons cannot

+    comply with the terms of the GPLv2 license may obtain a commercial license

+    before incorporating Reliance Edge into proprietary software for

+    distribution in any form.  Visit http://www.datalight.com/reliance-edge for

+    more information.

+*/

+/** @file

+*/

+#ifndef REDUTILS_H

+#define REDUTILS_H

+

+

+#if REDCONF_ASSERTS == 1

+#define REDERROR()      RedOsAssertFail(__FILE__, __LINE__)

+#define REDASSERT(EXP)  ((EXP) ? (void)0 : REDERROR())

+#else

+#define REDERROR()      ((void)0)

+#define REDASSERT(EXP)  ((void)0)

+#endif

+

+

+void RedMemCpy(void *pDest, const void *pSrc, uint32_t ulLen);

+void RedMemMove(void *pDest, const void *pSrc, uint32_t ulLen);

+void RedMemSet(void *pDest, uint8_t bVal, uint32_t ulLen);

+int32_t RedMemCmp(const void *pMem1, const void *pMem2, uint32_t ulLen);

+

+uint32_t RedStrLen(const char *pszStr);

+int32_t RedStrCmp(const char *pszStr1, const char *pszStr2);

+int32_t RedStrNCmp(const char *pszStr1, const char *pszStr2, uint32_t ulLen);

+void RedStrNCpy(char *pszDst, const char *pszSrc, uint32_t ulLen);

+

+uint32_t RedCrc32Update(uint32_t ulInitCrc32, const void *pBuffer, uint32_t ulLength);

+uint32_t RedCrcNode(const void *pBuffer);

+

+#if REDCONF_API_POSIX == 1

+uint32_t RedNameLen(const char *pszName);

+#endif

+

+bool RedBitGet(const uint8_t *pbBitmap, uint32_t ulBit);

+void RedBitSet(uint8_t *pbBitmap, uint32_t ulBit);

+void RedBitClear(uint8_t *pbBitmap, uint32_t ulBit);

+

+#ifdef REDCONF_ENDIAN_SWAP

+uint64_t RedRev64(uint64_t ullToRev);

+uint32_t RedRev32(uint32_t ulToRev);

+uint16_t RedRev16(uint16_t uToRev);

+#endif

+

+void RedSignOn(void);

+

+

+#endif

+

diff --git a/FreeRTOS-Plus/Source/Reliance-Edge/include/redver.h b/FreeRTOS-Plus/Source/Reliance-Edge/include/redver.h
new file mode 100644
index 0000000..de4a1a1
--- /dev/null
+++ b/FreeRTOS-Plus/Source/Reliance-Edge/include/redver.h
@@ -0,0 +1,106 @@
+/*             ----> DO NOT REMOVE THE FOLLOWING NOTICE <----
+
+                   Copyright (c) 2014-2015 Datalight, Inc.
+                       All Rights Reserved Worldwide.
+
+    This program is free software; you can redistribute it and/or modify
+    it under the terms of the GNU General Public License as published by
+    the Free Software Foundation; use version 2 of the License.
+
+    This program is distributed in the hope that it will be useful,
+    but "AS-IS," WITHOUT ANY WARRANTY; without even the implied warranty
+    of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+    GNU General Public License for more details.
+
+    You should have received a copy of the GNU General Public License along
+    with this program; if not, write to the Free Software Foundation, Inc.,
+    51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+*/
+/*  Businesses and individuals that for commercial or other reasons cannot
+    comply with the terms of the GPLv2 license may obtain a commercial license
+    before incorporating Reliance Edge into proprietary software for
+    distribution in any form.  Visit http://www.datalight.com/reliance-edge for
+    more information.
+*/
+/** @file
+    @brief Macros for version numbers, build number, and product information.
+*/
+#ifndef REDVER_H
+#define REDVER_H
+
+
+/** @brief Consecutive number assigned to each automated build.
+
+    <!-- This macro is updated automatically: do not edit! -->
+*/
+#define RED_BUILD_NUMBER "664"
+
+#define RED_KIT_GPL         0U  /* Open source GPL kit. */
+#define RED_KIT_COMMERCIAL  1U  /* Commercially-licensed kit. */
+#define RED_KIT_SANDBOX     2U  /* Not a kit: developer sandbox. */
+
+/** @brief Indicates the Reliance Edge kit.
+
+    <!-- This macro is updated automatically: do not edit! -->
+*/
+#define RED_KIT RED_KIT_GPL
+
+
+/** @brief Version number to display in output.
+*/
+#define RED_VERSION "v1.0"
+
+
+/** @brief On-disk version number.
+
+    This is incremented only when the on-disk layout is updated in such a way
+    which is incompatible with previously released versions of the file system.
+*/
+#define RED_DISK_LAYOUT_VERSION 1U
+
+
+/** @brief Base name of the file system product.
+*/
+#define RED_PRODUCT_BASE_NAME "Reliance Edge"
+
+
+/*  Specifies whether the product is in alpha stage, beta stage, or neither.
+*/
+#if 0
+  #if 1
+    #define ALPHABETA   " (Alpha)"
+  #else
+    #define ALPHABETA   " (Beta)"
+  #endif
+#else
+  #define ALPHABETA     ""
+#endif
+
+/** @brief Full product name and version.
+*/
+#define RED_PRODUCT_NAME "Datalight "RED_PRODUCT_BASE_NAME" "RED_VERSION" Build "RED_BUILD_NUMBER ALPHABETA
+
+
+/** @brief Product copyright.
+*/
+#define RED_PRODUCT_LEGAL "Copyright (c) 2014-2015 Datalight, Inc.  All Rights Reserved Worldwide."
+
+
+/** @brief Product patents.
+*/
+#define RED_PRODUCT_PATENT "Patents:  US#7284101."
+
+
+/** @brief Product edition.
+*/
+#if RED_KIT == RED_KIT_GPL
+#define RED_PRODUCT_EDITION "Open-Source GPLv2 Edition -- Compiled "__DATE__" at "__TIME__
+#elif RED_KIT == RED_KIT_COMMERCIAL
+#define RED_PRODUCT_EDITION "Commercial Edition -- Compiled "__DATE__" at "__TIME__
+#else
+#define RED_PRODUCT_EDITION "Developer Sandbox -- Compiled "__DATE__" at "__TIME__
+#endif
+
+
+#endif
+
diff --git a/FreeRTOS-Plus/Source/Reliance-Edge/include/redvolume.h b/FreeRTOS-Plus/Source/Reliance-Edge/include/redvolume.h
new file mode 100644
index 0000000..3b1758e
--- /dev/null
+++ b/FreeRTOS-Plus/Source/Reliance-Edge/include/redvolume.h
@@ -0,0 +1,134 @@
+/*             ----> DO NOT REMOVE THE FOLLOWING NOTICE <----

+

+                   Copyright (c) 2014-2015 Datalight, Inc.

+                       All Rights Reserved Worldwide.

+

+    This program is free software; you can redistribute it and/or modify

+    it under the terms of the GNU General Public License as published by

+    the Free Software Foundation; use version 2 of the License.

+

+    This program is distributed in the hope that it will be useful,

+    but "AS-IS," WITHOUT ANY WARRANTY; without even the implied warranty

+    of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the

+    GNU General Public License for more details.

+

+    You should have received a copy of the GNU General Public License along

+    with this program; if not, write to the Free Software Foundation, Inc.,

+    51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.

+*/

+/*  Businesses and individuals that for commercial or other reasons cannot

+    comply with the terms of the GPLv2 license may obtain a commercial license

+    before incorporating Reliance Edge into proprietary software for

+    distribution in any form.  Visit http://www.datalight.com/reliance-edge for

+    more information.

+*/

+/** @file

+*/

+#ifndef REDVOLUME_H

+#define REDVOLUME_H

+

+

+/** @brief Per-volume configuration structure.

+

+    Contains the configuration values that may differ between volumes.  Must be

+    declared in an array in redconf.c in the Reliance Edge project directory and

+    statically initialized with values representing the volume configuration of

+    the target system.

+*/

+typedef struct

+{

+    /** The sector size for the block device underlying the volume: the basic

+        unit for reading and writing to the storage media.  Commonly ranges

+        between 512 and 4096, but any power-of-two value not greater than the

+        block size will work.

+    */

+    uint32_t    ulSectorSize;

+

+    /** The number of sectors in this file system volume.

+    */

+    uint64_t    ullSectorCount;

+

+    /** Whether a sector write on the block device underlying the volume is

+        atomic.  It is atomic if when the sector write is interrupted, the

+        contents of the sector are guaranteed to be either all of the new data,

+        or all of the old data.  If unsure, leave as false.

+    */

+    bool        fAtomicSectorWrite;

+

+    /** This is the maximum number of inodes (files and directories).  This

+        number includes the root directory inode (inode 2; created during

+        format), but does not include inodes 0 or 1, which do not exist on

+        disk.  The number of inodes cannot be less than 1.

+    */

+    uint32_t    ulInodeCount;

+

+  #if REDCONF_API_POSIX == 1

+    /** The path prefix for the volume; for example, "VOL1:", "FlashDisk", etc.

+    */

+    const char *pszPathPrefix;

+  #endif

+} VOLCONF;

+

+extern const VOLCONF gaRedVolConf[REDCONF_VOLUME_COUNT];

+extern const VOLCONF * CONST_IF_ONE_VOLUME gpRedVolConf;

+

+

+/** @brief Per-volume run-time data.

+*/

+typedef struct

+{

+    /** Whether the volume is currently mounted.

+    */

+    bool        fMounted;

+

+  #if REDCONF_READ_ONLY == 0

+    /** Whether the volume is read-only.

+    */

+    bool        fReadOnly;

+

+    /** The active automatic transaction mask.

+    */

+    uint32_t    ulTransMask;

+  #endif

+

+    /** The power of 2 difference between sector size and block size.

+    */

+    uint8_t     bBlockSectorShift;

+

+    /** The number of logical blocks in this file system volume.  The unit here

+        is the global block size.

+    */

+    uint32_t    ulBlockCount;

+

+    /** The total number of allocable blocks; Also the maximum count of free

+        blocks.

+    */

+    uint32_t    ulBlocksAllocable;

+

+    /** The maximum number of bytes that an inode is capable of addressing.

+    */

+    uint64_t    ullMaxInodeSize;

+

+    /** The current metadata sequence number.  This value is included in all

+        metadata nodes and incremented every time a metadata node is written.

+        It is assumed to never wrap around.

+    */

+    uint64_t    ullSequence;

+} VOLUME;

+

+/*  Array of VOLUME structures, populated at during RedCoreInit().

+*/

+extern VOLUME gaRedVolume[REDCONF_VOLUME_COUNT];

+

+/*  Volume number currently being accessed; populated during

+    RedCoreVolSetCurrent().

+*/

+extern CONST_IF_ONE_VOLUME uint8_t gbRedVolNum;

+

+/*  Pointer to the volume currently being accessed; populated during

+    RedCoreVolSetCurrent().

+*/

+extern VOLUME * CONST_IF_ONE_VOLUME gpRedVolume;

+

+#endif

+

diff --git a/FreeRTOS-Plus/Source/Reliance-Edge/os/freertos/include/redosdeviations.h b/FreeRTOS-Plus/Source/Reliance-Edge/os/freertos/include/redosdeviations.h
new file mode 100644
index 0000000..6a8a592
--- /dev/null
+++ b/FreeRTOS-Plus/Source/Reliance-Edge/os/freertos/include/redosdeviations.h
@@ -0,0 +1,165 @@
+/*             ----> DO NOT REMOVE THE FOLLOWING NOTICE <----

+

+                   Copyright (c) 2014-2015 Datalight, Inc.

+                       All Rights Reserved Worldwide.

+

+    This program is free software; you can redistribute it and/or modify

+    it under the terms of the GNU General Public License as published by

+    the Free Software Foundation; use version 2 of the License.

+

+    This program is distributed in the hope that it will be useful,

+    but "AS-IS," WITHOUT ANY WARRANTY; without even the implied warranty

+    of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the

+    GNU General Public License for more details.

+

+    You should have received a copy of the GNU General Public License along

+    with this program; if not, write to the Free Software Foundation, Inc.,

+    51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.

+*/

+/*  Businesses and individuals that for commercial or other reasons cannot

+    comply with the terms of the GPLv2 license may obtain a commercial license

+    before incorporating Reliance Edge into proprietary software for

+    distribution in any form.  Visit http://www.datalight.com/reliance-edge for

+    more information.

+*/

+/** @file

+    @brief Macros to encapsulate MISRA C:2012 deviations in OS-specific code.

+*/

+#ifndef REDOSDEVIATIONS_H

+#define REDOSDEVIATIONS_H

+

+

+#if REDCONF_OUTPUT == 1

+/*  Needed for PRINT_ASSERT() and OUTPUT_CHARACTER().

+*/

+#include <stdio.h>

+#endif

+

+

+#if REDCONF_ASSERTS == 1

+#if REDCONF_OUTPUT == 1

+/** Print a formatted message for an assertion.

+

+    Usages of this macro deviate from MISRA C:2012 Rule 21.6 (required).  Using

+    printf() is the most convenient way to output this information; and the risk

+    of "unspecified, undefined and implementation-defined" behavior causing

+    problems (as cited in the rationale for the rule) is small.  The driver does

+    not depend on this string being outputted correctly.  Furthermore, use of

+    printf() disappears when either asserts or output are disabled.

+

+    As Rule 21.6 is required, a separate deviation record is required.

+*/

+#define PRINT_ASSERT(file, line) \

+    (void)printf("Assertion failed in \"%s\" at line %u\n\r", ((file) == NULL) ? "" : (file), (unsigned)(line))

+#else

+#define PRINT_ASSERT(file, line) do { (void)(file); (void)(line); } while(false)

+#endif /* REDCONF_OUTPUT == 1 */

+#endif /* REDCONF_ASSERTS == 1 */

+

+

+/** Cast a value to unsigned long.

+

+    Usages of this macro deviate from MISRA C:2012 Directive 4.6.  This macro is

+    used in two places to cast a uint64_t value (used by the block device

+    abstraction for sector numbers) to unsigned long, since third-party code

+    which is not under the control of this project uses unsigned long for sector

+    numbers.  The cast is guaranteed to not lose any information, since when the

+    disk is opened the sector count is verified to be less than or equal to an

+    unsigned long value.  The text of the directive mentions that "it might be

+    desirable not to apply this guideline when interfacing with ... code outside

+    the project's control", which describes the situation for this deviation.

+

+    As Directive 4.6 is advisory, a deviation record is not required.  This

+    notice is the only record of the deviation.

+*/

+#define CAST_ULONG(ull) ((unsigned long)(ull))

+

+

+/** Cast a const-qualified pointer to a pointer which is *not* const-qualified.

+

+    Usages of this macro deviate from MISRA C:2012 Rule 11.8.  This macro is

+    used in exactly one place in order to cope with a poorly designed

+    third-party interface.  Reliance Edge, at every level of the stack, uses

+    const-qualified pointers for buffers used in write operations, since the

+    data is read from the buffer, and the buffer does not need to be modified

+    (consistent with Rule 8.13).  One of the third-party block device interfaces

+    that Reliance Edge interfaces with does not follow this convention: it uses

+    an unqualified pointer for the buffer parameter of its sector write

+    function.  This forces the need for the cast to avoid warnings.  The

+    implementation of the sector write function is provided by the user, so it

+    is to be hoped that the buffer is not actually modified.

+

+    As Rule 11.8 is required, a separate deviation record is required.

+*/

+#define CAST_AWAY_CONST(type, ptr) ((type *)(ptr))

+

+

+/** Allocate zero-initialized (cleared) memory.

+

+    All usages of this macro deviate from MISRA C:2012 Directive 4.12 (required)

+    and Rule 21.3 (required).  In the context of the single place it is actually

+    used, this macro also deviates from Rule 22.1 (required).

+

+    This macro is used in the FreeRTOS block device code in order to allocate a

+    RAM disk, when that implementation of the block device is selected.  The

+    primary rationale for all these deviations is that a) the RAM disk cannot be

+    allocated statically (since the volume information is stored in a

+    structure), and b) the RAM disk is primarily intended as a temporary testing

+    tool for users who want to try out Reliance Edge before the real storage

+    media is available.  In most real systems, Reliance Edge is used with

+    non-volatile storage like SD/MMC or eMMC, not with RAM disks.

+

+    Rule 22.1 states that all resources which are allocated must also be

+    explicitly freed.  The RAM disk is allocated and never freed, deviating from

+    that rule.  This is done because the data in the RAM disk is emulating a

+    non-volatile storage medium, and thus needs to persist even after the block

+    device is closed, to allow the file system to be ormatted and then mounted,

+    or unmounted and remounted in the course of a test.  Thus the memory will

+    remain allocated until the target device is rebooted.  This is assumed to be

+    acceptable for the primary purpose of the RAM disk, which is preliminary

+    testing.

+

+    As Directive 4.12, Rule 21.3, and Rule 22.1 are all required, separate

+    deviation records are required.

+*/

+#define ALLOCATE_CLEARED_MEMORY(nelem, elsize) calloc(nelem, elsize)

+

+

+#if REDCONF_OUTPUT == 1

+/** Output a character to a serial port or other display device.

+

+    Usages of this macro deviate from MISRA C:2012 Rule 21.6 (required).

+    FreeRTOS does not include a standard method of printing characters, so

+    putchar() is the most convenient and portable way to accomplish the task.

+    The risk of "unspecified, undefined and implementation-defined" behavior

+    causing problems (as cited in the rationale for the rule) is small.  The

+    driver does not depend on the character being outputted correctly.

+    Furthermore, use of putchar() disappears when output is disabled.

+

+    As Rule 21.6 is required, a separate deviation record is required.

+*/

+#define OUTPUT_CHARACTER(ch) (void)putchar(ch)

+#endif

+

+

+#if (REDCONF_TASK_COUNT > 1U) && (REDCONF_API_POSIX == 1)

+/** Cast a TaskHandle_t (a pointer type) to uintptr_t.

+

+    Usage of this macro deivate from MISRA-C:2012 Rule 11.4 (advisory).  This

+    macro is used for the FreeRTOS version of RedOsTaskId().  Some RTOSes

+    natively use an integer for task IDs; others use pointers.  RedOsTaskId()

+    uses integers, FreeRTOS uses pointers; to reconcile this difference, the

+    pointer must be cast to integer.  This is fairly safe, since the resulting

+    integer is never cast back to a pointer; and although the integer

+    representation of a pointer is implementation-defined, the representation is

+    irrelevant provided that unique pointers are converted to unique integers.

+

+    As Rule 11.4 is advisory, a deviation record is not required.  This notice

+    is the only record of the deviation.

+*/

+#define CAST_TASK_PTR_TO_UINTPTR(taskptr) ((uintptr_t)(taskptr))

+#endif

+

+

+#endif

+

diff --git a/FreeRTOS-Plus/Source/Reliance-Edge/os/freertos/include/redostypes.h b/FreeRTOS-Plus/Source/Reliance-Edge/os/freertos/include/redostypes.h
new file mode 100644
index 0000000..cf0494a
--- /dev/null
+++ b/FreeRTOS-Plus/Source/Reliance-Edge/os/freertos/include/redostypes.h
@@ -0,0 +1,42 @@
+/*             ----> DO NOT REMOVE THE FOLLOWING NOTICE <----

+

+                   Copyright (c) 2014-2015 Datalight, Inc.

+                       All Rights Reserved Worldwide.

+

+    This program is free software; you can redistribute it and/or modify

+    it under the terms of the GNU General Public License as published by

+    the Free Software Foundation; use version 2 of the License.

+

+    This program is distributed in the hope that it will be useful,

+    but "AS-IS," WITHOUT ANY WARRANTY; without even the implied warranty

+    of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the

+    GNU General Public License for more details.

+

+    You should have received a copy of the GNU General Public License along

+    with this program; if not, write to the Free Software Foundation, Inc.,

+    51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.

+*/

+/*  Businesses and individuals that for commercial or other reasons cannot

+    comply with the terms of the GPLv2 license may obtain a commercial license

+    before incorporating Reliance Edge into proprietary software for

+    distribution in any form.  Visit http://www.datalight.com/reliance-edge for

+    more information.

+*/

+/** @file

+    @brief Defines OS-specific types for use in common code.

+*/

+#ifndef REDOSTYPES_H

+#define REDOSTYPES_H

+

+

+/** @brief Implementation-defined timestamp type.

+

+    This can be an integer, a structure, or a pointer: anything that is

+    convenient for the implementation.  Since the underlying type is not fixed,

+    common code should treat this as an opaque type.

+*/

+typedef uint32_t REDTIMESTAMP;

+

+

+#endif

+

diff --git a/FreeRTOS-Plus/Source/Reliance-Edge/os/freertos/services/osassert.c b/FreeRTOS-Plus/Source/Reliance-Edge/os/freertos/services/osassert.c
new file mode 100644
index 0000000..3b322ce
--- /dev/null
+++ b/FreeRTOS-Plus/Source/Reliance-Edge/os/freertos/services/osassert.c
@@ -0,0 +1,54 @@
+/*             ----> DO NOT REMOVE THE FOLLOWING NOTICE <----

+

+                   Copyright (c) 2014-2015 Datalight, Inc.

+                       All Rights Reserved Worldwide.

+

+    This program is free software; you can redistribute it and/or modify

+    it under the terms of the GNU General Public License as published by

+    the Free Software Foundation; use version 2 of the License.

+

+    This program is distributed in the hope that it will be useful,

+    but "AS-IS," WITHOUT ANY WARRANTY; without even the implied warranty

+    of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the

+    GNU General Public License for more details.

+

+    You should have received a copy of the GNU General Public License along

+    with this program; if not, write to the Free Software Foundation, Inc.,

+    51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.

+*/

+/*  Businesses and individuals that for commercial or other reasons cannot

+    comply with the terms of the GPLv2 license may obtain a commercial license

+    before incorporating Reliance Edge into proprietary software for

+    distribution in any form.  Visit http://www.datalight.com/reliance-edge for

+    more information.

+*/

+/** @file

+    @brief Implements assertion handling.

+*/

+#include <redfs.h>

+

+#if REDCONF_ASSERTS == 1

+

+#include <redosdeviations.h>

+

+

+/** @brief Invoke the native assertion handler.

+

+    @param pszFileName  Null-terminated string containing the name of the file

+                        where the assertion fired.

+    @param ulLineNum    Line number in @p pszFileName where the assertion

+                        fired.

+*/

+void RedOsAssertFail(

+    const char *pszFileName,

+    uint32_t    ulLineNum)

+{

+    PRINT_ASSERT(pszFileName, ulLineNum);

+

+    for( ;; )

+    {

+    }

+}

+

+#endif

+

diff --git a/FreeRTOS-Plus/Source/Reliance-Edge/os/freertos/services/osbdev.c b/FreeRTOS-Plus/Source/Reliance-Edge/os/freertos/services/osbdev.c
new file mode 100644
index 0000000..c486e7c
--- /dev/null
+++ b/FreeRTOS-Plus/Source/Reliance-Edge/os/freertos/services/osbdev.c
@@ -0,0 +1,1213 @@
+/*             ----> DO NOT REMOVE THE FOLLOWING NOTICE <----

+

+                   Copyright (c) 2014-2015 Datalight, Inc.

+                       All Rights Reserved Worldwide.

+

+    This program is free software; you can redistribute it and/or modify

+    it under the terms of the GNU General Public License as published by

+    the Free Software Foundation; use version 2 of the License.

+

+    This program is distributed in the hope that it will be useful,

+    but "AS-IS," WITHOUT ANY WARRANTY; without even the implied warranty

+    of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the

+    GNU General Public License for more details.

+

+    You should have received a copy of the GNU General Public License along

+    with this program; if not, write to the Free Software Foundation, Inc.,

+    51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.

+*/

+/*  Businesses and individuals that for commercial or other reasons cannot

+    comply with the terms of the GPLv2 license may obtain a commercial license

+    before incorporating Reliance Edge into proprietary software for

+    distribution in any form.  Visit http://www.datalight.com/reliance-edge for

+    more information.

+*/

+/** @file

+    @brief Implements block device I/O.

+*/

+#include <FreeRTOS.h>

+

+#include <redfs.h>

+#include <redvolume.h>

+#include <redosdeviations.h>

+

+

+/*------------------------------------------------------------------------------

+    Porting Note:

+

+    Several example implementations of this module for FreeRTOS are available.

+    If you are lucky, you can use one of these implementations; otherwise, these

+    can serve as examples of how to implement this service.

+------------------------------------------------------------------------------*/

+

+/** @brief The F_DRIVER example implementation.

+

+    This implementation is designed to reuse an existing block device driver

+    that was written for FreeRTOS+FAT SL.  If you have such a driver, with

+    little work it can be "dropped in" and used for Reliance Edge.  The only

+    customization required is that gpfnRedOsBDevInit needs to be defined and

+    pointed at the F_DRIVERINIT function.  This can be done in this module or in

+    another C file.

+

+    The disadantage of using the FreeRTOS F_DRIVER functions is that they only

+    support single-sector reads and writes.  Reliance Edge will issue

+    multi-sector requests, and servicing these one sector at a time will

+    significantly slow down the file system.

+*/

+#define BDEV_F_DRIVER       0U

+

+/** @brief The FatFs example implementation.

+

+    This implementation is designed to reuse an existing block device driver

+    that was written for FatFs.  If you have such a driver, it can be linked

+    in and used immediately.  The FatFs `diskio.h` header must be in the include

+    directory path.

+*/

+#define BDEV_FATFS          1U

+

+/** @brief The Atmel Studio Framework SD/MMC driver example implementation.

+

+    This implementation uses a modified version of the open source SD/MMC driver

+    included in the Atmel Studio Framework (ASF) and will work as-is for many

+    varieties of Atmel hardware.  This example assumes relatively minor

+    modifications to the ASF SD/MMC driver to make it support multi-sector read

+    and write requests, which greatly improves performance.  The modified driver

+    is distributed with Reliance Edge and is included in FreeRTOS Atmel projects

+    (such as in projects/freertos/atmel/sam4e-ek/src/ASF).

+

+    This example can easily be modified to work with an unmodified version of

+    the ASF SD/MMC driver.  Simply replace sd_mmc_mem_2_ram_multi() and

+    sd_mmc_ram_2_mem_multi() with sd_mmc_mem_2_ram() and sd_mmc_ram_2_mem()

+    respectively, and add a for loop to loop over each sector in the request.

+    However, as described in the manual, there are considerable performance

+    advantages to issuing real multi-sector requests, so using the modified

+    driver is recommended.

+*/

+#define BDEV_ATMEL_SDMMC    2U

+

+/** @brief The RAM disk example implementation.

+

+    This implementation uses a RAM disk.  It will allow you to compile and test

+    Reliance Edge even if your storage driver is not yet ready.  On typical

+    target hardware, the amount of spare RAM will be limited so generally only

+    very small disks will be available.

+*/

+#define BDEV_RAM_DISK       3U

+

+/** @brief Pick which example implementation is compiled.

+

+    Must be one of:

+    - #BDEV_F_DRIVER

+    - #BDEV_FATFS

+    - #BDEV_ATMEL_SDMMC

+    - #BDEV_RAM_DISK

+*/

+#define BDEV_EXAMPLE_IMPLEMENTATION BDEV_RAM_DISK

+

+

+static REDSTATUS DiskOpen(uint8_t bVolNum, BDEVOPENMODE mode);

+static REDSTATUS DiskClose(uint8_t bVolNum);

+static REDSTATUS DiskRead(uint8_t bVolNum, uint64_t ullSectorStart, uint32_t ulSectorCount, void *pBuffer);

+#if REDCONF_READ_ONLY == 0

+static REDSTATUS DiskWrite(uint8_t bVolNum, uint64_t ullSectorStart, uint32_t ulSectorCount, const void *pBuffer);

+static REDSTATUS DiskFlush(uint8_t bVolNum);

+#endif

+

+

+/** @brief Initialize a block device.

+

+    This function is called when the file system needs access to a block

+    device.

+

+    Upon successful return, the block device should be fully initialized and

+    ready to service read/write/flush/close requests.

+

+    The behavior of calling this function on a block device which is already

+    open is undefined.

+

+    @param bVolNum  The volume number of the volume whose block device is being

+                    initialized.

+    @param mode     The open mode, indicating the type of access required.

+

+    @return A negated ::REDSTATUS code indicating the operation result.

+

+    @retval 0           Operation was successful.

+    @retval -RED_EINVAL @p bVolNum is an invalid volume number.

+    @retval -RED_EIO    A disk I/O error occurred.

+*/

+REDSTATUS RedOsBDevOpen(

+    uint8_t         bVolNum,

+    BDEVOPENMODE    mode)

+{

+    REDSTATUS       ret;

+

+    if(bVolNum >= REDCONF_VOLUME_COUNT)

+    {

+        ret = -RED_EINVAL;

+    }

+    else

+    {

+        ret = DiskOpen(bVolNum, mode);

+    }

+

+    return ret;

+}

+

+

+/** @brief Uninitialize a block device.

+

+    This function is called when the file system no longer needs access to a

+    block device.  If any resource were allocated by RedOsBDevOpen() to service

+    block device requests, they should be freed at this time.

+

+    Upon successful return, the block device must be in such a state that it

+    can be opened again.

+

+    The behavior of calling this function on a block device which is already

+    closed is undefined.

+

+    @param bVolNum  The volume number of the volume whose block device is being

+                    uninitialized.

+

+    @return A negated ::REDSTATUS code indicating the operation result.

+

+    @retval 0           Operation was successful.

+    @retval -RED_EINVAL @p bVolNum is an invalid volume number.

+*/

+REDSTATUS RedOsBDevClose(

+    uint8_t     bVolNum)

+{

+    REDSTATUS   ret;

+

+    if(bVolNum >= REDCONF_VOLUME_COUNT)

+    {

+        ret = -RED_EINVAL;

+    }

+    else

+    {

+        ret = DiskClose(bVolNum);

+    }

+

+    return ret;

+}

+

+

+/** @brief Read sectors from a physical block device.

+

+    The behavior of calling this function is undefined if the block device is

+    closed or if it was opened with ::BDEV_O_WRONLY.

+

+    @param bVolNum          The volume number of the volume whose block device

+                            is being read from.

+    @param ullSectorStart   The starting sector number.

+    @param ulSectorCount    The number of sectors to read.

+    @param pBuffer          The buffer into which to read the sector data.

+

+    @return A negated ::REDSTATUS code indicating the operation result.

+

+    @retval 0           Operation was successful.

+    @retval -RED_EINVAL @p bVolNum is an invalid volume number, @p pBuffer is

+                        `NULL`, or @p ullStartSector and/or @p ulSectorCount

+                        refer to an invalid range of sectors.

+    @retval -RED_EIO    A disk I/O error occurred.

+*/

+REDSTATUS RedOsBDevRead(

+    uint8_t     bVolNum,

+    uint64_t    ullSectorStart,

+    uint32_t    ulSectorCount,

+    void       *pBuffer)

+{

+    REDSTATUS   ret = 0;

+

+    if(    (bVolNum >= REDCONF_VOLUME_COUNT)

+        || (ullSectorStart >= gaRedVolConf[bVolNum].ullSectorCount)

+        || ((gaRedVolConf[bVolNum].ullSectorCount - ullSectorStart) < ulSectorCount)

+        || (pBuffer == NULL))

+    {

+        ret = -RED_EINVAL;

+    }

+    else

+    {

+        ret = DiskRead(bVolNum, ullSectorStart, ulSectorCount, pBuffer);

+    }

+

+    return ret;

+}

+

+

+#if REDCONF_READ_ONLY == 0

+/** @brief Write sectors to a physical block device.

+

+    The behavior of calling this function is undefined if the block device is

+    closed or if it was opened with ::BDEV_O_RDONLY.

+

+    @param bVolNum          The volume number of the volume whose block device

+                            is being written to.

+    @param ullSectorStart   The starting sector number.

+    @param ulSectorCount    The number of sectors to write.

+    @param pBuffer          The buffer from which to write the sector data.

+

+    @return A negated ::REDSTATUS code indicating the operation result.

+

+    @retval 0           Operation was successful.

+    @retval -RED_EINVAL @p bVolNum is an invalid volume number, @p pBuffer is

+                        `NULL`, or @p ullStartSector and/or @p ulSectorCount

+                        refer to an invalid range of sectors.

+    @retval -RED_EIO    A disk I/O error occurred.

+*/

+REDSTATUS RedOsBDevWrite(

+    uint8_t     bVolNum,

+    uint64_t    ullSectorStart,

+    uint32_t    ulSectorCount,

+    const void *pBuffer)

+{

+    REDSTATUS   ret = 0;

+

+    if(    (bVolNum >= REDCONF_VOLUME_COUNT)

+        || (ullSectorStart >= gaRedVolConf[bVolNum].ullSectorCount)

+        || ((gaRedVolConf[bVolNum].ullSectorCount - ullSectorStart) < ulSectorCount)

+        || (pBuffer == NULL))

+    {

+        ret = -RED_EINVAL;

+    }

+    else

+    {

+        ret = DiskWrite(bVolNum, ullSectorStart, ulSectorCount, pBuffer);

+    }

+

+    return ret;

+}

+

+

+/** @brief Flush any caches beneath the file system.

+

+    This function must synchronously flush all software and hardware caches

+    beneath the file system, ensuring that all sectors written previously are

+    committed to permanent storage.

+

+    If the environment has no caching beneath the file system, the

+    implementation of this function can do nothing and return success.

+

+    The behavior of calling this function is undefined if the block device is

+    closed or if it was opened with ::BDEV_O_RDONLY.

+

+    @param bVolNum  The volume number of the volume whose block device is being

+                    flushed.

+

+    @return A negated ::REDSTATUS code indicating the operation result.

+

+    @retval 0           Operation was successful.

+    @retval -RED_EINVAL @p bVolNum is an invalid volume number.

+    @retval -RED_EIO    A disk I/O error occurred.

+*/

+REDSTATUS RedOsBDevFlush(

+    uint8_t     bVolNum)

+{

+    REDSTATUS   ret;

+

+    if(bVolNum >= REDCONF_VOLUME_COUNT)

+    {

+        ret = -RED_EINVAL;

+    }

+    else

+    {

+        ret = DiskFlush(bVolNum);

+    }

+

+    return ret;

+}

+#endif /* REDCONF_READ_ONLY == 0 */

+

+

+#if BDEV_EXAMPLE_IMPLEMENTATION == BDEV_F_DRIVER

+

+#include <api_mdriver.h>

+

+

+/*  This must be declared and initialized elsewere (e.g., in project code) to

+    point at the initialization function for the F_DRIVER block device.

+*/

+extern const F_DRIVERINIT gpfnRedOsBDevInit;

+

+static F_DRIVER *gapFDriver[REDCONF_VOLUME_COUNT];

+

+

+/** @brief Initialize a disk.

+

+    @param bVolNum  The volume number of the volume whose block device is being

+                    initialized.

+    @param mode     The open mode, indicating the type of access required.

+

+    @return A negated ::REDSTATUS code indicating the operation result.

+

+    @retval 0           Operation was successful.

+    @retval -RED_EIO    A disk I/O error occurred.

+*/

+static REDSTATUS DiskOpen(

+    uint8_t         bVolNum,

+    BDEVOPENMODE    mode)

+{

+    REDSTATUS       ret;

+

+    (void)mode;

+

+    if((gpfnRedOsBDevInit == NULL) || (gapFDriver[bVolNum] != NULL))

+    {

+        ret = -RED_EINVAL;

+    }

+    else

+    {

+        F_DRIVER *pDriver;

+

+        pDriver = gpfnRedOsBDevInit(bVolNum);

+        if(pDriver != NULL)

+        {

+            F_PHY   geom;

+            int     iErr;

+

+            /*  Validate that the geometry is consistent with the volume

+                configuration.

+            */

+            iErr = pDriver->getphy(pDriver, &geom);

+            if(iErr == 0)

+            {

+                if(    (geom.bytes_per_sector != gaRedVolConf[bVolNum].ulSectorSize)

+                    || (geom.number_of_sectors < gaRedVolConf[bVolNum].ullSectorCount))

+                {

+                    ret = -RED_EINVAL;

+                }

+                else

+                {

+                    gapFDriver[bVolNum] = pDriver;

+                    ret = 0;

+                }

+            }

+            else

+            {

+                ret = -RED_EIO;

+            }

+

+            if(ret != 0)

+            {

+                pDriver->release(pDriver);

+            }

+        }

+        else

+        {

+            ret = -RED_EIO;

+        }

+    }

+

+    return ret;

+}

+

+

+/** @brief Uninitialize a disk.

+

+    @param bVolNum  The volume number of the volume whose block device is being

+                    uninitialized.

+

+    @return A negated ::REDSTATUS code indicating the operation result.

+

+    @retval 0   Operation was successful.

+*/

+static REDSTATUS DiskClose(

+    uint8_t     bVolNum)

+{

+    REDSTATUS   ret;

+

+    if(gapFDriver[bVolNum] == NULL)

+    {

+        ret = -RED_EINVAL;

+    }

+    else

+    {

+        gapFDriver[bVolNum]->release(gapFDriver[bVolNum]);

+        gapFDriver[bVolNum] = NULL;

+

+        ret = 0;

+    }

+

+    return ret;

+}

+

+

+/** @brief Read sectors from a disk.

+

+    @param bVolNum          The volume number of the volume whose block device

+                            is being read from.

+    @param ullSectorStart   The starting sector number.

+    @param ulSectorCount    The number of sectors to read.

+    @param pBuffer          The buffer into which to read the sector data.

+

+    @return A negated ::REDSTATUS code indicating the operation result.

+

+    @retval 0           Operation was successful.

+    @retval -RED_EIO    A disk I/O error occurred.

+*/

+static REDSTATUS DiskRead(

+    uint8_t     bVolNum,

+    uint64_t    ullSectorStart,

+    uint32_t    ulSectorCount,

+    void       *pBuffer)

+{

+    REDSTATUS   ret = 0;

+    F_DRIVER   *pDriver = gapFDriver[bVolNum];

+

+    if(pDriver == NULL)

+    {

+        ret = -RED_EINVAL;

+    }

+    else

+    {

+        uint8_t    *pbBuffer = CAST_VOID_PTR_TO_UINT8_PTR(pBuffer);

+        uint32_t    ulSectorSize = gaRedVolConf[bVolNum].ulSectorSize;

+        uint32_t    ulSectorIdx;

+        int         iErr;

+

+        for(ulSectorIdx = 0U; ulSectorIdx < ulSectorCount; ulSectorIdx++)

+        {

+            iErr = pDriver->readsector(pDriver, &pbBuffer[ulSectorIdx * ulSectorSize],

+                                       CAST_ULONG(ullSectorStart + ulSectorCount));

+            if(iErr != 0)

+            {

+                ret = -RED_EIO;

+                break;

+            }

+        }

+    }

+

+    return ret;

+}

+

+

+#if REDCONF_READ_ONLY == 0

+/** @brief Write sectors to a disk.

+

+    @param bVolNum          The volume number of the volume whose block device

+                            is being written to.

+    @param ullSectorStart   The starting sector number.

+    @param ulSectorCount    The number of sectors to write.

+    @param pBuffer          The buffer from which to write the sector data.

+

+    @return A negated ::REDSTATUS code indicating the operation result.

+

+    @retval 0           Operation was successful.

+    @retval -RED_EINVAL The block device is not open.

+    @retval -RED_EIO    A disk I/O error occurred.

+*/

+static REDSTATUS DiskWrite(

+    uint8_t     bVolNum,

+    uint64_t    ullSectorStart,

+    uint32_t    ulSectorCount,

+    const void *pBuffer)

+{

+    REDSTATUS   ret = 0;

+    F_DRIVER   *pDriver = gapFDriver[bVolNum];

+

+    if(pDriver == NULL)

+    {

+        ret = -RED_EINVAL;

+    }

+    else

+    {

+        const uint8_t  *pbBuffer = CAST_VOID_PTR_TO_CONST_UINT8_PTR(pBuffer);

+        uint32_t        ulSectorSize = gaRedVolConf[bVolNum].ulSectorSize;

+        uint32_t        ulSectorIdx;

+        int             iErr;

+

+        for(ulSectorIdx = 0U; ulSectorIdx < ulSectorCount; ulSectorIdx++)

+        {

+            /*  We have to cast pbBuffer to non-const since the writesector

+                prototype is flawed, using a non-const pointer for the buffer.

+            */

+            iErr = pDriver->writesector(pDriver, CAST_AWAY_CONST(uint8_t, &pbBuffer[ulSectorIdx * ulSectorSize]),

+                                        CAST_ULONG(ullSectorStart + ulSectorCount));

+            if(iErr != 0)

+            {

+                ret = -RED_EIO;

+                break;

+            }

+        }

+    }

+

+    return ret;

+}

+

+

+/** @brief Flush any caches beneath the file system.

+

+    @param bVolNum  The volume number of the volume whose block device is being

+                    flushed.

+

+    @return A negated ::REDSTATUS code indicating the operation result.

+

+    @retval 0   Operation was successful.

+*/

+static REDSTATUS DiskFlush(

+    uint8_t     bVolNum)

+{

+    REDSTATUS   ret;

+

+    if(gapFDriver[bVolNum] == NULL)

+    {

+        ret = -RED_EINVAL;

+    }

+    else

+    {

+        /*  The F_DRIVER interface does not include a flush function, so to be

+            reliable the F_DRIVER implementation must use synchronous writes.

+        */

+        ret = 0;

+    }

+

+    return ret;

+}

+#endif /* REDCONF_READ_ONLY == 0 */

+

+

+#elif BDEV_EXAMPLE_IMPLEMENTATION == BDEV_FATFS

+

+#include <task.h>

+#include <diskio.h>

+

+/*  disk_read() and disk_write() use an unsigned 8-bit value to specify the

+    sector count, so no transfer can be larger than 255 sectors.

+*/

+#define MAX_SECTOR_TRANSFER UINT8_MAX

+

+

+/** @brief Initialize a disk.

+

+    @param bVolNum  The volume number of the volume whose block device is being

+                    initialized.

+    @param mode     The open mode, indicating the type of access required.

+

+    @return A negated ::REDSTATUS code indicating the operation result.

+

+    @retval 0           Operation was successful.

+    @retval -RED_EIO    A disk I/O error occurred.

+*/

+static REDSTATUS DiskOpen(

+    uint8_t         bVolNum,

+    BDEVOPENMODE    mode)

+{

+    DSTATUS         status;

+    uint32_t        ulTries;

+    REDSTATUS       ret = 0;

+

+    /*  With some implementations of disk_initialize(), such as the one

+        implemented by Atmel for the ASF, the first time the disk is opened, the

+        SD card can take a while to get ready, in which time disk_initialize()

+        returns an error.  Try numerous times, waiting half a second after each

+        failure.  Empirically, this has been observed to succeed on the second

+        try, so trying 10x more than that provides a margin of error.

+    */

+    for(ulTries = 0U; ulTries < 20U; ulTries++)

+    {

+        /*  Assuming that the volume number is also the correct drive number.

+            If this is not the case in your environment, a static constant array

+            can be declared to map volume numbers to the correct driver number.

+        */

+        status = disk_initialize(bVolNum);

+        if(status == 0)

+        {

+            break;

+        }

+

+        vTaskDelay(500U / portTICK_PERIOD_MS);

+    }

+

+    if(status != 0)

+    {

+        ret = -RED_EIO;

+    }

+

+    /*  Retrieve the sector size and sector count to ensure they are compatible

+        with our compile-time geometry.

+    */

+    if(ret == 0)

+    {

+        WORD    wSectorSize;

+        DWORD   dwSectorCount;

+        DRESULT result;

+

+        result = disk_ioctl(bVolNum, GET_SECTOR_SIZE, &wSectorSize);

+        if(result == RES_OK)

+        {

+            result = disk_ioctl(bVolNum, GET_SECTOR_COUNT, &dwSectorCount);

+            if(result == RES_OK)

+            {

+                if(    (wSectorSize != gaRedVolConf[bVolNum].ulSectorSize)

+                    || (dwSectorCount < gaRedVolConf[bVolNum].ullSectorCount))

+                {

+                    ret = -RED_EINVAL;

+                }

+            }

+            else

+            {

+                ret = -RED_EIO;

+            }

+        }

+        else

+        {

+            ret = -RED_EIO;

+        }

+    }

+

+    return ret;

+}

+

+

+/** @brief Uninitialize a disk.

+

+    @param bVolNum  The volume number of the volume whose block device is being

+                    uninitialized.

+

+    @return A negated ::REDSTATUS code indicating the operation result.

+

+    @retval 0   Operation was successful.

+*/

+static REDSTATUS DiskClose(

+    uint8_t     bVolNum)

+{

+    (void)bVolNum;

+    return 0;

+}

+

+

+/** @brief Read sectors from a disk.

+

+    @param bVolNum          The volume number of the volume whose block device

+                            is being read from.

+    @param ullSectorStart   The starting sector number.

+    @param ulSectorCount    The number of sectors to read.

+    @param pBuffer          The buffer into which to read the sector data.

+

+    @return A negated ::REDSTATUS code indicating the operation result.

+

+    @retval 0           Operation was successful.

+    @retval -RED_EIO    A disk I/O error occurred.

+*/

+static REDSTATUS DiskRead(

+    uint8_t     bVolNum,

+    uint64_t    ullSectorStart,

+    uint32_t    ulSectorCount,

+    void       *pBuffer)

+{

+    REDSTATUS   ret = 0;

+    uint32_t    ulSectorIdx = 0U;

+    uint32_t    ulSectorSize = gaRedVolConf[bVolNum].ulSectorSize;

+    uint8_t    *pbBuffer = CAST_VOID_PTR_TO_UINT8_PTR(pBuffer);

+

+    while(ulSectorIdx < ulSectorCount)

+    {

+        uint32_t    ulTransfer = REDMIN(ulSectorCount - ulSectorIdx, MAX_SECTOR_TRANSFER);

+        DRESULT     result;

+

+        result = disk_read(bVolNum, &pbBuffer[ulSectorIdx * ulSectorSize], (DWORD)(ullSectorStart + ulSectorIdx), (BYTE)ulTransfer);

+        if(result != RES_OK)

+        {

+            ret = -RED_EIO;

+            break;

+        }

+

+        ulSectorIdx += ulTransfer;

+    }

+

+    return ret;

+}

+

+

+#if REDCONF_READ_ONLY == 0

+/** @brief Write sectors to a disk.

+

+    @param bVolNum          The volume number of the volume whose block device

+                            is being written to.

+    @param ullSectorStart   The starting sector number.

+    @param ulSectorCount    The number of sectors to write.

+    @param pBuffer          The buffer from which to write the sector data.

+

+    @return A negated ::REDSTATUS code indicating the operation result.

+

+    @retval 0           Operation was successful.

+    @retval -RED_EIO    A disk I/O error occurred.

+*/

+static REDSTATUS DiskWrite(

+    uint8_t         bVolNum,

+    uint64_t        ullSectorStart,

+    uint32_t        ulSectorCount,

+    const void     *pBuffer)

+{

+    REDSTATUS       ret = 0;

+    uint32_t        ulSectorIdx = 0U;

+    uint32_t        ulSectorSize = gaRedVolConf[bVolNum].ulSectorSize;

+    const uint8_t  *pbBuffer = CAST_VOID_PTR_TO_CONST_UINT8_PTR(pBuffer);

+

+    while(ulSectorIdx < ulSectorCount)

+    {

+        uint32_t    ulTransfer = REDMIN(ulSectorCount - ulSectorIdx, MAX_SECTOR_TRANSFER);

+        DRESULT     result;

+

+        result = disk_write(bVolNum, &pbBuffer[ulSectorIdx * ulSectorSize], (DWORD)(ullSectorStart + ulSectorIdx), (BYTE)ulTransfer);

+        if(result != RES_OK)

+        {

+            ret = -RED_EIO;

+            break;

+        }

+

+        ulSectorIdx += ulTransfer;

+    }

+

+    return ret;

+}

+

+

+/** @brief Flush any caches beneath the file system.

+

+    @param bVolNum  The volume number of the volume whose block device is being

+                    flushed.

+

+    @return A negated ::REDSTATUS code indicating the operation result.

+

+    @retval 0   Operation was successful.

+*/

+static REDSTATUS DiskFlush(

+    uint8_t     bVolNum)

+{

+    REDSTATUS   ret;

+    DRESULT     result;

+

+    result = disk_ioctl(bVolNum, CTRL_SYNC, NULL);

+    if(result == RES_OK)

+    {

+        ret = 0;

+    }

+    else

+    {

+        ret = -RED_EIO;

+    }

+

+    return ret;

+}

+#endif /* REDCONF_READ_ONLY == 0 */

+

+

+#elif BDEV_EXAMPLE_IMPLEMENTATION == BDEV_ATMEL_SDMMC

+

+#include <task.h>

+

+#include <conf_sd_mmc.h>

+#include <sd_mmc.h>

+#include <sd_mmc_mem.h>

+#include <ctrl_access.h>

+

+/*  sd_mmc_mem_2_ram_multi() and sd_mmc_ram_2_mem_multi() use an unsigned

+    16-bit value to specify the sector count, so no transfer can be larger

+    than UINT16_MAX sectors.

+*/

+#define MAX_SECTOR_TRANSFER UINT16_MAX

+

+

+/** @brief Initialize a disk.

+

+    @param bVolNum  The volume number of the volume whose block device is being

+                    initialized.

+    @param mode     The open mode, indicating the type of access required.

+

+    @return A negated ::REDSTATUS code indicating the operation result.

+

+    @retval 0           Operation was successful.

+    @retval -RED_EIO    A disk I/O error occurred.

+    @retval -RED_EROFS  The device is read-only media and write access was

+                        requested.

+*/

+static REDSTATUS DiskOpen(

+    uint8_t         bVolNum,

+    BDEVOPENMODE    mode)

+{

+    REDSTATUS       ret = 0;

+    uint32_t        ulTries;

+    Ctrl_status     cs;

+

+    /*  Note: Assuming the volume number is the same as the SD card slot.  The

+        ASF SD/MMC driver supports two SD slots.  This implementation will need

+        to be modified if multiple volumes share a single SD card.

+    */

+

+    /*  The first time the disk is opened, the SD card can take a while to get

+        ready, in which time sd_mmc_test_unit_ready() returns either CTRL_BUSY

+        or CTRL_NO_PRESENT.  Try numerous times, waiting half a second after

+        each failure.  Empirically, this has been observed to succeed on the

+        second try, so trying 10x more than that provides a margin of error.

+    */

+    for(ulTries = 0U; ulTries < 20U; ulTries++)

+    {

+        cs = sd_mmc_test_unit_ready(bVolNum);

+        if((cs != CTRL_NO_PRESENT) && (cs != CTRL_BUSY))

+        {

+            break;

+        }

+

+        vTaskDelay(500U / portTICK_PERIOD_MS);

+    }

+

+    if(cs == CTRL_GOOD)

+    {

+      #if REDCONF_READ_ONLY == 0

+        if(mode != BDEV_O_RDONLY)

+        {

+            if(sd_mmc_wr_protect(bVolNum))

+            {

+                ret = -RED_EROFS;

+            }

+        }

+

+        if(ret == 0)

+      #endif

+        {

+            uint32_t ulSectorLast;

+

+            (void)sd_mmc_read_capacity(bVolNum, &ulSectorLast);

+

+            /*  The ASF SD/MMC driver only supports 512-byte sectors.

+            */

+            if(    (gaRedVolConf[bVolNum].ulSectorSize != 512U)

+                || (((uint64_t)ulSectorLast + 1U) < gaRedVolConf[bVolNum].ullSectorCount))

+            {

+                ret = -RED_EINVAL;

+            }

+        }

+    }

+    else

+    {

+        ret = -RED_EIO;

+    }

+

+    return ret;

+}

+

+

+/** @brief Uninitialize a disk.

+

+    @param bVolNum  The volume number of the volume whose block device is being

+                    uninitialized.

+

+    @return A negated ::REDSTATUS code indicating the operation result.

+

+    @retval 0   Operation was successful.

+*/

+static REDSTATUS DiskClose(

+    uint8_t     bVolNum)

+{

+    (void)bVolNum;

+    return 0;

+}

+

+

+/** @brief Read sectors from a disk.

+

+    @param bVolNum          The volume number of the volume whose block device

+                            is being read from.

+    @param ullSectorStart   The starting sector number.

+    @param ulSectorCount    The number of sectors to read.

+    @param pBuffer          The buffer into which to read the sector data.

+

+    @return A negated ::REDSTATUS code indicating the operation result.

+

+    @retval 0   Operation was successful.

+*/

+static REDSTATUS DiskRead(

+    uint8_t     bVolNum,

+    uint64_t    ullSectorStart,

+    uint32_t    ulSectorCount,

+    void       *pBuffer)

+{

+    REDSTATUS   ret = 0;

+    uint32_t    ulSectorIdx = 0U;

+    uint32_t    ulSectorSize = gaRedVolConf[bVolNum].ulSectorSize;

+    uint8_t    *pbBuffer = CAST_VOID_PTR_TO_UINT8_PTR(pBuffer);

+

+    while(ulSectorIdx < ulSectorCount)

+    {

+        uint32_t    ulTransfer = REDMIN(ulSectorCount - ulSectorIdx, MAX_SECTOR_TRANSFER);

+        Ctrl_status cs;

+

+        cs = sd_mmc_mem_2_ram_multi(bVolNum, (uint32_t)(ullSectorStart + ulSectorIdx),

+                                    (uint16_t)ulTransfer, &pbBuffer[ulSectorIdx * ulSectorSize]);

+        if(cs != CTRL_GOOD)

+        {

+            ret = -RED_EIO;

+            break;

+        }

+

+        ulSectorIdx += ulTransfer;

+    }

+

+    return ret;

+}

+

+

+#if REDCONF_READ_ONLY == 0

+/** @brief Write sectors to a disk.

+

+    @param bVolNum          The volume number of the volume whose block device

+                            is being written to.

+    @param ullSectorStart   The starting sector number.

+    @param ulSectorCount    The number of sectors to write.

+    @param pBuffer          The buffer from which to write the sector data.

+

+    @return A negated ::REDSTATUS code indicating the operation result.

+

+    @retval 0   Operation was successful.

+*/

+static REDSTATUS DiskWrite(

+    uint8_t         bVolNum,

+    uint64_t        ullSectorStart,

+    uint32_t        ulSectorCount,

+    const void     *pBuffer)

+{

+    REDSTATUS       ret = 0;

+    uint32_t        ulSectorIdx = 0U;

+    uint32_t        ulSectorSize = gaRedVolConf[bVolNum].ulSectorSize;

+    const uint8_t  *pbBuffer = CAST_VOID_PTR_TO_CONST_UINT8_PTR(pBuffer);

+

+    while(ulSectorIdx < ulSectorCount)

+    {

+        uint32_t    ulTransfer = REDMIN(ulSectorCount - ulSectorIdx, MAX_SECTOR_TRANSFER);

+        Ctrl_status cs;

+

+        cs = sd_mmc_ram_2_mem_multi(bVolNum, (uint32_t)(ullSectorStart + ulSectorIdx),

+                                    (uint16_t)ulTransfer, &pbBuffer[ulSectorIdx * ulSectorSize]);

+        if(cs != CTRL_GOOD)

+        {

+            ret = -RED_EIO;

+            break;

+        }

+

+        ulSectorIdx += ulTransfer;

+    }

+

+    return ret;

+}

+

+

+/** @brief Flush any caches beneath the file system.

+

+    @param bVolNum  The volume number of the volume whose block device is being

+                    flushed.

+

+    @return A negated ::REDSTATUS code indicating the operation result.

+

+    @retval 0   Operation was successful.

+*/

+static REDSTATUS DiskFlush(

+    uint8_t     bVolNum)

+{

+    REDSTATUS   ret;

+    Ctrl_status cs;

+

+    /*  The ASF SD/MMC driver appears to write sectors synchronously, so it

+        should be fine to do nothing and return success.  However, Atmel's

+        implementation of the FatFs diskio.c file does the equivalent of the

+        below when the disk is flushed.  Just in case this is important for some

+        non-obvious reason, do the same.

+    */

+    cs = sd_mmc_test_unit_ready(bVolNum);

+    if(cs == CTRL_GOOD)

+    {

+        ret = 0;

+    }

+    else

+    {

+        ret = -RED_EIO;

+    }

+

+    return ret;

+}

+#endif /* REDCONF_READ_ONLY == 0 */

+

+

+#elif BDEV_EXAMPLE_IMPLEMENTATION == BDEV_RAM_DISK

+

+#include <stdlib.h> /* For ALLOCATE_CLEARED_MEMORY(), which expands to calloc(). */

+

+

+static uint8_t *gapbRamDisk[REDCONF_VOLUME_COUNT];

+

+

+/** @brief Initialize a disk.

+

+    @param bVolNum  The volume number of the volume whose block device is being

+                    initialized.

+    @param mode     The open mode, indicating the type of access required.

+

+    @return A negated ::REDSTATUS code indicating the operation result.

+

+    @retval 0           Operation was successful.

+    @retval -RED_EIO    A disk I/O error occurred.

+*/

+static REDSTATUS DiskOpen(

+    uint8_t         bVolNum,

+    BDEVOPENMODE    mode)

+{

+    REDSTATUS       ret = 0;

+

+    (void)mode;

+

+    if(gapbRamDisk[bVolNum] == NULL)

+    {

+        gapbRamDisk[bVolNum] = ALLOCATE_CLEARED_MEMORY(gaRedVolume[bVolNum].ulBlockCount, REDCONF_BLOCK_SIZE);

+        if(gapbRamDisk[bVolNum] == NULL)

+        {

+            ret = -RED_EIO;

+        }

+    }

+

+    return ret;

+}

+

+

+/** @brief Uninitialize a disk.

+

+    @param bVolNum  The volume number of the volume whose block device is being

+                    uninitialized.

+

+    @return A negated ::REDSTATUS code indicating the operation result.

+

+    @retval 0   Operation was successful.

+*/

+static REDSTATUS DiskClose(

+    uint8_t     bVolNum)

+{

+    REDSTATUS   ret;

+

+    if(gapbRamDisk[bVolNum] == NULL)

+    {

+        ret = -RED_EINVAL;

+    }

+    else

+    {

+        /*  This implementation uses dynamically allocated memory, but must

+            retain previously written data after the block device is closed, and

+            thus the memory cannot be freed and will remain allocated until

+            reboot.

+        */

+        ret = 0;

+    }

+

+    return ret;

+}

+

+

+/** @brief Read sectors from a disk.

+

+    @param bVolNum          The volume number of the volume whose block device

+                            is being read from.

+    @param ullSectorStart   The starting sector number.

+    @param ulSectorCount    The number of sectors to read.

+    @param pBuffer          The buffer into which to read the sector data.

+

+    @return A negated ::REDSTATUS code indicating the operation result.

+

+    @retval 0   Operation was successful.

+*/

+static REDSTATUS DiskRead(

+    uint8_t     bVolNum,

+    uint64_t    ullSectorStart,

+    uint32_t    ulSectorCount,

+    void       *pBuffer)

+{

+    REDSTATUS   ret;

+

+    if(gapbRamDisk[bVolNum] == NULL)

+    {

+        ret = -RED_EINVAL;

+    }

+    else

+    {

+        uint64_t ullByteOffset = ullSectorStart * gaRedVolConf[bVolNum].ulSectorSize;

+        uint32_t ulByteCount = ulSectorCount * gaRedVolConf[bVolNum].ulSectorSize;

+

+        RedMemCpy(pBuffer, &gapbRamDisk[bVolNum][ullByteOffset], ulByteCount);

+

+        ret = 0;

+    }

+

+    return ret;

+}

+

+

+#if REDCONF_READ_ONLY == 0

+/** @brief Write sectors to a disk.

+

+    @param bVolNum          The volume number of the volume whose block device

+                            is being written to.

+    @param ullSectorStart   The starting sector number.

+    @param ulSectorCount    The number of sectors to write.

+    @param pBuffer          The buffer from which to write the sector data.

+

+    @return A negated ::REDSTATUS code indicating the operation result.

+

+    @retval 0   Operation was successful.

+*/

+static REDSTATUS DiskWrite(

+    uint8_t     bVolNum,

+    uint64_t    ullSectorStart,

+    uint32_t    ulSectorCount,

+    const void *pBuffer)

+{

+    REDSTATUS   ret;

+

+    if(gapbRamDisk[bVolNum] == NULL)

+    {

+        ret = -RED_EINVAL;

+    }

+    else

+    {

+        uint64_t ullByteOffset = ullSectorStart * gaRedVolConf[bVolNum].ulSectorSize;

+        uint32_t ulByteCount = ulSectorCount * gaRedVolConf[bVolNum].ulSectorSize;

+

+        RedMemCpy(&gapbRamDisk[bVolNum][ullByteOffset], pBuffer, ulByteCount);

+

+        ret = 0;

+    }

+

+    return ret;

+}

+

+

+/** @brief Flush any caches beneath the file system.

+

+    @param bVolNum  The volume number of the volume whose block device is being

+                    flushed.

+

+    @return A negated ::REDSTATUS code indicating the operation result.

+

+    @retval 0   Operation was successful.

+*/

+static REDSTATUS DiskFlush(

+    uint8_t     bVolNum)

+{

+    REDSTATUS   ret;

+

+    if(gapbRamDisk[bVolNum] == NULL)

+    {

+        ret = -RED_EINVAL;

+    }

+    else

+    {

+        ret = 0;

+    }

+

+    return ret;

+}

+#endif /* REDCONF_READ_ONLY == 0 */

+

+

+#else

+

+#error "Invalid BDEV_EXAMPLE_IMPLEMENTATION value"

+

+#endif /* BDEV_EXAMPLE_IMPLEMENTATION == ... */

+

diff --git a/FreeRTOS-Plus/Source/Reliance-Edge/os/freertos/services/osclock.c b/FreeRTOS-Plus/Source/Reliance-Edge/os/freertos/services/osclock.c
new file mode 100644
index 0000000..cf09d17
--- /dev/null
+++ b/FreeRTOS-Plus/Source/Reliance-Edge/os/freertos/services/osclock.c
@@ -0,0 +1,79 @@
+/*             ----> DO NOT REMOVE THE FOLLOWING NOTICE <----

+

+                   Copyright (c) 2014-2015 Datalight, Inc.

+                       All Rights Reserved Worldwide.

+

+    This program is free software; you can redistribute it and/or modify

+    it under the terms of the GNU General Public License as published by

+    the Free Software Foundation; use version 2 of the License.

+

+    This program is distributed in the hope that it will be useful,

+    but "AS-IS," WITHOUT ANY WARRANTY; without even the implied warranty

+    of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the

+    GNU General Public License for more details.

+

+    You should have received a copy of the GNU General Public License along

+    with this program; if not, write to the Free Software Foundation, Inc.,

+    51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.

+*/

+/*  Businesses and individuals that for commercial or other reasons cannot

+    comply with the terms of the GPLv2 license may obtain a commercial license

+    before incorporating Reliance Edge into proprietary software for

+    distribution in any form.  Visit http://www.datalight.com/reliance-edge for

+    more information.

+*/

+/** @file

+    @brief Implements real-time clock functions.

+*/

+#include <redfs.h>

+

+

+/** @brief Initialize the real time clock.

+

+    The behavior of calling this function when the RTC is already initialized

+    is undefined.

+

+    @return A negated ::REDSTATUS code indicating the operation result.

+

+    @retval 0   Operation was successful.

+*/

+REDSTATUS RedOsClockInit(void)

+{

+    return 0;

+}

+

+

+/** @brief Uninitialize the real time clock.

+

+    The behavior of calling this function when the RTC is not initialized is

+    undefined.

+

+    @return A negated ::REDSTATUS code indicating the operation result.

+

+    @retval 0   Operation was successful.

+*/

+REDSTATUS RedOsClockUninit(void)

+{

+    return 0;

+}

+

+

+/** @brief Get the date/time.

+

+    The behavior of calling this function when the RTC is not initialized is

+    undefined.

+

+    @return The number of seconds since January 1, 1970 excluding leap seconds

+            (in other words, standard Unix time).  If the resolution or epoch

+            of the RTC is different than this, the implementation must convert

+            it to the expected representation.

+*/

+uint32_t RedOsClockGetTime(void)

+{

+    /*  FreeRTOS does not provide an RTC abstraction since most of the systems

+        it targets have no RTC hardware.  If your hardware includes an RTC that

+        you would like to use, this function must be customized.

+    */

+    return 0;

+}

+

diff --git a/FreeRTOS-Plus/Source/Reliance-Edge/os/freertos/services/osmutex.c b/FreeRTOS-Plus/Source/Reliance-Edge/os/freertos/services/osmutex.c
new file mode 100644
index 0000000..0bc2c70
--- /dev/null
+++ b/FreeRTOS-Plus/Source/Reliance-Edge/os/freertos/services/osmutex.c
@@ -0,0 +1,120 @@
+/*             ----> DO NOT REMOVE THE FOLLOWING NOTICE <----

+

+                   Copyright (c) 2014-2015 Datalight, Inc.

+                       All Rights Reserved Worldwide.

+

+    This program is free software; you can redistribute it and/or modify

+    it under the terms of the GNU General Public License as published by

+    the Free Software Foundation; use version 2 of the License.

+

+    This program is distributed in the hope that it will be useful,

+    but "AS-IS," WITHOUT ANY WARRANTY; without even the implied warranty

+    of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the

+    GNU General Public License for more details.

+

+    You should have received a copy of the GNU General Public License along

+    with this program; if not, write to the Free Software Foundation, Inc.,

+    51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.

+*/

+/*  Businesses and individuals that for commercial or other reasons cannot

+    comply with the terms of the GPLv2 license may obtain a commercial license

+    before incorporating Reliance Edge into proprietary software for

+    distribution in any form.  Visit http://www.datalight.com/reliance-edge for

+    more information.

+*/

+/** @file

+    @brief Implements a synchronization object to provide mutual exclusion.

+*/

+#include <FreeRTOS.h>

+#include <semphr.h>

+

+#include <redfs.h>

+

+#if REDCONF_TASK_COUNT > 1U

+

+

+static SemaphoreHandle_t xMutex;

+

+

+/** @brief Initialize the mutex.

+

+    After initialization, the mutex is in the released state.

+

+    The behavior of calling this function when the mutex is still initialized

+    is undefined.

+

+    @return A negated ::REDSTATUS code indicating the operation result.

+

+    @retval 0   Operation was successful.

+*/

+REDSTATUS RedOsMutexInit(void)

+{

+    REDSTATUS ret;

+

+    xMutex = xSemaphoreCreateMutex();

+    if(xMutex != NULL)

+    {

+        ret = 0;

+    }

+    else

+    {

+        ret = -RED_ENOMEM;

+    }

+

+    return ret;

+}

+

+

+/** @brief Uninitialize the mutex.

+

+    The behavior of calling this function when the mutex is not initialized is

+    undefined; likewise, the behavior of uninitializing the mutex when it is

+    in the acquired state is undefined.

+

+    @return A negated ::REDSTATUS code indicating the operation result.

+

+    @retval 0   Operation was successful.

+*/

+REDSTATUS RedOsMutexUninit(void)

+{

+    vSemaphoreDelete(xMutex);

+    xMutex = NULL;

+

+    return 0;

+}

+

+

+/** @brief Acquire the mutex.

+

+    The behavior of calling this function when the mutex is not initialized is

+    undefined; likewise, the behavior of recursively acquiring the mutex is

+    undefined.

+*/

+void RedOsMutexAcquire(void)

+{

+    while(xSemaphoreTake(xMutex, portMAX_DELAY) != pdTRUE)

+    {

+    }

+}

+

+

+/** @brief Release the mutex.

+

+    The behavior is undefined in the following cases:

+

+    - Releasing the mutex when the mutex is not initialized.

+    - Releasing the mutex when it is not in the acquired state.

+    - Releasing the mutex from a task or thread other than the one which

+      acquired the mutex.

+*/

+void RedOsMutexRelease(void)

+{

+    BaseType_t xSuccess;

+

+    xSuccess = xSemaphoreGive(xMutex);

+    REDASSERT(xSuccess == pdTRUE);

+    (void)xSuccess;

+}

+

+#endif

+

diff --git a/FreeRTOS-Plus/Source/Reliance-Edge/os/freertos/services/osoutput.c b/FreeRTOS-Plus/Source/Reliance-Edge/os/freertos/services/osoutput.c
new file mode 100644
index 0000000..f493890
--- /dev/null
+++ b/FreeRTOS-Plus/Source/Reliance-Edge/os/freertos/services/osoutput.c
@@ -0,0 +1,70 @@
+/*             ----> DO NOT REMOVE THE FOLLOWING NOTICE <----

+

+                   Copyright (c) 2014-2015 Datalight, Inc.

+                       All Rights Reserved Worldwide.

+

+    This program is free software; you can redistribute it and/or modify

+    it under the terms of the GNU General Public License as published by

+    the Free Software Foundation; use version 2 of the License.

+

+    This program is distributed in the hope that it will be useful,

+    but "AS-IS," WITHOUT ANY WARRANTY; without even the implied warranty

+    of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the

+    GNU General Public License for more details.

+

+    You should have received a copy of the GNU General Public License along

+    with this program; if not, write to the Free Software Foundation, Inc.,

+    51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.

+*/

+/*  Businesses and individuals that for commercial or other reasons cannot

+    comply with the terms of the GPLv2 license may obtain a commercial license

+    before incorporating Reliance Edge into proprietary software for

+    distribution in any form.  Visit http://www.datalight.com/reliance-edge for

+    more information.

+*/

+/** @file

+    @brief Implements outputting a character string.

+*/

+#include <redfs.h>

+

+#if REDCONF_OUTPUT == 1

+

+#include <redosdeviations.h>

+

+

+/** @brief Write a string to a user-visible output location.

+

+    Write a null-terminated string to the serial port, console, terminal, or

+    other display device, such that the text is visible to the user.

+

+    @param pszString    A null-terminated string.

+*/

+void RedOsOutputString(

+    const char *pszString)

+{

+    if(pszString == NULL)

+    {

+        REDERROR();

+    }

+    else

+    {

+        uint32_t ulIdx = 0U;

+

+        while(pszString[ulIdx] != '\0')

+        {

+            OUTPUT_CHARACTER(pszString[ulIdx]);

+

+            /*  Serial output often requires a \r to print newlines correctly.

+            */

+            if(pszString[ulIdx] == '\n')

+            {

+                OUTPUT_CHARACTER('\r');

+            }

+

+            ulIdx++;

+        }

+    }

+}

+

+#endif

+

diff --git a/FreeRTOS-Plus/Source/Reliance-Edge/os/freertos/services/ostask.c b/FreeRTOS-Plus/Source/Reliance-Edge/os/freertos/services/ostask.c
new file mode 100644
index 0000000..799c152
--- /dev/null
+++ b/FreeRTOS-Plus/Source/Reliance-Edge/os/freertos/services/ostask.c
@@ -0,0 +1,68 @@
+/*             ----> DO NOT REMOVE THE FOLLOWING NOTICE <----

+

+                   Copyright (c) 2014-2015 Datalight, Inc.

+                       All Rights Reserved Worldwide.

+

+    This program is free software; you can redistribute it and/or modify

+    it under the terms of the GNU General Public License as published by

+    the Free Software Foundation; use version 2 of the License.

+

+    This program is distributed in the hope that it will be useful,

+    but "AS-IS," WITHOUT ANY WARRANTY; without even the implied warranty

+    of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the

+    GNU General Public License for more details.

+

+    You should have received a copy of the GNU General Public License along

+    with this program; if not, write to the Free Software Foundation, Inc.,

+    51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.

+*/

+/*  Businesses and individuals that for commercial or other reasons cannot

+    comply with the terms of the GPLv2 license may obtain a commercial license

+    before incorporating Reliance Edge into proprietary software for

+    distribution in any form.  Visit http://www.datalight.com/reliance-edge for

+    more information.

+*/

+/** @file

+    @brief Implements task functions.

+*/

+#include <FreeRTOS.h>

+#include <task.h>

+

+#include <redfs.h>

+

+#if (REDCONF_TASK_COUNT > 1U) && (REDCONF_API_POSIX == 1)

+

+#include <redosdeviations.h>

+

+#if INCLUDE_xTaskGetCurrentTaskHandle != 1

+  #error "INCLUDE_xTaskGetCurrentTaskHandle must be 1 when REDCONF_TASK_COUNT > 1 and REDCONF_API_POSIX == 1"

+#endif

+

+

+/** @brief Get the current task ID.

+

+    This task ID must be unique for all tasks using the file system.

+

+    @return The task ID.  Must not be 0.

+*/

+uint32_t RedOsTaskId(void)

+{

+    /*  Simply casting the xTaskGetCurrentTaskHandle() return value results in

+        warnings from some compilers, so use variables.

+    */

+    TaskHandle_t    xTask = xTaskGetCurrentTaskHandle();

+    uintptr_t       taskptr = CAST_TASK_PTR_TO_UINTPTR(xTask);

+    uint32_t        ulTaskPtr = (uint32_t)taskptr;

+

+    /*  Assert no information was lost casting from uintptr_t to uint32_t.

+    */

+    REDASSERT(ulTaskPtr == taskptr);

+

+    /*  NULL is a valid task handle in FreeRTOS, so add one to all task IDs.

+    */

+    REDASSERT((ulTaskPtr + 1U) != 0U);

+    return ulTaskPtr + 1U;

+}

+

+#endif

+

diff --git a/FreeRTOS-Plus/Source/Reliance-Edge/os/freertos/services/ostimestamp.c b/FreeRTOS-Plus/Source/Reliance-Edge/os/freertos/services/ostimestamp.c
new file mode 100644
index 0000000..d019d3a
--- /dev/null
+++ b/FreeRTOS-Plus/Source/Reliance-Edge/os/freertos/services/ostimestamp.c
@@ -0,0 +1,109 @@
+/*             ----> DO NOT REMOVE THE FOLLOWING NOTICE <----

+

+                   Copyright (c) 2014-2015 Datalight, Inc.

+                       All Rights Reserved Worldwide.

+

+    This program is free software; you can redistribute it and/or modify

+    it under the terms of the GNU General Public License as published by

+    the Free Software Foundation; use version 2 of the License.

+

+    This program is distributed in the hope that it will be useful,

+    but "AS-IS," WITHOUT ANY WARRANTY; without even the implied warranty

+    of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the

+    GNU General Public License for more details.

+

+    You should have received a copy of the GNU General Public License along

+    with this program; if not, write to the Free Software Foundation, Inc.,

+    51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.

+*/

+/*  Businesses and individuals that for commercial or other reasons cannot

+    comply with the terms of the GPLv2 license may obtain a commercial license

+    before incorporating Reliance Edge into proprietary software for

+    distribution in any form.  Visit http://www.datalight.com/reliance-edge for

+    more information.

+*/

+/** @file

+    @brief Implements timestamp functions.

+

+    The functionality implemented herein is not needed for the file system

+    driver, only to provide accurate results with performance tests.

+*/

+#include <FreeRTOS.h>

+#include <task.h>

+

+#include <redfs.h>

+

+

+/*  configTICK_RATE_HZ is almost always 100, 250, 500, or 1000.  If

+    1000000U % configTICK_RATE_HZ != 0, then RedOsTimePassed() will be a

+    little inaccurate.

+*/

+#define MICROSECS_PER_TICK  (1000000U / configTICK_RATE_HZ)

+

+

+/** @brief Initialize the timestamp service.

+

+    The behavior of invoking this function when timestamps are already

+    initialized is undefined.

+

+    @return A negated ::REDSTATUS code indicating the operation result.

+

+    @retval 0           Operation was successful.

+    @retval -RED_ENOSYS The timestamp service has not been implemented.

+*/

+REDSTATUS RedOsTimestampInit(void)

+{

+    return 0;

+}

+

+

+/** @brief Uninitialize the timestamp service.

+

+    The behavior of invoking this function when timestamps are not initialized

+    is undefined.

+

+    @return A negated ::REDSTATUS code indicating the operation result.

+

+    @retval 0   Operation was successful.

+*/

+REDSTATUS RedOsTimestampUninit(void)

+{

+    return 0;

+}

+

+

+/** @brief Retrieve a timestamp.

+

+    The behavior of invoking this function when timestamps are not initialized

+    is undefined

+

+    @return A timestamp which can later be passed to RedOsTimePassed() to

+            determine the amount of time which passed between the two calls.

+*/

+REDTIMESTAMP RedOsTimestamp(void)

+{

+    return xTaskGetTickCount();

+}

+

+

+/** @brief Determine how much time has passed since a timestamp was retrieved.

+

+    The behavior of invoking this function when timestamps are not initialized

+    is undefined.

+

+    @param tsSince  A timestamp acquired earlier via RedOsTimestamp().

+

+    @return The number of microseconds which have passed since @p tsSince.

+*/

+uint64_t RedOsTimePassed(

+    REDTIMESTAMP    tsSince)

+{

+    /*  This works even if the tick count has wrapped around, provided it has

+        only wrapped around once.

+    */

+    uint32_t        ulTicksPassed = (uint32_t)xTaskGetTickCount() - tsSince;

+    uint64_t        ullMicrosecs = (uint64_t)ulTicksPassed * MICROSECS_PER_TICK;

+

+    return ullMicrosecs;

+}

+

diff --git a/FreeRTOS-Plus/Source/Reliance-Edge/posix/path.c b/FreeRTOS-Plus/Source/Reliance-Edge/posix/path.c
new file mode 100644
index 0000000..2e562ec
--- /dev/null
+++ b/FreeRTOS-Plus/Source/Reliance-Edge/posix/path.c
@@ -0,0 +1,448 @@
+/*             ----> DO NOT REMOVE THE FOLLOWING NOTICE <----

+

+                   Copyright (c) 2014-2015 Datalight, Inc.

+                       All Rights Reserved Worldwide.

+

+    This program is free software; you can redistribute it and/or modify

+    it under the terms of the GNU General Public License as published by

+    the Free Software Foundation; use version 2 of the License.

+

+    This program is distributed in the hope that it will be useful,

+    but "AS-IS," WITHOUT ANY WARRANTY; without even the implied warranty

+    of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the

+    GNU General Public License for more details.

+

+    You should have received a copy of the GNU General Public License along

+    with this program; if not, write to the Free Software Foundation, Inc.,

+    51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.

+*/

+/*  Businesses and individuals that for commercial or other reasons cannot

+    comply with the terms of the GPLv2 license may obtain a commercial license

+    before incorporating Reliance Edge into proprietary software for

+    distribution in any form.  Visit http://www.datalight.com/reliance-edge for

+    more information.

+*/

+/** @file

+    @brief Implements path utilities for the POSIX-like API layer.

+*/

+#include <redfs.h>

+

+#if REDCONF_API_POSIX == 1

+

+#include <redcoreapi.h>

+#include <redvolume.h>

+#include <redposix.h>

+#include "redpath.h"

+

+

+static bool IsRootDir(const char *pszLocalPath);

+static bool PathHasMoreNames(const char *pszPathIdx);

+

+

+/** @brief Split a path into its component parts: a volume and a volume-local

+           path.

+

+    @param pszPath          The path to split.

+    @param pbVolNum         On successful return, if non-NULL, populated with

+                            the volume number extracted from the path.

+    @param ppszLocalPath    On successful return, populated with the

+                            volume-local path: the path stripped of any volume

+                            path prefixing.  If this parameter is NULL, that

+                            indicates there should be no local path, and any

+                            characters beyond the prefix (other than path

+                            separators) are treated as an error.

+

+    @return A negated ::REDSTATUS code indicating the operation result.

+

+    @retval 0           Operation was successful.

+    @retval -RED_EINVAL @p pszPath is `NULL`.

+    @retval -RED_ENOENT @p pszPath could not be matched to any volume; or

+                        @p ppszLocalPath is NULL but @p pszPath includes a local

+                        path.

+*/

+REDSTATUS RedPathSplit(

+    const char     *pszPath,

+    uint8_t        *pbVolNum,

+    const char    **ppszLocalPath)

+{

+    REDSTATUS       ret = 0;

+

+    if(pszPath == NULL)

+    {

+        ret = -RED_EINVAL;

+    }

+    else

+    {

+        const char *pszLocalPath = pszPath;

+        uint8_t     bMatchVol = UINT8_MAX;

+        uint32_t    ulMatchLen = 0U;

+        uint8_t     bDefaultVolNum = UINT8_MAX;

+        uint8_t     bVolNum;

+

+        for(bVolNum = 0U; bVolNum < REDCONF_VOLUME_COUNT; bVolNum++)

+        {

+            const char *pszPrefix = gaRedVolConf[bVolNum].pszPathPrefix;

+            uint32_t    ulPrefixLen = RedStrLen(pszPrefix);

+

+            if(ulPrefixLen == 0U)

+            {

+                /*  A volume with a path prefix of an empty string is the

+                    default volume, used when the path does not match the

+                    prefix of any other volume.

+

+                    The default volume should only be found once.  During

+                    initialization, RedCoreInit() ensures that all volume

+                    prefixes are unique (including empty prefixes).

+                */

+                REDASSERT(bDefaultVolNum == UINT8_MAX);

+                bDefaultVolNum = bVolNum;

+            }

+            /*  For a path to match, it must either be the prefix exactly, or

+                be followed by a path separator character.  Thus, with a volume

+                prefix of "/foo", both "/foo" and "/foo/bar" are matches, but

+                "/foobar" is not.

+            */

+            else if(    (RedStrNCmp(pszPath, pszPrefix, ulPrefixLen) == 0)

+                     && ((pszPath[ulPrefixLen] == '\0') || (pszPath[ulPrefixLen] == REDCONF_PATH_SEPARATOR)))

+            {

+                /*  The length of this match should never exactly equal the

+                    length of a previous match: that would require a duplicate

+                    volume name, which should have been detected during init.

+                */

+                REDASSERT(ulPrefixLen != ulMatchLen);

+

+                /*  If multiple prefixes match, the longest takes precedence.

+                    Thus, if there are two prefixes "Flash" and "Flash/Backup",

+                    the path "Flash/Backup/" will not be erroneously matched

+                    with the "Flash" volume.

+                */

+                if(ulPrefixLen > ulMatchLen)

+                {

+                    bMatchVol = bVolNum;

+                    ulMatchLen = ulPrefixLen;

+                }

+            }

+            else

+            {

+                /*  No match, keep looking.

+                */

+            }

+        }

+

+        if(bMatchVol != UINT8_MAX)

+        {

+            /*  The path matched a volume path prefix.

+            */

+            bVolNum = bMatchVol;

+            pszLocalPath = &pszPath[ulMatchLen];

+        }

+        else if(bDefaultVolNum != UINT8_MAX)

+        {

+            /*  The path didn't match any of the prefixes, but one of the

+                volumes has a path prefix of "", so an unprefixed path is

+                assigned to that volume.

+            */

+            bVolNum = bDefaultVolNum;

+            REDASSERT(pszLocalPath == pszPath);

+        }

+        else

+        {

+            /*  The path cannot be assigned a volume.

+            */

+            ret = -RED_ENOENT;

+        }

+

+        if(ret == 0)

+        {

+            if(pbVolNum != NULL)

+            {

+                *pbVolNum = bVolNum;

+            }

+

+            if(ppszLocalPath != NULL)

+            {

+                *ppszLocalPath = pszLocalPath;

+            }

+            else

+            {

+                /*  If no local path is expected, then the string should either

+                    terminate after the path prefix or the local path should name

+                    the root directory.  Allowing path separators here means that

+                    red_mount("/data/") is OK with a path prefix of "/data".

+                */

+                if(pszLocalPath[0U] != '\0')

+                {

+                    if(!IsRootDir(pszLocalPath))

+                    {

+                        ret = -RED_ENOENT;

+                    }

+                }

+            }

+        }

+    }

+

+    return ret;

+}

+

+

+/** @brief Lookup the inode named by the given path.

+

+    @param pszLocalPath The path to lookup; this is a local path, without any

+                        volume prefix.

+    @param pulInode     On successful return, populated with the number of the

+                        inode named by @p pszLocalPath.

+

+    @return A negated ::REDSTATUS code indicating the operation result.

+

+    @retval 0                   Operation was successful.

+    @retval -RED_EINVAL         @p pszLocalPath is `NULL`; or @p pulInode is

+                                `NULL`.

+    @retval -RED_EIO            A disk I/O error occurred.

+    @retval -RED_ENOENT         @p pszLocalPath is an empty string; or

+                                @p pszLocalPath does not name an existing file

+                                or directory.

+    @retval -RED_ENOTDIR        A component of the path other than the last is

+                                not a directory.

+    @retval -RED_ENAMETOOLONG   The length of a component of @p pszLocalPath is

+                                longer than #REDCONF_NAME_MAX.

+*/

+REDSTATUS RedPathLookup(

+    const char *pszLocalPath,

+    uint32_t   *pulInode)

+{

+    REDSTATUS   ret;

+

+    if((pszLocalPath == NULL) || (pulInode == NULL))

+    {

+        REDERROR();

+        ret = -RED_EINVAL;

+    }

+    else if(pszLocalPath[0U] == '\0')

+    {

+        ret = -RED_ENOENT;

+    }

+    else if(IsRootDir(pszLocalPath))

+    {

+        ret = 0;

+        *pulInode = INODE_ROOTDIR;

+    }

+    else

+    {

+        uint32_t    ulPInode;

+        const char *pszName;

+

+        ret = RedPathToName(pszLocalPath, &ulPInode, &pszName);

+

+        if(ret == 0)

+        {

+            ret = RedCoreLookup(ulPInode, pszName, pulInode);

+        }

+    }

+

+    return ret;

+}

+

+

+/** @brief Given a path, return the parent inode number and a pointer to the

+           last component in the path (the name).

+

+    @param pszLocalPath The path to examine; this is a local path, without any

+                        volume prefix.

+    @param pulPInode    On successful return, populated with the inode number of

+                        the parent directory of the last component in the path.

+                        For example, with the path "a/b/c", populated with the

+                        inode number of "b".

+    @param ppszName     On successful return, populated with a pointer to the

+                        last component in the path.  For example, with the path

+                        "a/b/c", populated with a pointer to "c".

+

+    @return A negated ::REDSTATUS code indicating the operation result.

+

+    @retval 0                   Operation was successful.

+    @retval -RED_EINVAL         @p pszLocalPath is `NULL`; or @p pulPInode is

+                                `NULL`; or @p ppszName is `NULL`; or the path

+                                names the root directory.

+    @retval -RED_EIO            A disk I/O error occurred.

+    @retval -RED_ENOENT         @p pszLocalPath is an empty string; or a

+                                component of the path other than the last does

+                                not exist.

+    @retval -RED_ENOTDIR        A component of the path other than the last is

+                                not a directory.

+    @retval -RED_ENAMETOOLONG   The length of a component of @p pszLocalPath is

+                                longer than #REDCONF_NAME_MAX.

+*/

+REDSTATUS RedPathToName(

+    const char     *pszLocalPath,

+    uint32_t       *pulPInode,

+    const char    **ppszName)

+{

+    REDSTATUS       ret;

+

+    if((pszLocalPath == NULL) || (pulPInode == NULL) || (ppszName == NULL))

+    {

+        REDERROR();

+        ret = -RED_EINVAL;

+    }

+    else if(IsRootDir(pszLocalPath))

+    {

+        ret = -RED_EINVAL;

+    }

+    else if(pszLocalPath[0U] == '\0')

+    {

+        ret = -RED_ENOENT;

+    }

+    else

+    {

+        uint32_t ulInode = INODE_ROOTDIR;

+        uint32_t ulPInode = INODE_INVALID;

+        uint32_t ulPathIdx = 0U;

+        uint32_t ulLastNameIdx = 0U;

+

+        ret = 0;

+

+        do

+        {

+            uint32_t ulNameLen;

+

+            /*  Skip over path separators, to get pszLocalPath[ulPathIdx]

+                pointing at the next name.

+            */

+            while(pszLocalPath[ulPathIdx] == REDCONF_PATH_SEPARATOR)

+            {

+                ulPathIdx++;

+            }

+

+            if(pszLocalPath[ulPathIdx] == '\0')

+            {

+                break;

+            }

+

+            /*  Point ulLastNameIdx at the first character of the name; after

+                we exit the loop, it will point at the first character of the

+                last name in the path.

+            */

+            ulLastNameIdx = ulPathIdx;

+

+            /*  Point ulPInode at the parent inode: either the root inode

+                (first pass) or the inode of the previous name.  After we exit

+                the loop, this will point at the parent inode of the last name.

+            */

+            ulPInode = ulInode;

+

+            ulNameLen = RedNameLen(&pszLocalPath[ulPathIdx]);

+

+            /*  Lookup the inode of the name, unless we are at the last name in

+                the path: we don't care whether the last name exists or not.

+            */

+            if(PathHasMoreNames(&pszLocalPath[ulPathIdx + ulNameLen]))

+            {

+                ret = RedCoreLookup(ulPInode, &pszLocalPath[ulPathIdx], &ulInode);

+            }

+

+            /*  Move on to the next path element.

+            */

+            if(ret == 0)

+            {

+                ulPathIdx += ulNameLen;

+            }

+        }

+        while(ret == 0);

+

+        if(ret == 0)

+        {

+            *pulPInode = ulPInode;

+            *ppszName = &pszLocalPath[ulLastNameIdx];

+        }

+    }

+

+    return ret;

+}

+

+

+/** @brief Determine whether a path names the root directory.

+

+    @param pszLocalPath The path to examine; this is a local path, without any

+                        volume prefix.

+

+    @return Returns whether @p pszLocalPath names the root directory.

+

+    @retval true    @p pszLocalPath names the root directory.

+    @retval false   @p pszLocalPath does not name the root directory.

+*/

+static bool IsRootDir(

+    const char *pszLocalPath)

+{

+    bool        fRet;

+

+    if(pszLocalPath == NULL)

+    {

+        REDERROR();

+        fRet = false;

+    }

+    else

+    {

+        uint32_t    ulIdx = 0U;

+

+        /*  A string containing nothing but path separators (usually only one)

+            names the root directory.  An empty string does *not* name the root

+            directory, since in POSIX empty strings typically elicit -RED_ENOENT

+            errors.

+        */

+        while(pszLocalPath[ulIdx] == REDCONF_PATH_SEPARATOR)

+        {

+            ulIdx++;

+        }

+

+        fRet = (ulIdx > 0U) && (pszLocalPath[ulIdx] == '\0');

+    }

+

+    return fRet;

+}

+

+

+/** @brief Determine whether there are more names in a path.

+

+    Example | Result

+    ------- | ------

+    ""        false

+    "\"       false

+    "\\"      false

+    "a"       true

+    "\a"      true

+    "\\a"     true

+

+    @param pszPathIdx   The path to examine, incremented to the point of

+                        interest.

+

+    @return Returns whether there are more names in @p pszPathIdx.

+

+    @retval true    @p pszPathIdx has more names.

+    @retval false   @p pszPathIdx has no more names.

+*/

+static bool PathHasMoreNames(

+    const char *pszPathIdx)

+{

+    bool        fRet;

+

+    if(pszPathIdx == NULL)

+    {

+        REDERROR();

+        fRet = false;

+    }

+    else

+    {

+        uint32_t ulIdx = 0U;

+

+        while(pszPathIdx[ulIdx] == REDCONF_PATH_SEPARATOR)

+        {

+            ulIdx++;

+        }

+

+        fRet = pszPathIdx[ulIdx] != '\0';

+    }

+

+    return fRet;

+}

+

+#endif /* REDCONF_API_POSIX */

+

diff --git a/FreeRTOS-Plus/Source/Reliance-Edge/posix/posix.c b/FreeRTOS-Plus/Source/Reliance-Edge/posix/posix.c
new file mode 100644
index 0000000..34c4986
--- /dev/null
+++ b/FreeRTOS-Plus/Source/Reliance-Edge/posix/posix.c
@@ -0,0 +1,3088 @@
+/*             ----> DO NOT REMOVE THE FOLLOWING NOTICE <----

+

+                   Copyright (c) 2014-2015 Datalight, Inc.

+                       All Rights Reserved Worldwide.

+

+    This program is free software; you can redistribute it and/or modify

+    it under the terms of the GNU General Public License as published by

+    the Free Software Foundation; use version 2 of the License.

+

+    This program is distributed in the hope that it will be useful,

+    but "AS-IS," WITHOUT ANY WARRANTY; without even the implied warranty

+    of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the

+    GNU General Public License for more details.

+

+    You should have received a copy of the GNU General Public License along

+    with this program; if not, write to the Free Software Foundation, Inc.,

+    51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.

+*/

+/*  Businesses and individuals that for commercial or other reasons cannot

+    comply with the terms of the GPLv2 license may obtain a commercial license

+    before incorporating Reliance Edge into proprietary software for

+    distribution in any form.  Visit http://www.datalight.com/reliance-edge for

+    more information.

+*/

+/** @file

+    @brief Implementation of the the Reliance Edge POSIX-like API.

+*/

+

+#include <redfs.h>

+

+#if REDCONF_API_POSIX == 1

+

+/** @defgroup red_group_posix The POSIX-like File System Interface

+    @{

+*/

+

+#include <redvolume.h>

+#include <redcoreapi.h>

+#include <redposix.h>

+#include "redpath.h"

+

+

+/*-------------------------------------------------------------------

+    File Descriptors

+-------------------------------------------------------------------*/

+

+#define FD_GEN_BITS 11U /* File descriptor bits for mount generation. */

+#define FD_VOL_BITS 8U  /* File descriptor bits for volume number. */

+#define FD_IDX_BITS 12U /* File descriptor bits for handle index. */

+

+/*  31 bits available: file descriptors are int32_t, but the sign bit must

+    always be zero.

+*/

+#if (FD_GEN_BITS + FD_VOL_BITS + FD_IDX_BITS) > 31U

+  #error "Internal error: too many file descriptor bits!"

+#endif

+

+/*  Maximum values for file descriptor components.

+*/

+#define FD_GEN_MAX  ((1UL << FD_GEN_BITS) - 1U)

+#define FD_VOL_MAX  ((1UL << FD_VOL_BITS) - 1U)

+#define FD_IDX_MAX  ((1UL << FD_IDX_BITS) - 1U)

+

+#if REDCONF_VOLUME_COUNT > FD_VOL_MAX

+  #error "Error: Too many file system volumes!"

+#endif

+#if REDCONF_HANDLE_COUNT > (FD_IDX_MAX + 1U)

+  #error "Error: Too many file system handles!"

+#endif

+

+/*  File descriptors must never be negative; and must never be zero, one, or

+    two, to avoid confusion with STDIN, STDOUT, and STDERR.

+*/

+#define FD_MIN  (3)

+

+/*-------------------------------------------------------------------

+    Handles

+-------------------------------------------------------------------*/

+

+/*  Mask of all RED_O_* values.

+*/

+#define RED_O_MASK  (RED_O_RDONLY|RED_O_WRONLY|RED_O_RDWR|RED_O_APPEND|RED_O_CREAT|RED_O_EXCL|RED_O_TRUNC)

+

+#define HFLAG_DIRECTORY 0x01U   /* Handle is for a directory. */

+#define HFLAG_READABLE  0x02U   /* Handle is readable. */

+#define HFLAG_WRITEABLE 0x04U   /* Handle is writeable. */

+#define HFLAG_APPENDING 0x08U   /* Handle was opened in append mode. */

+

+/*  @brief Handle structure, used to implement file descriptors and directory

+           streams.

+*/

+typedef struct sREDHANDLE

+{

+    uint32_t        ulInode;    /**< Inode number; 0 if handle is available. */

+    uint8_t         bVolNum;    /**< Volume containing the inode. */

+    uint8_t         bFlags;     /**< Handle flags (type and mode). */

+    uint64_t        ullOffset;  /**< File or directory offset. */

+  #if REDCONF_API_POSIX_READDIR == 1

+    REDDIRENT       dirent;     /**< Dirent structure returned by red_readdir(). */

+  #endif

+} REDHANDLE;

+

+/*-------------------------------------------------------------------

+    Tasks

+-------------------------------------------------------------------*/

+

+#if REDCONF_TASK_COUNT > 1U

+/*  @brief Per-task information.

+*/

+typedef struct

+{

+    uint32_t    ulTaskId;   /**< ID of the task which owns this slot; 0 if free. */

+    REDSTATUS   iErrno;     /**< Last error value. */

+} TASKSLOT;

+#endif

+

+/*-------------------------------------------------------------------

+    Local Prototypes

+-------------------------------------------------------------------*/

+

+#if (REDCONF_READ_ONLY == 0) && ((REDCONF_API_POSIX_UNLINK == 1) || (REDCONF_API_POSIX_RMDIR == 1))

+static REDSTATUS UnlinkSub(const char *pszPath, FTYPE type);

+#endif

+static REDSTATUS FildesOpen(const char *pszPath, uint32_t ulOpenMode, FTYPE type, int32_t *piFildes);

+static REDSTATUS FildesClose(int32_t iFildes);

+static REDSTATUS FildesToHandle(int32_t iFildes, FTYPE expectedType, REDHANDLE **ppHandle);

+static int32_t FildesPack(uint16_t uHandleIdx, uint8_t bVolNum);

+static void FildesUnpack(int32_t iFildes, uint16_t *puHandleIdx, uint8_t *pbVolNum, uint16_t *puGeneration);

+#if REDCONF_API_POSIX_READDIR == 1

+static bool DirStreamIsValid(const REDDIR *pDirStream);

+#endif

+static REDSTATUS PosixEnter(void);

+static void PosixLeave(void);

+static REDSTATUS ModeTypeCheck(uint16_t uMode, FTYPE expectedType);

+#if (REDCONF_READ_ONLY == 0) && ((REDCONF_API_POSIX_UNLINK == 1) || (REDCONF_API_POSIX_RMDIR == 1) || ((REDCONF_API_POSIX_RENAME == 1) && (REDCONF_RENAME_ATOMIC == 1)))

+static REDSTATUS InodeUnlinkCheck(uint32_t ulInode);

+#endif

+#if REDCONF_TASK_COUNT > 1U

+static REDSTATUS TaskRegister(uint32_t *pulTaskIdx);

+#endif

+static int32_t PosixReturn(REDSTATUS iError);

+

+/*-------------------------------------------------------------------

+    Globals

+-------------------------------------------------------------------*/

+

+static bool gfPosixInited;                              /* Whether driver is initialized. */

+static REDHANDLE gaHandle[REDCONF_HANDLE_COUNT];        /* Array of all handles. */

+#if REDCONF_TASK_COUNT > 1U

+static TASKSLOT gaTask[REDCONF_TASK_COUNT];             /* Array of task slots. */

+#endif

+

+/*  Array of volume mount "generations".  These are incremented for a volume

+    each time that volume is mounted.  The generation number (along with the

+    volume number) is incorporated into the file descriptors; a stale file

+    descriptor from a previous mount can be detected since it will include a

+    stale generation number.

+*/

+static uint16_t gauGeneration[REDCONF_VOLUME_COUNT];

+

+

+/*-------------------------------------------------------------------

+    Public API

+-------------------------------------------------------------------*/

+

+/** @brief Initialize the Reliance Edge file system driver.

+

+    Prepares the Reliance Edge file system driver to be used.  Must be the first

+    Reliance Edge function to be invoked: no volumes can be mounted or formatted

+    until the driver has been initialized.

+

+    If this function is called when the Reliance Edge driver is already

+    initialized, it does nothing and returns success.

+

+    This function is not thread safe: attempting to initialize from multiple

+    threads could leave things in a bad state.

+

+    @return On success, zero is returned.  On error, -1 is returned and

+            #red_errno is set appropriately.

+

+    <b>Errno values</b>

+    - #RED_EINVAL: The volume path prefix configuration is invalid.

+*/

+int32_t red_init(void)

+{

+    REDSTATUS ret;

+

+    if(gfPosixInited)

+    {

+        ret = 0;

+    }

+    else

+    {

+        ret = RedCoreInit();

+        if(ret == 0)

+        {

+            RedMemSet(gaHandle, 0U, sizeof(gaHandle));

+

+          #if REDCONF_TASK_COUNT > 1U

+            RedMemSet(gaTask, 0U, sizeof(gaTask));

+          #endif

+

+            gfPosixInited = true;

+        }

+    }

+

+    return PosixReturn(ret);

+}

+

+

+/** @brief Uninitialize the Reliance Edge file system driver.

+

+    Tears down the Reliance Edge file system driver.  Cannot be used until all

+    Reliance Edge volumes are unmounted.  A subsequent call to red_init() will

+    initialize the driver again.

+

+    If this function is called when the Reliance Edge driver is already

+    uninitialized, it does nothing and returns success.

+

+    This function is not thread safe: attempting to uninitialize from multiple

+    threads could leave things in a bad state.

+

+    @return On success, zero is returned.  On error, -1 is returned and

+            #red_errno is set appropriately.

+

+    <b>Errno values</b>

+    - #RED_EBUSY: At least one volume is still mounted.

+*/

+int32_t red_uninit(void)

+{

+    REDSTATUS ret;

+

+    if(gfPosixInited)

+    {

+        ret = PosixEnter();

+

+        if(ret == 0)

+        {

+            uint8_t bVolNum;

+

+            for(bVolNum = 0U; bVolNum < REDCONF_VOLUME_COUNT; bVolNum++)

+            {

+                if(gaRedVolume[bVolNum].fMounted)

+                {

+                    ret = -RED_EBUSY;

+                    break;

+                }

+            }

+

+            if(ret == 0)

+            {

+                /*  All volumes are unmounted.  Mark the driver as

+                    uninitialized before releasing the FS mutex, to avoid any

+                    race condition where a volume could be mounted and then the

+                    driver uninitialized with a mounted volume.

+                */

+                gfPosixInited = false;

+            }

+

+            /*  The FS mutex must be released before we uninitialize the core,

+                since the FS mutex needs to be in the released state when it

+                gets uninitialized.

+

+                Don't use PosixLeave(), since it asserts gfPosixInited is true.

+            */

+          #if REDCONF_TASK_COUNT > 1U

+            RedOsMutexRelease();

+          #endif

+        }

+

+        if(ret == 0)

+        {

+            ret = RedCoreUninit();

+

+            /*  Not good if the above fails, since things might be partly, but

+                not entirely, torn down, and there might not be a way back to

+                a valid driver state.

+            */

+            REDASSERT(ret == 0);

+        }

+    }

+    else

+    {

+        ret = 0;

+    }

+

+    return PosixReturn(ret);

+}

+

+

+/** @brief Mount a file system volume.

+

+    Prepares the file system volume to be accessed.  Mount will fail if the

+    volume has never been formatted, or if the on-disk format is inconsistent

+    with the compile-time configuration.

+

+    An error is returned if the volume is already mounted.

+

+    @param pszVolume    A path prefix identifying the volume to mount.

+

+    @return On success, zero is returned.  On error, -1 is returned and

+            #red_errno is set appropriately.

+

+    <b>Errno values</b>

+    - #RED_EBUSY: Volume is already mounted.

+    - #RED_EINVAL: @p pszVolume is `NULL`; or the driver is uninitialized.

+    - #RED_EIO: Volume not formatted, improperly formatted, or corrupt.

+    - #RED_ENOENT: @p pszVolume is not a valid volume path prefix.

+    - #RED_EUSERS: Cannot become a file system user: too many users.

+*/

+int32_t red_mount(

+    const char *pszVolume)

+{

+    REDSTATUS   ret;

+

+    ret = PosixEnter();

+

+    if(ret == 0)

+    {

+        uint8_t bVolNum;

+

+        ret = RedPathSplit(pszVolume, &bVolNum, NULL);

+

+        /*  The core will return success if the volume is already mounted, so

+            check for that condition here to propagate the error.

+        */

+        if((ret == 0) && gaRedVolume[bVolNum].fMounted)

+        {

+            ret = -RED_EBUSY;

+        }

+

+      #if REDCONF_VOLUME_COUNT > 1U

+        if(ret == 0)

+        {

+            ret = RedCoreVolSetCurrent(bVolNum);

+        }

+      #endif

+

+        if(ret == 0)

+        {

+            ret = RedCoreVolMount();

+        }

+

+        if(ret == 0)

+        {

+            /*  Increment the mount generation, invalidating file descriptors

+                from previous mounts.  Note that while the generation numbers

+                are stored in 16-bit values, we have less than 16-bits to store

+                generations in the file descriptors, so we must wrap-around

+                manually.

+            */

+            gauGeneration[bVolNum]++;

+            if(gauGeneration[bVolNum] > FD_GEN_MAX)

+            {

+                /*  Wrap-around to one, rather than zero.  The generation is

+                    stored in the top bits of the file descriptor, and doing

+                    this means that low numbers are never valid file

+                    descriptors.  This implements the requirement that 0, 1,

+                    and 2 are never valid file descriptors, thereby avoiding

+                    confusion with STDIN, STDOUT, and STDERR.

+                */

+                gauGeneration[bVolNum] = 1U;

+            }

+        }

+

+        PosixLeave();

+    }

+

+    return PosixReturn(ret);

+}

+

+

+/** @brief Unmount a file system volume.

+

+    This function discards the in-memory state for the file system and marks it

+    as unmounted.  Subsequent attempts to access the volume will fail until the

+    volume is mounted again.

+

+    If unmount automatic transaction points are enabled, this function will

+    commit a transaction point prior to unmounting.  If unmount automatic

+    transaction points are disabled, this function will unmount without

+    transacting, effectively discarding the working state.

+

+    Before unmounting, this function will wait for any active file system

+    thread to complete by acquiring the FS mutex.  The volume will be marked as

+    unmounted before the FS mutex is released, so subsequent FS threads will

+    possibly block and then see an error when attempting to access a volume

+    which is unmounting or unmounted.  If the volume has open handles, the

+    unmount will fail.

+

+    An error is returned if the volume is already unmounted.

+

+    @param pszVolume    A path prefix identifying the volume to unmount.

+

+    @return On success, zero is returned.  On error, -1 is returned and

+            #red_errno is set appropriately.

+

+    <b>Errno values</b>

+    - #RED_EBUSY: There are still open handles for this file system volume.

+    - #RED_EINVAL: @p pszVolume is `NULL`; or the driver is uninitialized; or

+      the volume is already unmounted.

+    - #RED_EIO: I/O error during unmount automatic transaction point.

+    - #RED_ENOENT: @p pszVolume is not a valid volume path prefix.

+    - #RED_EUSERS: Cannot become a file system user: too many users.

+*/

+int32_t red_umount(

+    const char *pszVolume)

+{

+    REDSTATUS   ret;

+

+    ret = PosixEnter();

+    if(ret == 0)

+    {

+        uint8_t bVolNum;

+

+        ret = RedPathSplit(pszVolume, &bVolNum, NULL);

+

+        /*  The core will return success if the volume is already unmounted, so

+            check for that condition here to propagate the error.

+        */

+        if((ret == 0) && !gaRedVolume[bVolNum].fMounted)

+        {

+            ret = -RED_EINVAL;

+        }

+

+        if(ret == 0)

+        {

+            uint16_t    uHandleIdx;

+

+            /*  Do not unmount the volume if it still has open handles.

+            */

+            for(uHandleIdx = 0U; uHandleIdx < REDCONF_HANDLE_COUNT; uHandleIdx++)

+            {

+                const REDHANDLE *pHandle = &gaHandle[uHandleIdx];

+

+                if((pHandle->ulInode != INODE_INVALID) && (pHandle->bVolNum == bVolNum))

+                {

+                    ret = -RED_EBUSY;

+                    break;

+                }

+            }

+        }

+

+      #if REDCONF_VOLUME_COUNT > 1U

+        if(ret == 0)

+        {

+            ret = RedCoreVolSetCurrent(bVolNum);

+        }

+      #endif

+

+        if(ret == 0)

+        {

+            ret = RedCoreVolUnmount();

+        }

+

+        PosixLeave();

+    }

+

+    return PosixReturn(ret);

+}

+

+

+#if (REDCONF_READ_ONLY == 0) && (REDCONF_API_POSIX_FORMAT == 1)

+/** @brief Format a file system volume.

+

+    Uses the statically defined volume configuration.  After calling this

+    function, the volume needs to be mounted -- see red_mount().

+

+    An error is returned if the volume is mounted.

+

+    @param pszVolume    A path prefix identifying the volume to format.

+

+    @return On success, zero is returned.  On error, -1 is returned and

+            #red_errno is set appropriately.

+

+    <b>Errno values</b>

+    - #RED_EBUSY: Volume is mounted.

+    - #RED_EINVAL: @p pszVolume is `NULL`; or the driver is uninitialized.

+    - #RED_EIO: I/O error formatting the volume.

+    - #RED_ENOENT: @p pszVolume is not a valid volume path prefix.

+    - #RED_EUSERS: Cannot become a file system user: too many users.

+*/

+int32_t red_format(

+    const char *pszVolume)

+{

+    REDSTATUS   ret;

+

+    ret = PosixEnter();

+    if(ret == 0)

+    {

+        uint8_t bVolNum;

+

+        ret = RedPathSplit(pszVolume, &bVolNum, NULL);

+

+      #if REDCONF_VOLUME_COUNT > 1U

+        if(ret == 0)

+        {

+            ret = RedCoreVolSetCurrent(bVolNum);

+        }

+      #endif

+

+        if(ret == 0)

+        {

+            ret = RedCoreVolFormat();

+        }

+

+        PosixLeave();

+    }

+

+    return PosixReturn(ret);

+}

+#endif

+

+

+#if REDCONF_READ_ONLY == 0

+/** @brief Commit a transaction point.

+

+    Reliance Edge is a transactional file system.  All modifications, of both

+    metadata and filedata, are initially working state.  A transaction point

+    is a process whereby the working state atomically becomes the committed

+    state, replacing the previous committed state.  Whenever Reliance Edge is

+    mounted, including after power loss, the state of the file system after

+    mount is the most recent committed state.  Nothing from the committed

+    state is ever missing, and nothing from the working state is ever included.

+

+    @param pszVolume    A path prefix identifying the volume to transact.

+

+    @return On success, zero is returned.  On error, -1 is returned and

+            #red_errno is set appropriately.

+

+    <b>Errno values</b>

+    - #RED_EINVAL: Volume is not mounted; or @p pszVolume is `NULL`.

+    - #RED_EIO: I/O error during the transaction point.

+    - #RED_ENOENT: @p pszVolume is not a valid volume path prefix.

+    - #RED_EUSERS: Cannot become a file system user: too many users.

+*/

+int32_t red_transact(

+    const char *pszVolume)

+{

+    REDSTATUS   ret;

+

+    ret = PosixEnter();

+    if(ret == 0)

+    {

+        uint8_t bVolNum;

+

+        ret = RedPathSplit(pszVolume, &bVolNum, NULL);

+

+      #if REDCONF_VOLUME_COUNT > 1U

+        if(ret == 0)

+        {

+            ret = RedCoreVolSetCurrent(bVolNum);

+        }

+      #endif

+

+        if(ret == 0)

+        {

+            ret = RedCoreVolTransact();

+        }

+

+        PosixLeave();

+    }

+

+    return PosixReturn(ret);

+}

+#endif

+

+

+#if REDCONF_READ_ONLY == 0

+/** @brief Update the transaction mask.

+

+    The following events are available:

+

+    - #RED_TRANSACT_UMOUNT

+    - #RED_TRANSACT_CREAT

+    - #RED_TRANSACT_UNLINK

+    - #RED_TRANSACT_MKDIR

+    - #RED_TRANSACT_RENAME

+    - #RED_TRANSACT_LINK

+    - #RED_TRANSACT_CLOSE

+    - #RED_TRANSACT_WRITE

+    - #RED_TRANSACT_FSYNC

+    - #RED_TRANSACT_TRUNCATE

+    - #RED_TRANSACT_VOLFULL

+

+    The #RED_TRANSACT_MANUAL macro (by itself) may be used to disable all

+    automatic transaction events.  The #RED_TRANSACT_MASK macro is a bitmask

+    of all transaction flags, excluding those representing excluded

+    functionality.

+

+    Attempting to enable events for excluded functionality will result in an

+    error.

+

+    @param pszVolume    The path prefix of the volume whose transaction mask is

+                        being changed.

+    @param ulEventMask  A bitwise-OR'd mask of automatic transaction events to

+                        be set as the current transaction mode.

+

+    @return On success, zero is returned.  On error, -1 is returned and

+            #red_errno is set appropriately.

+

+    <b>Errno values</b>

+    - #RED_EINVAL: Volume is not mounted; or @p pszVolume is `NULL`; or

+      @p ulEventMask contains invalid bits.

+    - #RED_ENOENT: @p pszVolume is not a valid volume path prefix.

+    - #RED_EUSERS: Cannot become a file system user: too many users.

+*/

+int32_t red_settransmask(

+    const char *pszVolume,

+    uint32_t    ulEventMask)

+{

+    REDSTATUS   ret;

+

+    ret = PosixEnter();

+    if(ret == 0)

+    {

+        uint8_t bVolNum;

+

+        ret = RedPathSplit(pszVolume, &bVolNum, NULL);

+

+      #if REDCONF_VOLUME_COUNT > 1U

+        if(ret == 0)

+        {

+            ret = RedCoreVolSetCurrent(bVolNum);

+        }

+      #endif

+

+        if(ret == 0)

+        {

+            ret = RedCoreTransMaskSet(ulEventMask);

+        }

+

+        PosixLeave();

+    }

+

+    return PosixReturn(ret);

+}

+#endif

+

+

+/** @brief Read the transaction mask.

+

+    If the volume is read-only, the returned event mask is always zero.

+

+    @param pszVolume    The path prefix of the volume whose transaction mask is

+                        being retrieved.

+    @param pulEventMask Populated with a bitwise-OR'd mask of automatic

+                        transaction events which represent the current

+                        transaction mode for the volume.

+

+    @return On success, zero is returned.  On error, -1 is returned and

+            #red_errno is set appropriately.

+

+    <b>Errno values</b>

+    - #RED_EINVAL: Volume is not mounted; or @p pszVolume is `NULL`; or

+      @p pulEventMask is `NULL`.

+    - #RED_ENOENT: @p pszVolume is not a valid volume path prefix.

+    - #RED_EUSERS: Cannot become a file system user: too many users.

+*/

+int32_t red_gettransmask(

+    const char *pszVolume,

+    uint32_t   *pulEventMask)

+{

+    REDSTATUS   ret;

+

+    ret = PosixEnter();

+    if(ret == 0)

+    {

+        uint8_t bVolNum;

+

+        ret = RedPathSplit(pszVolume, &bVolNum, NULL);

+

+      #if REDCONF_VOLUME_COUNT > 1U

+        if(ret == 0)

+        {

+            ret = RedCoreVolSetCurrent(bVolNum);

+        }

+      #endif

+

+        if(ret == 0)

+        {

+            ret = RedCoreTransMaskGet(pulEventMask);

+        }

+

+        PosixLeave();

+    }

+

+    return PosixReturn(ret);

+}

+

+

+/** @brief Query file system status information.

+

+    @p pszVolume should name a valid volume prefix or a valid root directory;

+    this differs from POSIX statvfs, where any existing file or directory is a

+    valid path.

+

+    @param pszVolume    The path prefix of the volume to query.

+    @param pStatvfs     The buffer to populate with volume information.

+

+    @return On success, zero is returned.  On error, -1 is returned and

+            #red_errno is set appropriately.

+

+    <b>Errno values</b>

+    - #RED_EINVAL: Volume is not mounted; or @p pszVolume is `NULL`; or

+      @p pStatvfs is `NULL`.

+    - #RED_ENOENT: @p pszVolume is not a valid volume path prefix.

+    - #RED_EUSERS: Cannot become a file system user: too many users.

+*/

+int32_t red_statvfs(

+    const char *pszVolume,

+    REDSTATFS  *pStatvfs)

+{

+    REDSTATUS   ret;

+

+    ret = PosixEnter();

+    if(ret == 0)

+    {

+        uint8_t bVolNum;

+

+        ret = RedPathSplit(pszVolume, &bVolNum, NULL);

+

+      #if REDCONF_VOLUME_COUNT > 1U

+        if(ret == 0)

+        {

+            ret = RedCoreVolSetCurrent(bVolNum);

+        }

+      #endif

+

+        if(ret == 0)

+        {

+            ret = RedCoreVolStat(pStatvfs);

+        }

+

+        PosixLeave();

+    }

+

+    return PosixReturn(ret);

+}

+

+

+/** @brief Open a file or directory.

+

+    Exactly one file access mode must be specified:

+

+    - #RED_O_RDONLY: Open for reading only.

+    - #RED_O_WRONLY: Open for writing only.

+    - #RED_O_RDWR: Open for reading and writing.

+

+    Directories can only be opened with `RED_O_RDONLY`.

+

+    The following flags may also be used:

+

+    - #RED_O_APPEND: Set the file offset to the end-of-file prior to each

+      write.

+    - #RED_O_CREAT: Create the named file if it does not exist.

+    - #RED_O_EXCL: In combination with `RED_O_CREAT`, return an error if the

+      path already exists.

+    - #RED_O_TRUNC: Truncate the opened file to size zero.  Only supported when

+      #REDCONF_API_POSIX_FTRUNCATE is true.

+

+    #RED_O_CREAT, #RED_O_EXCL, and #RED_O_TRUNC are invalid with #RED_O_RDONLY.

+    #RED_O_EXCL is invalid without #RED_O_CREAT.

+

+    If the volume is read-only, #RED_O_RDONLY is the only valid open flag; use

+    of any other flag will result in an error.

+

+    If #RED_O_TRUNC frees data which is in the committed state, it will not

+    return to free space until after a transaction point.

+

+    The returned file descriptor must later be closed with red_close().

+

+    Unlike POSIX open, there is no optional third argument for the permissions

+    (which Reliance Edge does not use) and other open flags (like `O_SYNC`) are

+    not supported.

+

+    @param pszPath      The path to the file or directory.

+    @param ulOpenMode   The open flags (mask of `RED_O_` values).

+

+    @return On success, a nonnegative file descriptor is returned.  On error,

+            -1 is returned and #red_errno is set appropriately.

+

+    <b>Errno values</b>

+    - #RED_EEXIST: Using #RED_O_CREAT and #RED_O_EXCL, and the indicated path

+      already exists.

+    - #RED_EINVAL: @p ulOpenMode is invalid; or @p pszPath is `NULL`; or the

+      volume containing the path is not mounted.

+    - #RED_EIO: A disk I/O error occurred.

+    - #RED_EISDIR: The path names a directory and @p ulOpenMode includes

+      #RED_O_WRONLY or #RED_O_RDWR.

+    - #RED_EMFILE: There are no available file descriptors.

+    - #RED_ENAMETOOLONG: The length of a component of @p pszPath is longer than

+      #REDCONF_NAME_MAX.

+    - #RED_ENFILE: Attempting to create a file but the file system has used all

+      available inode slots.

+    - #RED_ENOENT: #RED_O_CREAT is not set and the named file does not exist; or

+      #RED_O_CREAT is set and the parent directory does not exist; or the

+      volume does not exist; or the @p pszPath argument, after removing the

+      volume prefix, points to an empty string.

+    - #RED_ENOSPC: The file does not exist and #RED_O_CREAT was specified, but

+      there is insufficient free space to expand the directory or to create the

+      new file.

+    - #RED_ENOTDIR: A component of the prefix in @p pszPath does not name a

+      directory.

+    - #RED_EROFS: The path resides on a read-only file system and a write

+      operation was requested.

+    - #RED_EUSERS: Cannot become a file system user: too many users.

+*/

+int32_t red_open(

+    const char *pszPath,

+    uint32_t    ulOpenMode)

+{

+    int32_t     iFildes = -1;   /* Init'd to quiet warnings. */

+    REDSTATUS   ret;

+

+  #if REDCONF_READ_ONLY == 1

+    if(ulOpenMode != RED_O_RDONLY)

+    {

+        ret = -RED_EROFS;

+    }

+  #else

+    if(    (ulOpenMode != (ulOpenMode & RED_O_MASK))

+        || ((ulOpenMode & (RED_O_RDONLY|RED_O_WRONLY|RED_O_RDWR)) == 0U)

+        || (((ulOpenMode & RED_O_RDONLY) != 0U) && ((ulOpenMode & (RED_O_WRONLY|RED_O_RDWR)) != 0U))

+        || (((ulOpenMode & RED_O_WRONLY) != 0U) && ((ulOpenMode & (RED_O_RDONLY|RED_O_RDWR)) != 0U))

+        || (((ulOpenMode & RED_O_RDWR) != 0U) && ((ulOpenMode & (RED_O_RDONLY|RED_O_WRONLY)) != 0U))

+        || (((ulOpenMode & (RED_O_TRUNC|RED_O_CREAT|RED_O_EXCL)) != 0U) && ((ulOpenMode & RED_O_RDONLY) != 0U))

+        || (((ulOpenMode & RED_O_EXCL) != 0U) && ((ulOpenMode & RED_O_CREAT) == 0U)))

+    {

+        ret = -RED_EINVAL;

+    }

+  #if REDCONF_API_POSIX_FTRUNCATE == 0

+    else if((ulOpenMode & RED_O_TRUNC) != 0U)

+    {

+        ret = -RED_EINVAL;

+    }

+  #endif

+  #endif

+    else

+    {

+        ret = PosixEnter();

+    }

+

+    if(ret == 0)

+    {

+        ret = FildesOpen(pszPath, ulOpenMode, FTYPE_EITHER, &iFildes);

+

+        PosixLeave();

+    }

+

+    if(ret != 0)

+    {

+        iFildes = PosixReturn(ret);

+    }

+

+    return iFildes;

+}

+

+

+#if (REDCONF_READ_ONLY == 0) && (REDCONF_API_POSIX_UNLINK == 1)

+/** @brief Delete a file or directory.

+

+    The given name is deleted and the link count of the corresponding inode is

+    decremented.  If the link count falls to zero (no remaining hard links),

+    the inode will be deleted.

+

+    Unlike POSIX unlink, deleting a file or directory with open handles (file

+    descriptors or directory streams) will fail with an #RED_EBUSY error.  This

+    only applies when deleting an inode with a link count of one; if a file has

+    multiple names (hard links), all but the last name may be deleted even if

+    the file is open.

+

+    If the path names a directory which is not empty, the unlink will fail.

+

+    If the deletion frees data in the committed state, it will not return to

+    free space until after a transaction point.

+

+    Unlike POSIX unlink, this function can fail when the disk is full.  To fix

+    this, transact and try again: Reliance Edge guarantees that it is possible

+    to delete at least one file or directory after a transaction point.  If disk

+    full automatic transactions are enabled, this will happen automatically.

+

+    @param pszPath  The path of the file or directory to delete.

+

+    @return On success, zero is returned.  On error, -1 is returned and

+            #red_errno is set appropriately.

+

+    <b>Errno values</b>

+    - #RED_EBUSY: @p pszPath points to an inode with open handles and a link

+      count of one.

+    - #RED_EINVAL: @p pszPath is `NULL`; or the volume containing the path is

+      not mounted.

+    - #RED_EIO: A disk I/O error occurred.

+    - #RED_ENAMETOOLONG: The length of a component of @p pszPath is longer than

+      #REDCONF_NAME_MAX.

+    - #RED_ENOENT: The path does not name an existing file; or the @p pszPath

+      argument, after removing the volume prefix, points to an empty string.

+    - #RED_ENOTDIR: A component of the path prefix is not a directory.

+    - #RED_ENOTEMPTY: The path names a directory which is not empty.

+    - #RED_ENOSPC: The file system does not have enough space to modify the

+      parent directory to perform the deletion.

+    - #RED_EUSERS: Cannot become a file system user: too many users.

+*/

+int32_t red_unlink(

+    const char *pszPath)

+{

+    REDSTATUS   ret;

+

+    ret = PosixEnter();

+    if(ret == 0)

+    {

+        ret = UnlinkSub(pszPath, FTYPE_EITHER);

+

+        PosixLeave();

+    }

+

+    return PosixReturn(ret);

+}

+#endif

+

+

+#if (REDCONF_READ_ONLY == 0) && (REDCONF_API_POSIX_MKDIR == 1)

+/** @brief Create a new directory.

+

+    Unlike POSIX mkdir, this function has no second argument for the

+    permissions (which Reliance Edge does not use).

+

+    @param pszPath  The name and location of the directory to create.

+

+    @return On success, zero is returned.  On error, -1 is returned and

+            #red_errno is set appropriately.

+

+    <b>Errno values</b>

+    - #RED_EEXIST: @p pszPath points to an existing file or directory.

+    - #RED_EINVAL: @p pszPath is `NULL`; or the volume containing the path is

+      not mounted.

+    - #RED_EIO: A disk I/O error occurred.

+    - #RED_ENAMETOOLONG: The length of a component of @p pszPath is longer than

+      #REDCONF_NAME_MAX.

+    - #RED_ENOENT: A component of the path prefix does not name an existing

+      directory; or the @p pszPath argument, after removing the volume prefix,

+      points to an empty string.

+    - #RED_ENOSPC: The file system does not have enough space for the new

+      directory or to extend the parent directory of the new directory.

+    - #RED_ENOTDIR: A component of the path prefix is not a directory.

+    - #RED_EROFS: The parent directory resides on a read-only file system.

+    - #RED_EUSERS: Cannot become a file system user: too many users.

+*/

+int32_t red_mkdir(

+    const char *pszPath)

+{

+    REDSTATUS   ret;

+

+    ret = PosixEnter();

+    if(ret == 0)

+    {

+        const char *pszLocalPath;

+        uint8_t     bVolNum;

+

+        ret = RedPathSplit(pszPath, &bVolNum, &pszLocalPath);

+

+      #if REDCONF_VOLUME_COUNT > 1U

+        if(ret == 0)

+        {

+            ret = RedCoreVolSetCurrent(bVolNum);

+        }

+      #endif

+

+        if(ret == 0)

+        {

+            const char *pszName;

+            uint32_t    ulPInode;

+

+            ret = RedPathToName(pszLocalPath, &ulPInode, &pszName);

+

+            if(ret == 0)

+            {

+                uint32_t ulInode;

+

+                ret = RedCoreCreate(ulPInode, pszName, true, &ulInode);

+            }

+        }

+

+        PosixLeave();

+    }

+

+    return PosixReturn(ret);

+}

+#endif

+

+

+#if (REDCONF_READ_ONLY == 0) && (REDCONF_API_POSIX_RMDIR == 1)

+/** @brief Delete a directory.

+

+    The given directory name is deleted and the corresponding directory inode

+    will be deleted.

+

+    Unlike POSIX rmdir, deleting a directory with open handles (file

+    descriptors or directory streams) will fail with an #RED_EBUSY error.

+

+    If the path names a directory which is not empty, the deletion will fail.

+    If the path names the root directory of a file system volume, the deletion

+    will fail.

+

+    If the path names a regular file, the deletion will fail.  This provides

+    type checking and may be useful in cases where an application knows the

+    path to be deleted should name a directory.

+

+    If the deletion frees data in the committed state, it will not return to

+    free space until after a transaction point.

+

+    Unlike POSIX rmdir, this function can fail when the disk is full.  To fix

+    this, transact and try again: Reliance Edge guarantees that it is possible

+    to delete at least one file or directory after a transaction point.  If disk

+    full automatic transactions are enabled, this will happen automatically.

+

+    @param pszPath  The path of the directory to delete.

+

+    @return On success, zero is returned.  On error, -1 is returned and

+            #red_errno is set appropriately.

+

+    <b>Errno values</b>

+    - #RED_EBUSY: @p pszPath points to a directory with open handles.

+    - #RED_EINVAL: @p pszPath is `NULL`; or the volume containing the path is

+      not mounted.

+    - #RED_EIO: A disk I/O error occurred.

+    - #RED_ENAMETOOLONG: The length of a component of @p pszPath is longer than

+      #REDCONF_NAME_MAX.

+    - #RED_ENOENT: The path does not name an existing directory; or the

+      @p pszPath argument, after removing the volume prefix, points to an empty

+      string.

+    - #RED_ENOTDIR: A component of the path is not a directory.

+    - #RED_ENOTEMPTY: The path names a directory which is not empty.

+    - #RED_ENOSPC: The file system does not have enough space to modify the

+      parent directory to perform the deletion.

+    - #RED_EROFS: The directory to be removed resides on a read-only file

+      system.

+    - #RED_EUSERS: Cannot become a file system user: too many users.

+*/

+int32_t red_rmdir(

+    const char *pszPath)

+{

+    REDSTATUS   ret;

+

+    ret = PosixEnter();

+    if(ret == 0)

+    {

+        ret = UnlinkSub(pszPath, FTYPE_DIR);

+

+        PosixLeave();

+    }

+

+    return PosixReturn(ret);

+}

+#endif

+

+

+#if (REDCONF_READ_ONLY == 0) && (REDCONF_API_POSIX_RENAME == 1)

+/** @brief Rename a file or directory.

+

+    Both paths must reside on the same file system volume.  Attempting to use

+    this API to move a file to a different volume will result in an error.

+

+    If @p pszNewPath names an existing file or directory, the behavior depends

+    on the configuration.  If #REDCONF_RENAME_ATOMIC is false, and if the

+    destination name exists, this function always fails and sets #red_errno to

+    #RED_EEXIST.  This behavior is contrary to POSIX.

+

+    If #REDCONF_RENAME_ATOMIC is true, and if the new name exists, then in one

+    atomic operation, @p pszNewPath is unlinked and @p pszOldPath is renamed to

+    @p pszNewPath.  Both @p pszNewPath and @p pszOldPath must be of the same

+    type (both files or both directories).  As with red_unlink(), if

+    @p pszNewPath is a directory, it must be empty.  The major exception to this

+    behavior is that if both @p pszOldPath and @p pszNewPath are links to the

+    same inode, then the rename does nothing and both names continue to exist.

+    Unlike POSIX rename, if @p pszNewPath points to an inode with a link count

+    of one and open handles (file descriptors or directory streams), the

+    rename will fail with #RED_EBUSY.

+

+    If the rename deletes the old destination, it may free data in the

+    committed state, which will not return to free space until after a

+    transaction point.  Similarly, if the deleted inode was part of the

+    committed state, the inode slot will not be available until after a

+    transaction point.

+

+    @param pszOldPath   The path of the file or directory to rename.

+    @param pszNewPath   The new name and location after the rename.

+

+    @return On success, zero is returned.  On error, -1 is returned and

+            #red_errno is set appropriately.

+

+    <b>Errno values</b>

+    - #RED_EBUSY: #REDCONF_RENAME_ATOMIC is true and @p pszNewPath points to an

+      inode with open handles and a link count of one.

+    - #RED_EEXIST: #REDCONF_RENAME_ATOMIC is false and @p pszNewPath exists.

+    - #RED_EINVAL: @p pszOldPath is `NULL`; or @p pszNewPath is `NULL`; or the

+      volume containing the path is not mounted.

+    - #RED_EIO: A disk I/O error occurred.

+    - #RED_EISDIR: The @p pszNewPath argument names a directory and the

+      @p pszOldPath argument names a non-directory.

+    - #RED_ENAMETOOLONG: The length of a component of either @p pszOldPath or

+      @p pszNewPath is longer than #REDCONF_NAME_MAX.

+    - #RED_ENOENT: The link named by @p pszOldPath does not name an existing

+      entry; or either @p pszOldPath or @p pszNewPath, after removing the volume

+      prefix, point to an empty string.

+    - #RED_ENOTDIR: A component of either path prefix is not a directory; or

+      @p pszOldPath names a directory and @p pszNewPath names a file.

+    - #RED_ENOTEMPTY: The path named by @p pszNewPath is a directory which is

+      not empty.

+    - #RED_ENOSPC: The file system does not have enough space to extend the

+      directory that would contain @p pszNewPath.

+    - #RED_EROFS: The directory to be removed resides on a read-only file

+      system.

+    - #RED_EUSERS: Cannot become a file system user: too many users.

+    - #RED_EXDEV: @p pszOldPath and @p pszNewPath are on different file system

+      volumes.

+*/

+int32_t red_rename(

+    const char *pszOldPath,

+    const char *pszNewPath)

+{

+    REDSTATUS   ret;

+

+    ret = PosixEnter();

+    if(ret == 0)

+    {

+        const char *pszOldLocalPath;

+        uint8_t     bOldVolNum;

+

+        ret = RedPathSplit(pszOldPath, &bOldVolNum, &pszOldLocalPath);

+

+        if(ret == 0)

+        {

+            const char *pszNewLocalPath;

+            uint8_t     bNewVolNum;

+

+            ret = RedPathSplit(pszNewPath, &bNewVolNum, &pszNewLocalPath);

+

+            if((ret == 0) && (bOldVolNum != bNewVolNum))

+            {

+                ret = -RED_EXDEV;

+            }

+

+          #if REDCONF_VOLUME_COUNT > 1U

+            if(ret == 0)

+            {

+                ret = RedCoreVolSetCurrent(bOldVolNum);

+            }

+          #endif

+

+            if(ret == 0)

+            {

+                const char *pszOldName;

+                uint32_t    ulOldPInode;

+

+                ret = RedPathToName(pszOldLocalPath, &ulOldPInode, &pszOldName);

+

+                if(ret == 0)

+                {

+                    const char *pszNewName;

+                    uint32_t    ulNewPInode;

+

+                    ret = RedPathToName(pszNewLocalPath, &ulNewPInode, &pszNewName);

+

+                  #if REDCONF_RENAME_ATOMIC == 1

+                    if(ret == 0)

+                    {

+                        uint32_t ulDestInode;

+

+                        ret = RedCoreLookup(ulNewPInode, pszNewName, &ulDestInode);

+                        if(ret == 0)

+                        {

+                            ret = InodeUnlinkCheck(ulDestInode);

+                        }

+                        else if(ret == -RED_ENOENT)

+                        {

+                            ret = 0;

+                        }

+                        else

+                        {

+                            /*  Unexpected error, nothing to do.

+                            */

+                        }

+                    }

+                  #endif

+

+                    if(ret == 0)

+                    {

+                        ret = RedCoreRename(ulOldPInode, pszOldName, ulNewPInode, pszNewName);

+                    }

+                }

+            }

+        }

+

+        PosixLeave();

+    }

+

+    return PosixReturn(ret);

+}

+#endif

+

+

+#if (REDCONF_READ_ONLY == 0) && (REDCONF_API_POSIX_LINK == 1)

+/** @brief Create a hard link.

+

+    This creates an additional name (link) for the file named by @p pszPath.

+    The new name refers to the same file with the same contents.  If a name is

+    deleted, but the underlying file has other names, the file continues to

+    exist.  The link count (accessible via red_fstat()) indicates the number of

+    names that a file has.  All of a file's names are on equal footing: there

+    is nothing special about the original name.

+

+    If @p pszPath names a directory, the operation will fail.

+

+    @param pszPath      The path indicating the inode for the new link.

+    @param pszHardLink  The name and location for the new link.

+

+    @return On success, zero is returned.  On error, -1 is returned and

+            #red_errno is set appropriately.

+

+    <b>Errno values</b>

+    - #RED_EEXIST: @p pszHardLink resolves to an existing file.

+    - #RED_EINVAL: @p pszPath or @p pszHardLink is `NULL`; or the volume

+      containing the paths is not mounted.

+    - #RED_EIO: A disk I/O error occurred.

+    - #RED_EMLINK: Creating the link would exceed the maximum link count of the

+      inode named by @p pszPath.

+    - #RED_ENAMETOOLONG: The length of a component of either @p pszPath or

+      @p pszHardLink is longer than #REDCONF_NAME_MAX.

+    - #RED_ENOENT: A component of either path prefix does not exist; or the file

+      named by @p pszPath does not exist; or either @p pszPath or

+      @p pszHardLink, after removing the volume prefix, point to an empty

+      string.

+    - #RED_ENOSPC: There is insufficient free space to expand the directory that

+      would contain the link.

+    - #RED_ENOTDIR: A component of either path prefix is not a directory.

+    - #RED_EPERM: The @p pszPath argument names a directory.

+    - #RED_EROFS: The requested link requires writing in a directory on a

+      read-only file system.

+    - #RED_EUSERS: Cannot become a file system user: too many users.

+    - #RED_EXDEV: @p pszPath and @p pszHardLink are on different file system

+      volumes.

+*/

+int32_t red_link(

+    const char *pszPath,

+    const char *pszHardLink)

+{

+    REDSTATUS   ret;

+

+    ret = PosixEnter();

+    if(ret == 0)

+    {

+        const char *pszLocalPath;

+        uint8_t     bVolNum;

+

+        ret = RedPathSplit(pszPath, &bVolNum, &pszLocalPath);

+

+        if(ret == 0)

+        {

+            const char *pszLinkLocalPath;

+            uint8_t     bLinkVolNum;

+

+            ret = RedPathSplit(pszHardLink, &bLinkVolNum, &pszLinkLocalPath);

+

+            if((ret == 0) && (bVolNum != bLinkVolNum))

+            {

+                ret = -RED_EXDEV;

+            }

+

+          #if REDCONF_VOLUME_COUNT > 1U

+            if(ret == 0)

+            {

+                ret = RedCoreVolSetCurrent(bVolNum);

+            }

+          #endif

+

+            if(ret == 0)

+            {

+                uint32_t    ulInode;

+

+                ret = RedPathLookup(pszLocalPath, &ulInode);

+

+                if(ret == 0)

+                {

+                    const char *pszLinkName;

+                    uint32_t    ulLinkPInode;

+

+                    ret = RedPathToName(pszLinkLocalPath, &ulLinkPInode, &pszLinkName);

+

+                    if(ret == 0)

+                    {

+                        ret = RedCoreLink(ulLinkPInode, pszLinkName, ulInode);

+                    }

+                }

+            }

+        }

+

+        PosixLeave();

+    }

+

+    return PosixReturn(ret);

+}

+#endif

+

+

+/** @brief Close a file descriptor.

+

+    @param iFildes  The file descriptor to close.

+

+    @return On success, zero is returned.  On error, -1 is returned and

+            #red_errno is set appropriately.

+

+    <b>Errno values</b>

+    - #RED_EBADF: @p iFildes is not a valid file descriptor.

+    - #RED_EIO: A disk I/O error occurred.

+    - #RED_EUSERS: Cannot become a file system user: too many users.

+*/

+int32_t red_close(

+    int32_t     iFildes)

+{

+    REDSTATUS   ret;

+

+    ret = PosixEnter();

+    if(ret == 0)

+    {

+        ret = FildesClose(iFildes);

+

+        PosixLeave();

+    }

+

+    return PosixReturn(ret);

+}

+

+

+/** @brief Read from an open file.

+

+    The read takes place at the file offset associated with @p iFildes and

+    advances the file offset by the number of bytes actually read.

+

+    Data which has not yet been written, but which is before the end-of-file

+    (sparse data), will read as zeroes.  A short read -- where the number of

+    bytes read is less than requested -- indicates that the requested read was

+    partially or, if zero bytes were read, entirely beyond the end-of-file.

+

+    @param iFildes  The file descriptor from which to read.

+    @param pBuffer  The buffer to populate with data read.  Must be at least

+                    @p ulLength bytes in size.

+    @param ulLength Number of bytes to attempt to read.

+

+    @return On success, returns a nonnegative value indicating the number of

+            bytes actually read.  On error, -1 is returned and #red_errno is

+            set appropriately.

+

+    <b>Errno values</b>

+    - #RED_EBADF: The @p iFildes argument is not a valid file descriptor open

+      for reading.

+    - #RED_EINVAL: @p pBuffer is `NULL`; or @p ulLength exceeds INT32_MAX and

+      cannot be returned properly.

+    - #RED_EIO: A disk I/O error occurred.

+    - #RED_EISDIR: The @p iFildes is a file descriptor for a directory.

+    - #RED_EUSERS: Cannot become a file system user: too many users.

+*/

+int32_t red_read(

+    int32_t     iFildes,

+    void       *pBuffer,

+    uint32_t    ulLength)

+{

+    uint32_t    ulLenRead = 0U;

+    REDSTATUS   ret;

+    int32_t     iReturn;

+

+    if(ulLength > (uint32_t)INT32_MAX)

+    {

+        ret = -RED_EINVAL;

+    }

+    else

+    {

+        ret = PosixEnter();

+    }

+

+    if(ret == 0)

+    {

+        REDHANDLE  *pHandle;

+

+        ret = FildesToHandle(iFildes, FTYPE_FILE, &pHandle);

+

+        if((ret == 0) && ((pHandle->bFlags & HFLAG_READABLE) == 0U))

+        {

+            ret = -RED_EBADF;

+        }

+

+      #if REDCONF_VOLUME_COUNT > 1U

+        if(ret == 0)

+        {

+            ret = RedCoreVolSetCurrent(pHandle->bVolNum);

+        }

+      #endif

+

+        if(ret == 0)

+        {

+            ulLenRead = ulLength;

+            ret = RedCoreFileRead(pHandle->ulInode, pHandle->ullOffset, &ulLenRead, pBuffer);

+        }

+

+        if(ret == 0)

+        {

+            REDASSERT(ulLenRead <= ulLength);

+

+            pHandle->ullOffset += ulLenRead;

+        }

+

+        PosixLeave();

+    }

+

+    if(ret == 0)

+    {

+        iReturn = (int32_t)ulLenRead;

+    }

+    else

+    {

+        iReturn = PosixReturn(ret);

+    }

+

+    return iReturn;

+}

+

+

+#if REDCONF_READ_ONLY == 0

+/** @brief Write to an open file.

+

+    The write takes place at the file offset associated with @p iFildes and

+    advances the file offset by the number of bytes actually written.

+    Alternatively, if @p iFildes was opened with #RED_O_APPEND, the file offset

+    is set to the end-of-file before the write begins, and likewise advances by

+    the number of bytes actually written.

+

+    A short write -- where the number of bytes written is less than requested

+    -- indicates either that the file system ran out of space but was still

+    able to write some of the request; or that the request would have caused

+    the file to exceed the maximum file size, but some of the data could be

+    written prior to the file size limit.

+

+    If an error is returned (-1), either none of the data was written or a

+    critical error occurred (like an I/O error) and the file system volume will

+    be read-only.

+

+    @param iFildes  The file descriptor to write to.

+    @param pBuffer  The buffer containing the data to be written.  Must be at

+                    least @p ulLength bytes in size.

+    @param ulLength Number of bytes to attempt to write.

+

+    @return On success, returns a nonnegative value indicating the number of

+            bytes actually written.  On error, -1 is returned and #red_errno is

+            set appropriately.

+

+    <b>Errno values</b>

+    - #RED_EBADF: The @p iFildes argument is not a valid file descriptor open

+      for writing.  This includes the case where the file descriptor is for a

+      directory.

+    - #RED_EFBIG: No data can be written to the current file offset since the

+      resulting file size would exceed the maximum file size.

+    - #RED_EINVAL: @p pBuffer is `NULL`; or @p ulLength exceeds INT32_MAX and

+      cannot be returned properly.

+    - #RED_EIO: A disk I/O error occurred.

+    - #RED_ENOSPC: No data can be written because there is insufficient free

+      space.

+    - #RED_EUSERS: Cannot become a file system user: too many users.

+*/

+int32_t red_write(

+    int32_t     iFildes,

+    const void *pBuffer,

+    uint32_t    ulLength)

+{

+    uint32_t    ulLenWrote = 0U;

+    REDSTATUS   ret;

+    int32_t     iReturn;

+

+    if(ulLength > (uint32_t)INT32_MAX)

+    {

+        ret = -RED_EINVAL;

+    }

+    else

+    {

+        ret = PosixEnter();

+    }

+

+    if(ret == 0)

+    {

+        REDHANDLE *pHandle;

+

+        ret = FildesToHandle(iFildes, FTYPE_FILE, &pHandle);

+        if(ret == -RED_EISDIR)

+        {

+            /*  POSIX says that if a file descriptor is not writable, the

+                errno should be -RED_EBADF.  Directory file descriptors are

+                never writable, and unlike for read(), the spec does not

+                list -RED_EISDIR as an allowed errno.  Therefore -RED_EBADF

+                takes precedence.

+            */

+            ret = -RED_EBADF;

+        }

+

+        if((ret == 0) && ((pHandle->bFlags & HFLAG_WRITEABLE) == 0U))

+        {

+            ret = -RED_EBADF;

+        }

+

+      #if REDCONF_VOLUME_COUNT > 1U

+        if(ret == 0)

+        {

+            ret = RedCoreVolSetCurrent(pHandle->bVolNum);

+        }

+      #endif

+

+        if((ret == 0) && ((pHandle->bFlags & HFLAG_APPENDING) != 0U))

+        {

+            REDSTAT s;

+

+            ret = RedCoreStat(pHandle->ulInode, &s);

+            if(ret == 0)

+            {

+                pHandle->ullOffset = s.st_size;

+            }

+        }

+

+        if(ret == 0)

+        {

+            ulLenWrote = ulLength;

+            ret = RedCoreFileWrite(pHandle->ulInode, pHandle->ullOffset, &ulLenWrote, pBuffer);

+        }

+

+        if(ret == 0)

+        {

+            REDASSERT(ulLenWrote <= ulLength);

+

+            pHandle->ullOffset += ulLenWrote;

+        }

+

+        PosixLeave();

+    }

+

+    if(ret == 0)

+    {

+        iReturn = (int32_t)ulLenWrote;

+    }

+    else

+    {

+        iReturn = PosixReturn(ret);

+    }

+

+    return iReturn;

+}

+#endif

+

+

+#if REDCONF_READ_ONLY == 0

+/** @brief Synchronizes changes to a file.

+

+    Commits all changes associated with a file or directory (including file

+    data, directory contents, and metadata) to permanent storage.  This

+    function will not return until the operation is complete.

+

+    In the current implementation, this function has global effect.  All dirty

+    buffers are flushed and a transaction point is committed.  Fsyncing one

+    file effectively fsyncs all files.

+

+    If fsync automatic transactions have been disabled, this function does

+    nothing and returns success.  In the current implementation, this is the

+    only real difference between this function and red_transact(): this

+    function can be configured to do nothing, whereas red_transact() is

+    unconditional.

+

+    Applications written for portability should avoid assuming red_fsync()

+    effects all files, and use red_fsync() on each file that needs to be

+    synchronized.

+

+    Passing read-only file descriptors to this function is permitted.

+

+    @param iFildes  The file descriptor to synchronize.

+

+    @return On success, zero is returned.  On error, -1 is returned and

+            #red_errno is set appropriately.

+

+    <b>Errno values</b>

+    - #RED_EBADF: The @p iFildes argument is not a valid file descriptor.

+    - #RED_EIO: A disk I/O error occurred.

+    - #RED_EUSERS: Cannot become a file system user: too many users.

+*/

+int32_t red_fsync(

+    int32_t     iFildes)

+{

+    REDSTATUS   ret;

+

+    ret = PosixEnter();

+    if(ret == 0)

+    {

+        REDHANDLE *pHandle;

+

+        ret = FildesToHandle(iFildes, FTYPE_EITHER, &pHandle);

+

+      #if REDCONF_VOLUME_COUNT > 1U

+        if(ret == 0)

+        {

+            ret = RedCoreVolSetCurrent(pHandle->bVolNum);

+        }

+      #endif

+

+        /*  No core event for fsync, so this transaction flag needs to be

+            implemented here.

+        */

+        if(ret == 0)

+        {

+            uint32_t    ulTransMask;

+

+            ret = RedCoreTransMaskGet(&ulTransMask);

+

+            if((ret == 0) && ((ulTransMask & RED_TRANSACT_FSYNC) != 0U))

+            {

+                ret = RedCoreVolTransact();

+            }

+        }

+

+        PosixLeave();

+    }

+

+    return PosixReturn(ret);

+}

+#endif

+

+

+/** @brief Move the read/write file offset.

+

+    The file offset of the @p iFildes file descriptor is set to @p llOffset,

+    relative to some starting position.  The available positions are:

+

+    - ::RED_SEEK_SET Seek from the start of the file.  In other words,

+      @p llOffset becomes the new file offset.

+    - ::RED_SEEK_CUR Seek from the current file offset.  In other words,

+      @p llOffset is added to the current file offset.

+    - ::RED_SEEK_END Seek from the end-of-file.  In other words, the new file

+      offset is the file size plus @p llOffset.

+

+    Since @p llOffset is signed (can be negative), it is possible to seek

+    backward with ::RED_SEEK_CUR or ::RED_SEEK_END.

+

+    It is permitted to seek beyond the end-of-file; this does not increase the

+    file size (a subsequent red_write() call would).

+

+    Unlike POSIX lseek, this function cannot be used with directory file

+    descriptors.

+

+    @param iFildes  The file descriptor whose offset is to be updated.

+    @param llOffset The new file offset, relative to @p whence.

+    @param whence   The location from which @p llOffset should be applied.

+

+    @return On success, returns the new file position, measured in bytes from

+            the beginning of the file.  On error, -1 is returned and #red_errno

+            is set appropriately.

+

+    <b>Errno values</b>

+    - #RED_EBADF: The @p iFildes argument is not an open file descriptor.

+    - #RED_EINVAL: @p whence is not a valid `RED_SEEK_` value; or the resulting

+      file offset would be negative or beyond the maximum file size.

+    - #RED_EIO: A disk I/O error occurred.

+    - #RED_EISDIR: The @p iFildes argument is a file descriptor for a directory.

+    - #RED_EUSERS: Cannot become a file system user: too many users.

+*/

+int64_t red_lseek(

+    int32_t     iFildes,

+    int64_t     llOffset,

+    REDWHENCE   whence)

+{

+    REDSTATUS   ret;

+    int64_t     llReturn = -1;  /* Init'd to quiet warnings. */

+

+    ret = PosixEnter();

+    if(ret == 0)

+    {

+        int64_t     llFrom = 0; /* Init'd to quiet warnings. */

+        REDHANDLE  *pHandle;

+

+        /*  Unlike POSIX, we disallow lseek() on directory handles.

+        */

+        ret = FildesToHandle(iFildes, FTYPE_FILE, &pHandle);

+

+      #if REDCONF_VOLUME_COUNT > 1U

+        if(ret == 0)

+        {

+            ret = RedCoreVolSetCurrent(pHandle->bVolNum);

+        }

+      #endif

+

+        if(ret == 0)

+        {

+            switch(whence)

+            {

+                /*  Seek from the beginning of the file.

+                */

+                case RED_SEEK_SET:

+                    llFrom = 0;

+                    break;

+

+                /*  Seek from the current file offset.

+                */

+                case RED_SEEK_CUR:

+                    REDASSERT(pHandle->ullOffset <= (uint64_t)INT64_MAX);

+                    llFrom = (int64_t)pHandle->ullOffset;

+                    break;

+

+                /*  Seek from the end of the file.

+                */

+                case RED_SEEK_END:

+                {

+                    REDSTAT s;

+

+                    ret = RedCoreStat(pHandle->ulInode, &s);

+                    if(ret == 0)

+                    {

+                        REDASSERT(s.st_size <= (uint64_t)INT64_MAX);

+                        llFrom = (int64_t)s.st_size;

+                    }

+

+                    break;

+                }

+

+                default:

+                    ret = -RED_EINVAL;

+                    break;

+            }

+        }

+

+        if(ret == 0)

+        {

+            REDASSERT(llFrom >= 0);

+

+            /*  Avoid signed integer overflow from llFrom + llOffset with large

+                values of llOffset and nonzero llFrom values.  Underflow isn't

+                possible since llFrom is nonnegative.

+            */

+            if((llOffset > 0) && (((uint64_t)llFrom + (uint64_t)llOffset) > (uint64_t)INT64_MAX))

+            {

+                ret = -RED_EINVAL;

+            }

+            else

+            {

+                int64_t llNewOffset = llFrom + llOffset;

+

+                if((llNewOffset < 0) || ((uint64_t)llNewOffset > gpRedVolume->ullMaxInodeSize))

+                {

+                    /*  Invalid file offset.

+                    */

+                    ret = -RED_EINVAL;

+                }

+                else

+                {

+                    pHandle->ullOffset = (uint64_t)llNewOffset;

+                    llReturn = llNewOffset;

+                }

+            }

+        }

+

+        PosixLeave();

+    }

+

+    if(ret != 0)

+    {

+        llReturn = PosixReturn(ret);

+    }

+

+    return llReturn;

+}

+

+

+#if (REDCONF_READ_ONLY == 0) && (REDCONF_API_POSIX_FTRUNCATE == 1)

+/** @brief Truncate a file to a specified length.

+

+    Allows the file size to be increased, decreased, or to remain the same.  If

+    the file size is increased, the new area is sparse (will read as zeroes).

+    If the file size is decreased, the data beyond the new end-of-file will

+    return to free space once it is no longer part of the committed state

+    (either immediately or after the next transaction point).

+

+    The value of the file offset is not modified by this function.

+

+    Unlike POSIX ftruncate, this function can fail when the disk is full if

+    @p ullSize is non-zero.  If decreasing the file size, this can be fixed by

+    transacting and trying again: Reliance Edge guarantees that it is possible

+    to perform a truncate of at least one file that decreases the file size

+    after a transaction point.  If disk full transactions are enabled, this will

+    happen automatically.

+

+    @param iFildes  The file descriptor of the file to truncate.

+    @param ullSize  The new size of the file.

+

+    @return On success, zero is returned.  On error, -1 is returned and

+            #red_errno is set appropriately.

+

+    <b>Errno values</b>

+    - #RED_EBADF: The @p iFildes argument is not a valid file descriptor open

+      for writing.  This includes the case where the file descriptor is for a

+      directory.

+    - #RED_EFBIG: @p ullSize exceeds the maximum file size.

+    - #RED_EIO: A disk I/O error occurred.

+    - #RED_ENOSPC: Insufficient free space to perform the truncate.

+    - #RED_EUSERS: Cannot become a file system user: too many users.

+*/

+int32_t red_ftruncate(

+    int32_t     iFildes,

+    uint64_t    ullSize)

+{

+    REDSTATUS   ret;

+

+    ret = PosixEnter();

+    if(ret == 0)

+    {

+        REDHANDLE *pHandle;

+

+        ret = FildesToHandle(iFildes, FTYPE_FILE, &pHandle);

+        if(ret == -RED_EISDIR)

+        {

+            /*  Similar to red_write() (see comment there), the RED_EBADF error

+                for a non-writable file descriptor takes precedence.

+            */

+            ret = -RED_EBADF;

+        }

+

+        if((ret == 0) && ((pHandle->bFlags & HFLAG_WRITEABLE) == 0U))

+        {

+            ret = -RED_EBADF;

+        }

+

+      #if REDCONF_VOLUME_COUNT > 1U

+        if(ret == 0)

+        {

+            ret = RedCoreVolSetCurrent(pHandle->bVolNum);

+        }

+      #endif

+

+        if(ret == 0)

+        {

+            ret = RedCoreFileTruncate(pHandle->ulInode, ullSize);

+        }

+

+        PosixLeave();

+    }

+

+    return PosixReturn(ret);

+}

+#endif

+

+

+/** @brief Get the status of a file or directory.

+

+    See the ::REDSTAT type for the details of the information returned.

+

+    @param iFildes  An open file descriptor for the file whose information is

+                    to be retrieved.

+    @param pStat    Pointer to a ::REDSTAT buffer to populate.

+

+    @return On success, zero is returned.  On error, -1 is returned and

+            #red_errno is set appropriately.

+

+    <b>Errno values</b>

+    - #RED_EBADF: The @p iFildes argument is not a valid file descriptor.

+    - #RED_EINVAL: @p pStat is `NULL`.

+    - #RED_EIO: A disk I/O error occurred.

+    - #RED_EUSERS: Cannot become a file system user: too many users.

+*/

+int32_t red_fstat(

+    int32_t     iFildes,

+    REDSTAT    *pStat)

+{

+    REDSTATUS   ret;

+

+    ret = PosixEnter();

+    if(ret == 0)

+    {

+        REDHANDLE *pHandle;

+

+        ret = FildesToHandle(iFildes, FTYPE_EITHER, &pHandle);

+

+      #if REDCONF_VOLUME_COUNT > 1U

+        if(ret == 0)

+        {

+            ret = RedCoreVolSetCurrent(pHandle->bVolNum);

+        }

+      #endif

+

+        if(ret == 0)

+        {

+            ret = RedCoreStat(pHandle->ulInode, pStat);

+        }

+

+        PosixLeave();

+    }

+

+    return PosixReturn(ret);

+}

+

+

+#if REDCONF_API_POSIX_READDIR == 1

+/** @brief Open a directory stream for reading.

+

+    @param pszPath  The path of the directory to open.

+

+    @return On success, returns a pointer to a ::REDDIR object that can be used

+            with red_readdir() and red_closedir().  On error, returns `NULL`

+            and #red_errno is set appropriately.

+

+    <b>Errno values</b>

+    - #RED_EINVAL: @p pszPath is `NULL`; or the volume containing the path is

+      not mounted.

+    - #RED_EIO: A disk I/O error occurred.

+    - #RED_ENOENT: A component of @p pszPath does not exist; or the @p pszPath

+      argument, after removing the volume prefix, points to an empty string.

+    - #RED_ENOTDIR: A component of @p pszPath is a not a directory.

+    - #RED_EMFILE: There are no available file descriptors.

+    - #RED_EUSERS: Cannot become a file system user: too many users.

+*/

+REDDIR *red_opendir(

+    const char *pszPath)

+{

+    int32_t     iFildes;

+    REDSTATUS   ret;

+    REDDIR     *pDir = NULL;

+

+    ret = PosixEnter();

+    if(ret == 0)

+    {

+        ret = FildesOpen(pszPath, RED_O_RDONLY, FTYPE_DIR, &iFildes);

+        if(ret == 0)

+        {

+            uint16_t uHandleIdx;

+

+            FildesUnpack(iFildes, &uHandleIdx, NULL, NULL);

+            pDir = &gaHandle[uHandleIdx];

+        }

+

+        PosixLeave();

+    }

+

+    REDASSERT((pDir == NULL) == (ret != 0));

+

+    if(pDir == NULL)

+    {

+        red_errno = -ret;

+    }

+

+    return pDir;

+}

+

+

+/** @brief Read from a directory stream.

+

+    The ::REDDIRENT pointer returned by this function will be overwritten by

+    subsequent calls on the same @p pDir.  Calls with other ::REDDIR objects

+    will *not* modify the returned ::REDDIRENT.

+

+    If files are added to the directory after it is opened, the new files may

+    or may not be returned by this function.  If files are deleted, the deleted

+    files will not be returned.

+

+    This function (like its POSIX equivalent) returns `NULL` in two cases: on

+    error and when the end of the directory is reached.  To distinguish between

+    these two cases, the application should set #red_errno to zero before

+    calling this function, and if `NULL` is returned, check if #red_errno is

+    still zero.  If it is, the end of the directory was reached; otherwise,

+    there was an error.

+

+    @param pDirStream   The directory stream to read from.

+

+    @return On success, returns a pointer to a ::REDDIRENT object which is

+            populated with directory entry information read from the directory.

+            On error, returns `NULL` and #red_errno is set appropriately.  If at

+            the end of the directory, returns `NULL` but #red_errno is not

+            modified.

+

+    <b>Errno values</b>

+    - #RED_EBADF: @p pDirStream is not an open directory stream.

+    - #RED_EIO: A disk I/O error occurred.

+    - #RED_EUSERS: Cannot become a file system user: too many users.

+*/

+REDDIRENT *red_readdir(

+    REDDIR     *pDirStream)

+{

+    REDSTATUS   ret;

+    REDDIRENT  *pDirEnt = NULL;

+

+    ret = PosixEnter();

+    if(ret == 0)

+    {

+        if(!DirStreamIsValid(pDirStream))

+        {

+            ret = -RED_EBADF;

+        }

+      #if REDCONF_VOLUME_COUNT > 1U

+        else

+        {

+            ret = RedCoreVolSetCurrent(pDirStream->bVolNum);

+        }

+      #endif

+

+        if(ret == 0)

+        {

+            uint32_t ulDirPosition;

+

+            /*  To save memory, the directory position is stored in the same

+                location as the file offset.  This would be a bit cleaner using

+                a union, but MISRA-C:2012 Rule 19.2 disallows unions.

+            */

+            REDASSERT(pDirStream->ullOffset <= UINT32_MAX);

+            ulDirPosition = (uint32_t)pDirStream->ullOffset;

+

+            ret = RedCoreDirRead(pDirStream->ulInode, &ulDirPosition, pDirStream->dirent.d_name, &pDirStream->dirent.d_ino);

+

+            pDirStream->ullOffset = ulDirPosition;

+

+            if(ret == 0)

+            {

+                /*  POSIX extension: return stat information with the dirent.

+                */

+                ret = RedCoreStat(pDirStream->dirent.d_ino, &pDirStream->dirent.d_stat);

+                if(ret == 0)

+                {

+                    pDirEnt = &pDirStream->dirent;

+                }

+            }

+            else if(ret == -RED_ENOENT)

+            {

+                /*  Reached the end of the directory; return NULL but do not set

+                    errno.

+                */

+                ret = 0;

+            }

+            else

+            {

+                /*  Miscellaneous error; return NULL and set errno (done below).

+                */

+            }

+        }

+

+        PosixLeave();

+    }

+

+    if(ret != 0)

+    {

+        REDASSERT(pDirEnt == NULL);

+

+        red_errno = -ret;

+    }

+

+    return pDirEnt;

+}

+

+

+/** @brief Rewind a directory stream to read it from the beginning.

+

+    Similar to closing the directory object and opening it again, but without

+    the need for the path.

+

+    Since this function (like its POSIX equivalent) cannot return an error,

+    it takes no action in error conditions, such as when @p pDirStream is

+    invalid.

+

+    @param pDirStream   The directory stream to rewind.

+*/

+void red_rewinddir(

+    REDDIR *pDirStream)

+{

+    if(PosixEnter() == 0)

+    {

+        if(DirStreamIsValid(pDirStream))

+        {

+            pDirStream->ullOffset = 0U;

+        }

+

+        PosixLeave();

+    }

+}

+

+

+/** @brief Close a directory stream.

+

+    After calling this function, @p pDirStream should no longer be used.

+

+    @param pDirStream   The directory stream to close.

+

+    @return On success, zero is returned.  On error, -1 is returned and

+            #red_errno is set appropriately.

+

+    <b>Errno values</b>

+    - #RED_EBADF: @p pDirStream is not an open directory stream.

+    - #RED_EUSERS: Cannot become a file system user: too many users.

+*/

+int32_t red_closedir(

+    REDDIR     *pDirStream)

+{

+    REDSTATUS   ret;

+

+    ret = PosixEnter();

+    if(ret == 0)

+    {

+        if(DirStreamIsValid(pDirStream))

+        {

+            /*  Mark this handle as unused.

+            */

+            pDirStream->ulInode = INODE_INVALID;

+        }

+        else

+        {

+            ret = -RED_EBADF;

+        }

+

+        PosixLeave();

+    }

+

+    return PosixReturn(ret);

+}

+#endif /* REDCONF_API_POSIX_READDIR */

+

+

+/** @brief Pointer to where the last file system error (errno) is stored.

+

+    This function is intended to be used via the #red_errno macro, or a similar

+    user-defined macro, that can be used both as an lvalue (writable) and an

+    rvalue (readable).

+

+    Under normal circumstances, the errno for each task is stored in a

+    different location.  Applications do not need to worry about one task

+    obliterating an error value that another task needed to read.  This task

+    errno for is initially zero.  When one of the POSIX-like APIs returns an

+    indication of error, the location for the calling task will be populated

+    with the error value.

+

+    In some circumstances, this function will return a pointer to a global

+    errno location which is shared by multiple tasks.  If the calling task is

+    not registered as a file system user and all of the task slots are full,

+    there can be no task-specific errno, so the global pointer is returned.

+    Likewise, if the file system driver is uninitialized, there are no

+    registered file system users and this function always returns the pointer

+    to the global errno.  Under these circumstances, multiple tasks

+    manipulating errno could be problematic.

+

+    This function never returns `NULL` under any circumstances.  The #red_errno

+    macro unconditionally dereferences the return value from this function, so

+    returning `NULL` could result in a fault.

+

+    @return Pointer to where the errno value is stored for this task.

+*/

+REDSTATUS *red_errnoptr(void)

+{

+    /*  The global errno value, used in single-task configurations and when the

+        caller is not (and cannot become) a file system user (which includes

+        when the driver is uninitialized).

+    */

+    static REDSTATUS iGlobalErrno = 0;

+

+  #if REDCONF_TASK_COUNT == 1U

+

+    return &iGlobalErrno;

+

+  #else

+

+    REDSTATUS *piErrno;

+

+    if(gfPosixInited)

+    {

+        uint32_t ulTaskId = RedOsTaskId();

+        uint32_t ulIdx;

+

+        REDASSERT(ulTaskId != 0U);

+

+        /*  If this task has used the file system before, it will already have

+            a task slot, which includes the task-specific errno.

+        */

+        RedOsMutexAcquire();

+

+        for(ulIdx = 0U; ulIdx < REDCONF_TASK_COUNT; ulIdx++)

+        {

+            if(gaTask[ulIdx].ulTaskId == ulTaskId)

+            {

+                break;

+            }

+        }

+

+        RedOsMutexRelease();

+

+        if(ulIdx == REDCONF_TASK_COUNT)

+        {

+            REDSTATUS ret;

+

+            /*  This task is not a file system user, so try to register it as

+                one.  This FS mutex must be held in order to register.

+            */

+            RedOsMutexAcquire();

+

+            ret = TaskRegister(&ulIdx);

+

+            RedOsMutexRelease();

+

+            if(ret == 0)

+            {

+                REDASSERT(gaTask[ulIdx].ulTaskId == RedOsTaskId());

+                REDASSERT(gaTask[ulIdx].iErrno == 0);

+

+                piErrno = &gaTask[ulIdx].iErrno;

+            }

+            else

+            {

+                /*  Unable to register; use the global errno.

+                */

+                piErrno = &iGlobalErrno;

+            }

+        }

+        else

+        {

+            piErrno = &gaTask[ulIdx].iErrno;

+        }

+    }

+    else

+    {

+        /*  There are no registered file system tasks when the driver is

+            uninitialized, so use the global errno.

+        */

+        piErrno = &iGlobalErrno;

+    }

+

+    /*  This function is not allowed to return NULL.

+    */

+    REDASSERT(piErrno != NULL);

+    return piErrno;

+

+  #endif

+}

+/** @} */

+

+/*-------------------------------------------------------------------

+    Helper Functions

+-------------------------------------------------------------------*/

+

+#if (REDCONF_READ_ONLY == 0) && ((REDCONF_API_POSIX_UNLINK == 1) || (REDCONF_API_POSIX_RMDIR == 1))

+

+/** @brief Remove a link to a file or directory.

+

+    If the link count becomes zero, the file or directory is deleted.

+

+    @param pszPath  Path of the link to remove.

+    @param type     The expected type of the path: file, directory, or either.

+                    An error is returned if the expected type is file or

+                    directory and does not match the path.

+

+    @return A negated ::REDSTATUS code indicating the operation result.

+

+    @retval -RED_EBUSY          @p pszPath points to an inode with open handles

+                                and a link count of one.

+    @retval -RED_EINVAL         @p pszPath is `NULL`; or the volume containing

+                                the path is not mounted.

+    @retval -RED_EIO            A disk I/O error occurred.

+    @retval -RED_EISDIR         @p type is ::FTYPE_FILE and the path names a

+                                directory.

+    @retval -RED_ENAMETOOLONG   @p pszName is too long.

+    @retval -RED_ENOENT         The path does not name an existing file; or

+                                @p pszPath, after removing the volume prefix,

+                                points to an empty string.

+    @retval -RED_ENOTDIR        @p type is ::FTYPE_DIR and the path does not

+                                name a directory.

+    @retval -RED_ENOTEMPTY      @p pszPath is a directory which is not empty.

+    @retval -RED_ENOSPC         The file system does not have enough space to

+                                modify the parent directory to perform the

+                                deletion.

+*/

+static REDSTATUS UnlinkSub(

+    const char *pszPath,

+    FTYPE       type)

+{

+    uint8_t     bVolNum;

+    const char *pszLocalPath;

+    REDSTATUS   ret;

+

+    ret = RedPathSplit(pszPath, &bVolNum, &pszLocalPath);

+

+  #if REDCONF_VOLUME_COUNT > 1U

+    if(ret == 0)

+    {

+        ret = RedCoreVolSetCurrent(bVolNum);

+    }

+  #endif

+

+    if(ret == 0)

+    {

+        const char *pszName;

+        uint32_t    ulPInode;

+

+        ret = RedPathToName(pszLocalPath, &ulPInode, &pszName);

+

+        if(ret == 0)

+        {

+            uint32_t ulInode;

+

+            ret = RedCoreLookup(ulPInode, pszName, &ulInode);

+

+            /*  ModeTypeCheck() always passes when the type is FTYPE_EITHER, so

+                skip stat'ing the inode in that case.

+            */

+            if((ret == 0) && (type != FTYPE_EITHER))

+            {

+                REDSTAT InodeStat;

+

+                ret = RedCoreStat(ulInode, &InodeStat);

+                if(ret == 0)

+                {

+                    ret = ModeTypeCheck(InodeStat.st_mode, type);

+                }

+            }

+

+            if(ret == 0)

+            {

+                ret = InodeUnlinkCheck(ulInode);

+            }

+

+            if(ret == 0)

+            {

+                ret = RedCoreUnlink(ulPInode, pszName);

+            }

+        }

+    }

+

+    return ret;

+}

+#endif /* (REDCONF_API_POSIX_UNLINK == 1) || (REDCONF_API_POSIX_RMDIR == 1) */

+

+

+/** @brief Get a file descriptor for a path.

+

+    @param pszPath      Path to a file to open.

+    @param ulOpenMode   The RED_O_* flags the descriptor is opened with.

+    @param type         Indicates the expected descriptor type: file, directory,

+                        or either.

+    @param piFildes     On successful return, populated with the file

+                        descriptor.

+

+    @return A negated ::REDSTATUS code indicating the operation result.

+

+    @retval 0                   Operation was successful.

+    @retval -RED_EINVAL         @p piFildes is `NULL`; or @p pszPath is `NULL`;

+                                or the volume is not mounted.

+    @retval -RED_EMFILE         There are no available handles.

+    @retval -RED_EEXIST         Using #RED_O_CREAT and #RED_O_EXCL, and the

+                                indicated path already exists.

+    @retval -RED_EISDIR         The path names a directory and @p ulOpenMode

+                                includes #RED_O_WRONLY or #RED_O_RDWR.

+    @retval -RED_ENOENT         #RED_O_CREAT is not set and the named file does

+                                not exist; or #RED_O_CREAT is set and the parent

+                                directory does not exist; or the volume does not

+                                exist; or the @p pszPath argument, after

+                                removing the volume prefix, points to an empty

+                                string.

+    @retval -RED_EIO            A disk I/O error occurred.

+    @retval -RED_ENAMETOOLONG   The length of a component of @p pszPath is

+                                longer than #REDCONF_NAME_MAX.

+    @retval -RED_ENFILE         Attempting to create a file but the file system

+                                has used all available inode slots.

+    @retval -RED_ENOSPC         The file does not exist and #RED_O_CREAT was

+                                specified, but there is insufficient free space

+                                to expand the directory or to create the new

+                                file.

+    @retval -RED_ENOTDIR        A component of the prefix in @p pszPath does not

+                                name a directory.

+    @retval -RED_EROFS          The path resides on a read-only file system and

+                                a write operation was requested.

+*/

+static REDSTATUS FildesOpen(

+    const char *pszPath,

+    uint32_t    ulOpenMode,

+    FTYPE       type,

+    int32_t    *piFildes)

+{

+    uint8_t     bVolNum;

+    const char *pszLocalPath;

+    REDSTATUS   ret;

+

+    ret = RedPathSplit(pszPath, &bVolNum, &pszLocalPath);

+

+    if(ret == 0)

+    {

+        if(piFildes == NULL)

+        {

+            ret = -RED_EINVAL;

+        }

+      #if REDCONF_READ_ONLY == 0

+        else if(gaRedVolume[bVolNum].fReadOnly && (ulOpenMode != RED_O_RDONLY))

+        {

+            ret = -RED_EROFS;

+        }

+      #endif

+        else

+        {

+            uint16_t    uHandleIdx;

+            REDHANDLE  *pHandle = NULL;

+

+            /*  Search for an unused handle.

+            */

+            for(uHandleIdx = 0U; uHandleIdx < REDCONF_HANDLE_COUNT; uHandleIdx++)

+            {

+                if(gaHandle[uHandleIdx].ulInode == INODE_INVALID)

+                {

+                    pHandle = &gaHandle[uHandleIdx];

+                    break;

+                }

+            }

+

+            /*  Error if all the handles are in use.

+            */

+            if(pHandle == NULL)

+            {

+                ret = -RED_EMFILE;

+            }

+            else

+            {

+                bool        fCreated = false;

+                uint16_t    uMode = 0U;

+                uint32_t    ulInode = 0U;       /* Init'd to quiet warnings. */

+

+              #if REDCONF_VOLUME_COUNT > 1U

+                ret = RedCoreVolSetCurrent(bVolNum);

+                if(ret == 0)

+              #endif

+                {

+                  #if REDCONF_READ_ONLY == 0

+                    if((ulOpenMode & RED_O_CREAT) != 0U)

+                    {

+                        uint32_t    ulPInode;

+                        const char *pszName;

+

+                        ret = RedPathToName(pszLocalPath, &ulPInode, &pszName);

+                        if(ret == 0)

+                        {

+                            ret = RedCoreCreate(ulPInode, pszName, false, &ulInode);

+                            if(ret == 0)

+                            {

+                                fCreated = true;

+                            }

+                            else if((ret == -RED_EEXIST) && ((ulOpenMode & RED_O_EXCL) == 0U))

+                            {

+                                /*  If the path already exists and that's OK,

+                                    lookup its inode number.

+                                */

+                                ret = RedCoreLookup(ulPInode, pszName, &ulInode);

+                            }

+                            else

+                            {

+                                /*  No action, just propagate the error.

+                                */

+                            }

+                        }

+                    }

+                    else

+                  #endif

+                    {

+                        ret = RedPathLookup(pszLocalPath, &ulInode);

+                    }

+                }

+

+                /*  If we created the inode, none of the below stuff is

+                    necessary.  This is important from an error handling

+                    perspective -- we do not need code to delete the created

+                    inode on error.

+                */

+                if(!fCreated)

+                {

+                    if(ret == 0)

+                    {

+                        REDSTAT s;

+

+                        ret = RedCoreStat(ulInode, &s);

+                        if(ret == 0)

+                        {

+                            uMode = s.st_mode;

+                        }

+                    }

+

+                    /*  Error if the inode is not of the expected type.

+                    */

+                    if(ret == 0)

+                    {

+                        ret = ModeTypeCheck(uMode, type);

+                    }

+

+                    /*  Directories must always be opened with O_RDONLY.

+                    */

+                    if((ret == 0) && RED_S_ISDIR(uMode) && ((ulOpenMode & RED_O_RDONLY) == 0U))

+                    {

+                        ret = -RED_EISDIR;

+                    }

+

+                  #if (REDCONF_READ_ONLY == 0) && (REDCONF_API_POSIX_FTRUNCATE == 1)

+                    if((ret == 0) && ((ulOpenMode & RED_O_TRUNC) != 0U))

+                    {

+                        ret = RedCoreFileTruncate(ulInode, UINT64_SUFFIX(0));

+                    }

+                  #endif

+                }

+

+                if(ret == 0)

+                {

+                    int32_t iFildes;

+

+                    RedMemSet(pHandle, 0U, sizeof(*pHandle));

+

+                    /*  Populate this handle, marking it as in use.

+                    */

+                    pHandle->ulInode = ulInode;

+                    pHandle->bVolNum = bVolNum;

+

+                    if(RED_S_ISDIR(uMode))

+                    {

+                        pHandle->bFlags |= HFLAG_DIRECTORY;

+                    }

+

+                    if(((ulOpenMode & RED_O_RDONLY) != 0U) || ((ulOpenMode & RED_O_RDWR) != 0U))

+                    {

+                        pHandle->bFlags |= HFLAG_READABLE;

+                    }

+

+                  #if REDCONF_READ_ONLY == 0

+                    if(((ulOpenMode & RED_O_WRONLY) != 0U) || ((ulOpenMode & RED_O_RDWR) != 0U))

+                    {

+                        pHandle->bFlags |= HFLAG_WRITEABLE;

+                    }

+

+                    if((ulOpenMode & RED_O_APPEND) != 0U)

+                    {

+                        pHandle->bFlags |= HFLAG_APPENDING;

+                    }

+                  #endif

+

+                    iFildes = FildesPack(uHandleIdx, bVolNum);

+                    if(iFildes == -1)

+                    {

+                        /*  It should be impossible to get here, unless there

+                            is memory corruption.

+                        */

+                        REDERROR();

+                        ret = -RED_EFUBAR;

+                    }

+                    else

+                    {

+                        *piFildes = iFildes;

+                    }

+                }

+            }

+        }

+    }

+

+    return ret;

+}

+

+

+/** @brief Close a file descriptor.

+

+    @param iFildes  The file descriptor to close.

+

+    @return A negated ::REDSTATUS code indicating the operation result.

+

+    @retval 0           Operation was successful.

+    @retval -RED_EBADF  @p iFildes is not a valid file descriptor.

+    @retval -RED_EIO    A disk I/O error occurred.

+*/

+static REDSTATUS FildesClose(

+    int32_t     iFildes)

+{

+    REDHANDLE  *pHandle;

+    REDSTATUS   ret;

+

+    ret = FildesToHandle(iFildes, FTYPE_EITHER, &pHandle);

+

+  #if REDCONF_READ_ONLY == 0

+  #if REDCONF_VOLUME_COUNT > 1U

+    if(ret == 0)

+    {

+        ret = RedCoreVolSetCurrent(pHandle->bVolNum);

+    }

+  #endif

+

+    /*  No core event for close, so this transaction flag needs to be

+        implemented here.

+    */

+    if(ret == 0)

+    {

+        uint32_t    ulTransMask;

+

+        ret = RedCoreTransMaskGet(&ulTransMask);

+

+        if((ret == 0) && ((ulTransMask & RED_TRANSACT_CLOSE) != 0U))

+        {

+            ret = RedCoreVolTransact();

+        }

+    }

+  #endif

+

+    if(ret == 0)

+    {

+        /*  Mark this handle as unused.

+        */

+        pHandle->ulInode = INODE_INVALID;

+    }

+

+    return ret;

+}

+

+

+/** @brief Convert a file descriptor into a handle pointer.

+

+    Also validates the file descriptor.

+

+    @param iFildes  The file descriptor for which to get a handle.

+    @param expectedType The expected type of the file descriptor: ::FTYPE_DIR,

+                        ::FTYPE_FILE, or ::FTYPE_EITHER.

+    @param ppHandle     On successful return, populated with a pointer to the

+                        handle associated with @p iFildes.

+

+    @return A negated ::REDSTATUS code indicating the operation result.

+

+    @retval 0               Operation was successful.

+    @retval -RED_EBADF      @p iFildes is not a valid file descriptor.

+    @retval -RED_EINVAL     @p ppHandle is `NULL`.

+    @retval -RED_EISDIR     Expected a file, but the file descriptor is for a

+                            directory.

+    @retval -RED_ENOTDIR    Expected a directory, but the file descriptor is for

+                            a file.

+*/

+static REDSTATUS FildesToHandle(

+    int32_t     iFildes,

+    FTYPE       expectedType,

+    REDHANDLE **ppHandle)

+{

+    REDSTATUS   ret;

+

+    if(ppHandle == NULL)

+    {

+        REDERROR();

+        ret = -RED_EINVAL;

+    }

+    else if(iFildes < FD_MIN)

+    {

+        ret = -RED_EBADF;

+    }

+    else

+    {

+        uint16_t uHandleIdx;

+        uint8_t  bVolNum;

+        uint16_t uGeneration;

+

+        FildesUnpack(iFildes, &uHandleIdx, &bVolNum, &uGeneration);

+

+        if(    (uHandleIdx >= REDCONF_HANDLE_COUNT)

+            || (bVolNum >= REDCONF_VOLUME_COUNT)

+            || (gaHandle[uHandleIdx].ulInode == INODE_INVALID)

+            || (gaHandle[uHandleIdx].bVolNum != bVolNum)

+            || (gauGeneration[bVolNum] != uGeneration))

+        {

+            ret = -RED_EBADF;

+        }

+        else if((expectedType == FTYPE_FILE) && ((gaHandle[uHandleIdx].bFlags & HFLAG_DIRECTORY) != 0U))

+        {

+            ret = -RED_EISDIR;

+        }

+        else if((expectedType == FTYPE_DIR) && ((gaHandle[uHandleIdx].bFlags & HFLAG_DIRECTORY) == 0U))

+        {

+            ret = -RED_ENOTDIR;

+        }

+        else

+        {

+            *ppHandle = &gaHandle[uHandleIdx];

+            ret = 0;

+        }

+    }

+

+    return ret;

+}

+

+

+/** @brief Pack a file descriptor.

+

+    @param uHandleIdx   The index of the file handle that will be associated

+                        with this file descriptor.

+    @param bVolNum      The volume which contains the file or directory this

+                        file descriptor was opened against.

+

+    @return The packed file descriptor.

+*/

+static int32_t FildesPack(

+    uint16_t    uHandleIdx,

+    uint8_t     bVolNum)

+{

+    int32_t     iFildes;

+

+    if((uHandleIdx >= REDCONF_HANDLE_COUNT) || (bVolNum >= REDCONF_VOLUME_COUNT))

+    {

+        REDERROR();

+        iFildes = -1;

+    }

+    else

+    {

+        uint32_t    ulFdBits;

+

+        REDASSERT(gauGeneration[bVolNum] <= FD_GEN_MAX);

+        REDASSERT(gauGeneration[bVolNum] != 0U);

+

+        ulFdBits = gauGeneration[bVolNum];

+        ulFdBits <<= FD_VOL_BITS;

+        ulFdBits |= bVolNum;

+        ulFdBits <<= FD_IDX_BITS;

+        ulFdBits |= uHandleIdx;

+

+        iFildes = (int32_t)ulFdBits;

+

+        if(iFildes < FD_MIN)

+        {

+            REDERROR();

+            iFildes = -1;

+        }

+    }

+

+    return iFildes;

+}

+

+

+/** @brief Unpack a file descriptor.

+

+    @param iFildes      The file descriptor to unpack.

+    @param puHandleIdx  If non-NULL, populated with the handle index extracted

+                        from the file descriptor.

+    @param pbVolNum     If non-NULL, populated with the volume number extracted

+                        from the file descriptor.

+    @param puGeneration If non-NULL, populated with the generation number

+                        extracted from the file descriptor.

+*/

+static void FildesUnpack(

+    int32_t     iFildes,

+    uint16_t   *puHandleIdx,

+    uint8_t    *pbVolNum,

+    uint16_t   *puGeneration)

+{

+    uint32_t ulFdBits = (uint32_t)iFildes;

+

+    REDASSERT(iFildes >= FD_MIN);

+

+    if(puHandleIdx != NULL)

+    {

+        *puHandleIdx = (uint16_t)(ulFdBits & FD_IDX_MAX);

+    }

+

+    ulFdBits >>= FD_IDX_BITS;

+

+    if(pbVolNum != NULL)

+    {

+        *pbVolNum = (uint8_t)(ulFdBits & FD_VOL_MAX);

+    }

+

+    ulFdBits >>= FD_VOL_BITS;

+

+    if(puGeneration != NULL)

+    {

+        *puGeneration = (uint16_t)(ulFdBits & FD_GEN_MAX);

+    }

+}

+

+

+#if REDCONF_API_POSIX_READDIR == 1

+/** @brief Validate a directory stream object.

+

+    @param pDirStream   The directory stream to validate.

+

+    @return Whether the directory stream is valid.

+

+    @retval true    The directory stream object appears valid.

+    @retval false   The directory stream object is invalid.

+*/

+static bool DirStreamIsValid(

+    const REDDIR   *pDirStream)

+{

+    bool            fRet = true;

+

+    if(pDirStream == NULL)

+    {

+        fRet = false;

+    }

+    else

+    {

+        uint16_t uHandleIdx;

+

+        /*  pDirStream should be a pointer to one of the handles.

+

+            A good compiler will optimize this loop into a bounds check and an

+            alignment check.

+        */

+        for(uHandleIdx = 0U; uHandleIdx < REDCONF_HANDLE_COUNT; uHandleIdx++)

+        {

+            if(pDirStream == &gaHandle[uHandleIdx])

+            {

+                break;

+            }

+        }

+

+        if(uHandleIdx < REDCONF_HANDLE_COUNT)

+        {

+            /*  The handle must be in use, have a valid volume number, and be a

+                directory handle.

+            */

+            if(    (pDirStream->ulInode == INODE_INVALID)

+                || (pDirStream->bVolNum >= REDCONF_VOLUME_COUNT)

+                || ((pDirStream->bFlags & HFLAG_DIRECTORY) == 0U))

+            {

+                fRet = false;

+            }

+        }

+        else

+        {

+            /*  pDirStream is a non-null pointer, but it is not a pointer to one

+                of our handles.

+            */

+            fRet = false;

+        }

+    }

+

+    return fRet;

+}

+#endif

+

+

+/** @brief Enter the file system driver.

+

+    @return A negated ::REDSTATUS code indicating the operation result.

+

+    @retval 0           Operation was successful.

+    @retval -RED_EINVAL The file system driver is uninitialized.

+    @retval -RED_EUSERS Cannot become a file system user: too many users.

+*/

+static REDSTATUS PosixEnter(void)

+{

+    REDSTATUS ret;

+

+    if(gfPosixInited)

+    {

+      #if REDCONF_TASK_COUNT > 1U

+        RedOsMutexAcquire();

+

+        ret = TaskRegister(NULL);

+        if(ret != 0)

+        {

+            RedOsMutexRelease();

+        }

+      #else

+        ret = 0;

+      #endif

+    }

+    else

+    {

+        ret = -RED_EINVAL;

+    }

+

+    return ret;

+}

+

+

+/** @brief Leave the file system driver.

+*/

+static void PosixLeave(void)

+{

+    /*  If the driver was uninitialized, PosixEnter() should have failed and we

+        should not be calling PosixLeave().

+    */

+    REDASSERT(gfPosixInited);

+

+  #if REDCONF_TASK_COUNT > 1U

+    RedOsMutexRelease();

+  #endif

+}

+

+

+/** @brief Check that a mode is consistent with the given expected type.

+

+    @param uMode        An inode mode, indicating whether the inode is a file

+                        or a directory.

+    @param expectedType The expected type: ::FTYPE_FILE, ::FTYPE_DIR, or

+                        ::FTYPE_EITHER.

+

+    @return A negated ::REDSTATUS code indicating the operation result.

+

+    @retval 0               Operation was successful.

+    @retval -RED_EISDIR     Expected type is file, actual type is directory.

+    @retval -RED_ENOTDIR    Expected type is directory, actual type is file.

+*/

+static REDSTATUS ModeTypeCheck(

+    uint16_t    uMode,

+    FTYPE       expectedType)

+{

+    REDSTATUS   ret;

+

+    if((expectedType == FTYPE_FILE) && RED_S_ISDIR(uMode))

+    {

+        /*  Expected file, found directory.

+        */

+        ret = -RED_EISDIR;

+    }

+    else if((expectedType == FTYPE_DIR) && RED_S_ISREG(uMode))

+    {

+        /*  Expected directory, found file.

+        */

+        ret = -RED_ENOTDIR;

+    }

+    else

+    {

+        /*  No expected type or found what we expected.

+        */

+        ret = 0;

+    }

+

+    return ret;

+}

+

+

+#if (REDCONF_READ_ONLY == 0) && ((REDCONF_API_POSIX_UNLINK == 1) || (REDCONF_API_POSIX_RMDIR == 1) || ((REDCONF_API_POSIX_RENAME == 1) && (REDCONF_RENAME_ATOMIC == 1)))

+/** @brief Check whether an inode can be unlinked.

+

+    If an inode has a link count of 1 (meaning unlinking another name would

+    result in the deletion of the inode) and open handles, it cannot be deleted

+    since this would break open handles.

+

+    @param ulInode  The inode whose name is to be unlinked.

+

+    @return A negated ::REDSTATUS code indicating the operation result.

+

+    @retval 0           Operation was successful.

+    @retval -RED_EBADF  @p ulInode is not a valid inode.

+    @retval -RED_EBUSY  The inode has a link count of one and open handles.

+    @retval -RED_EIO    A disk I/O error occurred.

+*/

+static REDSTATUS InodeUnlinkCheck(

+    uint32_t    ulInode)

+{

+    uint16_t    uHandleIdx;

+    REDSTATUS   ret;

+

+  #if REDCONF_API_POSIX_LINK == 0

+    ret = 0;

+  #else

+    REDSTAT     InodeStat;

+

+    ret = RedCoreStat(ulInode, &InodeStat);

+

+    /*  We only need to check for open handles if the inode is down to its last

+        link.  If it has multiple links, the inode will continue to exist, so

+        deleting the name will not break the open handles.

+    */

+    if((ret == 0) && (InodeStat.st_nlink == 1U))

+  #endif

+    {

+        for(uHandleIdx = 0U; uHandleIdx < REDCONF_HANDLE_COUNT; uHandleIdx++)

+        {

+            if((gaHandle[uHandleIdx].ulInode == ulInode) && (gaHandle[uHandleIdx].bVolNum == gbRedVolNum))

+            {

+                ret = -RED_EBUSY;

+                break;

+            }

+        }

+    }

+

+    return ret;

+}

+#endif

+

+

+#if REDCONF_TASK_COUNT > 1U

+/** @brief Register a task as a file system user, if it is not already

+           registered as one.

+

+    The caller must hold the FS mutex.

+

+    @param pulTaskIdx   On successful return, if non-NULL, populated with the

+                        index of the task slot assigned to the calling task.

+                        This is populated whether or not the task had already

+                        been registered.

+

+    @return A negated ::REDSTATUS code indicating the operation result.

+

+    @retval 0           Operation was successful.

+    @retval -RED_EUSERS Cannot become a file system user: too many users.

+*/

+static REDSTATUS TaskRegister(

+    uint32_t   *pulTaskIdx)

+{

+    uint32_t    ulTaskId = RedOsTaskId();

+    uint32_t    ulFirstFreeIdx = REDCONF_TASK_COUNT;

+    uint32_t    ulIdx;

+    REDSTATUS   ret;

+

+    REDASSERT(ulTaskId != 0U);

+

+    /*  Scan the task slots to determine if the task is registered as a file

+        system task.

+    */

+    for(ulIdx = 0U; ulIdx < REDCONF_TASK_COUNT; ulIdx++)

+    {

+        if(gaTask[ulIdx].ulTaskId == ulTaskId)

+        {

+            break;

+        }

+

+        if((ulFirstFreeIdx == REDCONF_TASK_COUNT) && (gaTask[ulIdx].ulTaskId == 0U))

+        {

+            ulFirstFreeIdx = ulIdx;

+        }

+    }

+

+    if(ulIdx == REDCONF_TASK_COUNT)

+    {

+        /*  Task not already registered.

+        */

+        if(ulFirstFreeIdx == REDCONF_TASK_COUNT)

+        {

+            /*  Cannot register task, no more slots.

+            */

+            ret = -RED_EUSERS;

+        }

+        else

+        {

+            /*  Registering task.

+            */

+            ulIdx = ulFirstFreeIdx;

+            gaTask[ulIdx].ulTaskId = ulTaskId;

+            ret = 0;

+        }

+    }

+    else

+    {

+        /*  Task already registered.

+        */

+        ret = 0;

+    }

+

+    if((ret == 0) && (pulTaskIdx != NULL))

+    {

+        *pulTaskIdx = ulIdx;

+    }

+

+    return ret;

+}

+#endif /* REDCONF_TASK_COUNT > 1U */

+

+

+/** @brief Convert an error value into a simple 0 or -1 return.

+

+    This function is simple, but what it does is needed in many places.  It

+    returns zero if @p iError is zero (meaning success) or it returns -1 if

+    @p iError is nonzero (meaning error).  Also, if @p iError is nonzero, it

+    is saved in red_errno.

+

+    @param  iError  The error value.

+

+    @return Returns 0 if @p iError is 0; otherwise, returns -1.

+*/

+static int32_t PosixReturn(

+    REDSTATUS   iError)

+{

+    int32_t     iReturn;

+

+    if(iError == 0)

+    {

+        iReturn = 0;

+    }

+    else

+    {

+        iReturn = -1;

+

+        /*  The errors should be negative, and errno positive.

+        */

+        REDASSERT(iError < 0);

+        red_errno = -iError;

+    }

+

+    return iReturn;

+}

+

+

+#endif /* REDCONF_API_POSIX == 1 */

+

diff --git a/FreeRTOS-Plus/Source/Reliance-Edge/posix/redpath.h b/FreeRTOS-Plus/Source/Reliance-Edge/posix/redpath.h
new file mode 100644
index 0000000..b7337e1
--- /dev/null
+++ b/FreeRTOS-Plus/Source/Reliance-Edge/posix/redpath.h
@@ -0,0 +1,38 @@
+/*             ----> DO NOT REMOVE THE FOLLOWING NOTICE <----

+

+                   Copyright (c) 2014-2015 Datalight, Inc.

+                       All Rights Reserved Worldwide.

+

+    This program is free software; you can redistribute it and/or modify

+    it under the terms of the GNU General Public License as published by

+    the Free Software Foundation; use version 2 of the License.

+

+    This program is distributed in the hope that it will be useful,

+    but "AS-IS," WITHOUT ANY WARRANTY; without even the implied warranty

+    of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the

+    GNU General Public License for more details.

+

+    You should have received a copy of the GNU General Public License along

+    with this program; if not, write to the Free Software Foundation, Inc.,

+    51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.

+*/

+/*  Businesses and individuals that for commercial or other reasons cannot

+    comply with the terms of the GPLv2 license may obtain a commercial license

+    before incorporating Reliance Edge into proprietary software for

+    distribution in any form.  Visit http://www.datalight.com/reliance-edge for

+    more information.

+*/

+/** @file

+    @brief Interfaces of path utilities for the POSIX-like API layer.

+*/

+#ifndef REDPATH_H

+#define REDPATH_H

+

+

+REDSTATUS RedPathSplit(const char *pszPath, uint8_t *pbVolNum, const char **ppszLocalPath);

+REDSTATUS RedPathLookup(const char *pszLocalPath, uint32_t *pulInode);

+REDSTATUS RedPathToName(const char *pszLocalPath, uint32_t *pulPInode, const char **ppszName);

+

+

+#endif

+

diff --git a/FreeRTOS-Plus/Source/Reliance-Edge/tests/posix/fsstress.c b/FreeRTOS-Plus/Source/Reliance-Edge/tests/posix/fsstress.c
new file mode 100644
index 0000000..a440dfe
--- /dev/null
+++ b/FreeRTOS-Plus/Source/Reliance-Edge/tests/posix/fsstress.c
@@ -0,0 +1,2049 @@
+/*

+ * Copyright (c) 2000 Silicon Graphics, Inc.  All Rights Reserved.

+ *

+ * This program is free software; you can redistribute it and/or modify it

+ * under the terms of version 2 of the GNU General Public License as

+ * published by the Free Software Foundation.

+ *

+ * This program is distributed in the hope that it would be useful, but

+ * WITHOUT ANY WARRANTY; without even the implied warranty of

+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

+ *

+ * Further, this software is distributed without any warranty that it is

+ * free of the rightful claim of any third person regarding infringement

+ * or the like.  Any license provided herein, whether implied or

+ * otherwise, applies only to this software file.  Patent licenses, if

+ * any, provided herein do not apply to combinations of this program with

+ * other software, or any other product whatsoever.

+ *

+ * You should have received a copy of the GNU General Public License along

+ * with this program; if not, write the Free Software Foundation, Inc.,

+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.

+ *

+ * Contact information: Silicon Graphics, Inc., 1600 Amphitheatre Pkwy,

+ * Mountain View, CA  94043, or:

+ *

+ * http://www.sgi.com

+ *

+ * For further information regarding this notice, see:

+ *

+ * http://oss.sgi.com/projects/GenInfo/SGIGPLNoticeExplan/

+ */

+/** @file

+    @brief File system stress test.

+

+    This version of SGI fsstress has been modified to be single-threaded and to

+    work with the Reliance Edge POSIX-like API.

+*/

+#include <stdio.h>

+#include <stdlib.h>

+#include <limits.h>

+#include <string.h>

+#include <stdarg.h>

+#include <time.h>

+

+#include <redposix.h>

+#include <redtests.h>

+

+#if FSSTRESS_SUPPORTED

+

+#include "redposixcompat.h"

+

+#include <redosserv.h>

+#include <redutils.h>

+#include <redmacs.h>

+#include <redvolume.h>

+#include <redgetopt.h>

+#include <redtoolcmn.h>

+

+#if REDCONF_CHECKER == 1

+#include <redcoreapi.h>

+#endif

+

+

+/*  Create POSIX types.  Use #define to avoid name conflicts in those

+    environments where the type names already exist.

+*/

+#define off_t int64_t

+#define off64_t off_t

+#define ino_t uint32_t

+#define mode_t uint16_t

+#define __int64_t int64_t

+

+

+/** @brief Generate a random number.

+

+    @return A nonnegative random number.

+*/

+#define random() ((int)(RedRand32(NULL) & 0x7FFFFFFF))

+

+

+/** @brief Seed the random number generator.

+*/

+#define srandom(seed) RedRandSeed(seed)

+

+

+#define _exit(status) exit(status)

+#define getpagesize() 4096U

+#define getpid() 1

+

+

+/** @brief Determine the maximum file size.

+

+    This is used for the MAXFSSIZE macro.

+*/

+static uint64_t MaxFileSize(void)

+{

+    REDSTATFS   info;

+    int32_t     iStatus;

+    REDSTATUS   errnoSave = errno;

+    uint64_t    ullMaxFileSize;

+

+    iStatus = red_statvfs("", &info);

+    if(iStatus == 0)

+    {

+        ullMaxFileSize = info.f_maxfsize;

+    }

+    else

+    {

+        /*  This function does not change errno.

+        */

+        errno = errnoSave;

+

+        ullMaxFileSize = 0x7FFFFFFFU;

+    }

+

+    return ullMaxFileSize;

+}

+

+

+/*-------------------------------------------------------------------

+    Simulated current working directory support

+-------------------------------------------------------------------*/

+

+

+/*  Forward declaration for red_chdir().

+*/

+static int red_stat(const char *pszPath, REDSTAT *pStat);

+

+/*  The simulated CWD functions.

+*/

+#undef chdir

+#undef getcwd

+#define chdir(path) red_chdir(path)

+#define getcwd(buf, size) red_getcwd(buf, size)

+

+

+/*  Redefine the path-based APIs to call MakeFullPath() on their arguments

+    since there is no CWD support in the red_*() APIs.

+*/

+#undef open

+#undef unlink

+#undef mkdir

+#undef rmdir

+#undef rename

+#undef link

+#undef opendir

+#define open(path, oflag) red_open(MakeFullPath(path), oflag)

+#define unlink(path) red_unlink(MakeFullPath(path))

+#define mkdir(path) red_mkdir(MakeFullPath(path))

+#define rmdir(path) red_rmdir(MakeFullPath(path))

+#define rename(old, new) red_rename(MakeFullPath(old), MakeFullPath(new))

+#define link(path, hardlink) red_link(MakeFullPath(path), MakeFullPath(hardlink))

+#define opendir(path) red_opendir(MakeFullPath(path))

+

+

+/*  Stores the simulated current working directory.

+*/

+static char szLocalCwd[1024U] = "/";

+

+

+/** @brief Change the current working directory.

+

+    This function only supports a subset of what is possible with POSIX chdir().

+

+    @param pszPath  The new current working directory.

+

+    @return Upon successful completion, 0 shall be returned.  Otherwise, -1

+            shall be returned, and errno shall be set to indicate the error.

+*/

+static int red_chdir(

+    const char *pszPath)

+{

+    uint32_t    ulIdx;

+    int         iErrno = 0;

+

+    if(strcmp(pszPath, "..") == 0)

+    {

+        uint32_t ulLastSlashIdx = 0U;

+

+        /*  Chop off the last path separator and everything after it, so that

+            "/foo/bar/baz" becomes "/foo/bar", moving the CWD up one directory.

+        */

+        for(ulIdx = 0U; szLocalCwd[ulIdx] != '\0'; ulIdx++)

+        {

+            if(szLocalCwd[ulIdx] == '/')

+            {

+                ulLastSlashIdx = ulIdx;

+            }

+        }

+

+        if(ulLastSlashIdx != 0U)

+        {

+            szLocalCwd[ulLastSlashIdx] = '\0';

+        }

+    }

+    else

+    {

+        char    szOldCwd[1024U];

+

+        /*  chdir() must have no effect on the CWD if it fails, so save the CWD

+            so we can revert it if necessary.

+        */

+        strcpy(szOldCwd, szLocalCwd);

+

+        if(pszPath[0U] == '/')

+        {

+            if(strlen(pszPath) >= sizeof(szLocalCwd))

+            {

+                iErrno = RED_ENAMETOOLONG;

+            }

+            else

+            {

+                strcpy(szLocalCwd, pszPath);

+            }

+        }

+        else

+        {

+            ulIdx = strlen(szLocalCwd);

+

+            if((ulIdx + 1U + strlen(pszPath)) >= sizeof(szLocalCwd))

+            {

+                iErrno = RED_ENAMETOOLONG;

+            }

+            else

+            {

+                if(szLocalCwd[1U] != '\0')

+                {

+                    szLocalCwd[ulIdx] = '/';

+                    ulIdx++;

+                }

+

+                strcpy(&szLocalCwd[ulIdx], pszPath);

+            }

+        }

+

+        if(iErrno == 0)

+        {

+            REDSTAT s;

+            int     iStatus;

+

+            iStatus = red_stat(szLocalCwd, &s);

+            if(iStatus != 0)

+            {

+                iErrno = errno;

+            }

+            else if(!S_ISDIR(s.st_mode))

+            {

+                iErrno = RED_ENOTDIR;

+            }

+            else

+            {

+                /*  No error, new CWD checks out.

+                */

+            }

+        }

+

+        if(iErrno != 0)

+        {

+            strcpy(szLocalCwd, szOldCwd);

+        }

+    }

+

+    if(iErrno != 0)

+    {

+        errno = iErrno;

+    }

+

+    return iErrno == 0 ? 0 : -1;

+}

+

+

+/** @brief Retrieve the current working directory.

+

+    @param pszBuf   On successful return, populated with the current working

+                    directory.  If NULL, memory will be allocated for the CWD

+                    and returned by this function.

+    @param nSize    The size of @p pszBuf.

+

+    @return On success, if @p pszBuf was non-NULL, returns @p pszBuf; if

+            @p pszBuf was NULL, returns an allocated buffer populated with the

+            CWD which must be freed by the caller.  On failure, returns NULL

+            and errno will be set.

+*/

+static char *red_getcwd(

+    char   *pszBuf,

+    size_t  nSize)

+{

+    char   *pszRet;

+

+    if(pszBuf == NULL)

+    {

+        pszRet = malloc(strlen(szLocalCwd) + 1U);

+        if(pszRet == NULL)

+        {

+            errno = RED_ENOMEM;

+        }

+        else

+        {

+            strcpy(pszRet, szLocalCwd);

+        }

+    }

+    else if(nSize < strlen(szLocalCwd) + 1U)

+    {

+        errno = RED_ERANGE;

+        pszRet = NULL;

+    }

+    else

+    {

+        strcpy(pszBuf, szLocalCwd);

+        pszRet = pszBuf;

+    }

+

+    return pszRet;

+}

+

+

+/** @brief Make a relative path into a fully qualified path.

+

+    @param pszName  The relative path.

+

+    @return On success, a pointer to a fully qualified path.  On error, NULL.

+*/

+static const char *MakeFullPath(

+    const char     *pszName)

+{

+    #define         MAXVOLNAME 64U /* Enough for most configs. */

+    static char     aszFullPath[2U][MAXVOLNAME + 1U + 1024U];

+    static uint32_t ulWhich = 0U;

+

+    char           *pszFullPath = aszFullPath[ulWhich];

+    const char     *pszVolume = gpRedVolConf->pszPathPrefix;

+    int32_t         iLen;

+

+    if(pszName[0U] == '/')

+    {

+        iLen = RedSNPrintf(pszFullPath, sizeof(aszFullPath[0U]), "%s%s", pszVolume, pszName);

+    }

+    else if(strcmp(pszName, ".") == 0U)

+    {

+        iLen = RedSNPrintf(pszFullPath, sizeof(aszFullPath[0U]), "%s%s", pszVolume, szLocalCwd);

+    }

+    else if((szLocalCwd[0U] == '/') && (szLocalCwd[1U] == '\0'))

+    {

+        iLen = RedSNPrintf(pszFullPath, sizeof(aszFullPath[0U]), "%s/%s", pszVolume, pszName);

+    }

+    else

+    {

+        iLen = RedSNPrintf(pszFullPath, sizeof(aszFullPath[0U]), "%s%s/%s", pszVolume, szLocalCwd, pszName);

+    }

+

+    if(iLen == -1)

+    {

+        /*  Insufficient path buffer space.

+        */

+        pszFullPath = NULL;

+    }

+    else

+    {

+        /*  Toggle between two full path arrays; a kluge to make rename() and

+            link() work correctly.

+        */

+        ulWhich ^= 1U;

+    }

+

+    return pszFullPath;

+}

+

+

+/*-------------------------------------------------------------------

+    POSIX functions not implemented by the RED POSIX-like API

+-------------------------------------------------------------------*/

+

+#define stat(p, s) red_stat(p, s)

+#define stat64(p, s) stat(p, s)

+#define lstat(p, s) stat(p, s)

+#define lstat64(p, s) stat(p, s)

+#define truncate(p, s) red_truncate(p, s)

+#define truncate64(p, s) truncate(p, s)

+

+

+/** @brief Get the status of a file or directory.

+*/

+static int red_stat(

+    const char *pszPath,

+    REDSTAT    *pStat)

+{

+    int         iFd;

+    int         iRet;

+

+    iFd = open(pszPath, O_RDONLY);

+    iRet = iFd;

+    if(iFd != -1)

+    {

+        iRet = fstat(iFd, pStat);

+

+        (void)close(iFd);

+    }

+

+    return iRet;

+}

+

+

+/** @brief Truncate a file to a specified length.

+*/

+static int red_truncate(

+    const char *pszPath,

+    off_t       llSize)

+{

+    int         iFd;

+    int         iRet;

+

+    iFd = open(pszPath, O_WRONLY);

+    iRet = iFd;

+    if(iFd != -1)

+    {

+        iRet = ftruncate(iFd, llSize);

+

+        (void)close(iFd);

+    }

+

+    return iRet;

+}

+

+

+/*-------------------------------------------------------------------

+    Begin ported fsstress code

+-------------------------------------------------------------------*/

+

+/* Stuff from xfscompat.h */

+

+#define MAXNAMELEN (REDCONF_NAME_MAX+1U) /* Assumed to include NUL */

+

+struct dioattr {

+    int d_miniosz, d_maxiosz, d_mem;

+};

+

+#define MIN(a,b) ((a)<(b) ? (a):(b))

+#define MAX(a,b) ((a)>(b) ? (a):(b))

+

+/* End xfscompat.h */

+

+

+typedef enum {

+    OP_CREAT,

+    OP_FDATASYNC,

+    OP_FSYNC,

+    OP_GETDENTS,

+    OP_LINK,

+    OP_MKDIR,

+    OP_READ,

+    OP_RENAME,

+    OP_RMDIR,

+    OP_STAT,

+    OP_TRUNCATE,

+    OP_UNLINK,

+    OP_WRITE,

+  #if REDCONF_CHECKER == 1

+    OP_CHECK,

+  #endif

+    OP_LAST

+} opty_t;

+

+typedef void (*opfnc_t) (int, long);

+

+typedef struct opdesc {

+    opty_t op;

+    const char *name;

+    opfnc_t func;

+    int freq;

+    int iswrite;

+} opdesc_t;

+

+typedef struct fent {

+    int id;

+    int parent;

+} fent_t;

+

+typedef struct flist {

+    int nfiles;

+    int nslots;

+    int tag;

+    fent_t *fents;

+} flist_t;

+

+typedef struct pathname {

+    int len;

+    char *path;

+} pathname_t;

+

+#define FT_DIR      0

+#define FT_DIRm     (1 << FT_DIR)

+#define FT_REG      1

+#define FT_REGm     (1 << FT_REG)

+#define FT_SYM      2

+#define FT_SYMm     (1 << FT_SYM)

+#define FT_DEV      3

+#define FT_DEVm     (1 << FT_DEV)

+#define FT_RTF      4

+#define FT_RTFm     (1 << FT_RTF)

+#define FT_nft      5

+#define FT_ANYm     ((1 << FT_nft) - 1)

+#define FT_REGFILE  (FT_REGm | FT_RTFm)

+#define FT_NOTDIR   (FT_ANYm & ~FT_DIRm)

+

+#define FLIST_SLOT_INCR 16

+#define NDCACHE 64

+

+#define MAXFSIZE MaxFileSize()

+

+static void creat_f(int opno, long r);

+static void fdatasync_f(int opno, long r);

+static void fsync_f(int opno, long r);

+static void getdents_f(int opno, long r);

+static void link_f(int opno, long r);

+static void mkdir_f(int opno, long r);

+static void read_f(int opno, long r);

+static void rename_f(int opno, long r);

+static void rmdir_f(int opno, long r);

+static void stat_f(int opno, long r);

+static void truncate_f(int opno, long r);

+static void unlink_f(int opno, long r);

+static void write_f(int opno, long r);

+#if REDCONF_CHECKER == 1

+static void check_f(int opno, long r);

+#endif

+

+static opdesc_t ops[] = {

+    {OP_CREAT, "creat", creat_f, 4, 1},

+    {OP_FDATASYNC, "fdatasync", fdatasync_f, 1, 1},

+    {OP_FSYNC, "fsync", fsync_f, 1, 1},

+    {OP_GETDENTS, "getdents", getdents_f, 1, 0},

+    {OP_LINK, "link", link_f, 1, 1},

+    {OP_MKDIR, "mkdir", mkdir_f, 2, 1},

+    {OP_READ, "read", read_f, 1, 0},

+    {OP_RENAME, "rename", rename_f, 2, 1},

+    {OP_RMDIR, "rmdir", rmdir_f, 1, 1},

+    {OP_STAT, "stat", stat_f, 1, 0},

+    {OP_TRUNCATE, "truncate", truncate_f, 2, 1},

+    {OP_UNLINK, "unlink", unlink_f, 1, 1},

+    {OP_WRITE, "write", write_f, 4, 1},

+  #if REDCONF_CHECKER == 1

+    {OP_CHECK, "check", check_f, 1, 1},

+  #endif

+}, *ops_end;

+

+static flist_t flist[FT_nft] = {

+    {0, 0, 'd', NULL},

+    {0, 0, 'f', NULL},

+    {0, 0, 'l', NULL},

+    {0, 0, 'c', NULL},

+    {0, 0, 'r', NULL},

+};

+

+static int dcache[NDCACHE];

+static opty_t *freq_table;

+static int freq_table_size;

+static char *homedir;

+static int *ilist;

+static int ilistlen;

+static off64_t maxfsize;

+static int namerand;

+static int nameseq;

+static int nops;

+static int operations = 1;

+static int procid;

+static int rtpct;

+static unsigned long seed = 0;

+static ino_t top_ino;

+static int verbose = 0;

+

+static int delete_tree(const char *path);

+static void add_to_flist(int fd, int it, int parent);

+static void append_pathname(pathname_t *name, const char *str);

+static void check_cwd(void);

+static int creat_path(pathname_t *name, mode_t mode);

+static void dcache_enter(int dirid, int slot);

+static void dcache_init(void);

+static fent_t *dcache_lookup(int dirid);

+static void dcache_purge(int dirid);

+static void del_from_flist(int ft, int slot);

+static void doproc(void);

+static void fent_to_name(pathname_t *name, flist_t *flp, fent_t *fep);

+static void fix_parent(int oldid, int newid);

+static void free_pathname(pathname_t *name);

+static int generate_fname(fent_t *fep, int ft, pathname_t *name, int *idp, int *v);

+static int get_fname(int which, long r, pathname_t *name, flist_t **flpp, fent_t **fepp, int *v);

+static void init_pathname(pathname_t *name);

+static int link_path(pathname_t *name1, pathname_t *name2);

+static int lstat64_path(pathname_t *name, REDSTAT *sbuf);

+static void make_freq_table(void);

+static int mkdir_path(pathname_t *name, mode_t mode);

+static void namerandpad(int id, char *buf, int len);

+static int open_path(pathname_t *name, int oflag);

+static DIR *opendir_path(pathname_t *name);

+static int rename_path(pathname_t *name1, pathname_t *name2);

+static int rmdir_path(pathname_t *name);

+static void separate_pathname(pathname_t *name, char *buf, pathname_t *newname);

+static int stat64_path(pathname_t *name, REDSTAT *sbuf);

+static int truncate64_path(pathname_t *name, off64_t length);

+static int unlink_path(pathname_t *name);

+static void usage(const char *progname);

+

+

+/** @brief Parse parameters for fsstress.

+

+    @param argc         The number of arguments from main().

+    @param argv         The vector of arguments from main().

+    @param pParam       Populated with the fsstress parameters.

+    @param pbVolNum     If non-NULL, populated with the volume number.

+    @param ppszDevice   If non-NULL, populated with the device name argument or

+                        NULL if no device argument is provided.

+

+    @return The result of parsing the parameters.

+*/

+PARAMSTATUS FsstressParseParams(

+    int             argc,

+    char           *argv[],

+    FSSTRESSPARAM  *pParam,

+    uint8_t        *pbVolNum,

+    const char    **ppszDevice)

+{

+    int             c;

+    uint8_t         bVolNum;

+    const REDOPTION aLongopts[] =

+    {

+        { "no-cleanup", red_no_argument, NULL, 'c' },

+        { "loops", red_required_argument, NULL, 'l' },

+        { "nops", red_required_argument, NULL, 'n' },

+        { "namepad", red_no_argument, NULL, 'r' },

+        { "seed", red_required_argument, NULL, 's' },

+        { "verbose", red_no_argument, NULL, 'v' },

+        { "dev", red_required_argument, NULL, 'D' },

+        { "help", red_no_argument, NULL, 'H' },

+        { NULL }

+    };

+

+    /*  If run without parameters, treat as a help request.

+    */

+    if(argc <= 1)

+    {

+        goto Help;

+    }

+

+    /*  Assume no device argument to start with.

+    */

+    if(ppszDevice != NULL)

+    {

+        *ppszDevice = NULL;

+    }

+

+    /*  Set default parameters.

+    */

+    FsstressDefaultParams(pParam);

+

+    while((c = RedGetoptLong(argc, argv, "cl:n:rs:vD:H", aLongopts, NULL)) != -1)

+    {

+        switch(c)

+        {

+            case 'c': /* --no-cleanup */

+                pParam->fNoCleanup = true;

+                break;

+            case 'l': /* --loops */

+                pParam->ulLoops = RedAtoI(red_optarg);

+                break;

+            case 'n': /* --nops */

+                pParam->ulNops = RedAtoI(red_optarg);

+                break;

+            case 'r': /* --namepad */

+                pParam->fNamePad = true;

+                break;

+            case 's': /* --seed */

+                pParam->ulSeed = RedAtoI(red_optarg);

+                break;

+            case 'v': /* --verbose */

+                pParam->fVerbose = true;

+                break;

+            case 'D': /* --dev */

+                if(ppszDevice != NULL)

+                {

+                    *ppszDevice = red_optarg;

+                }

+                break;

+            case 'H': /* --help */

+                goto Help;

+            case '?': /* Unknown or ambiguous option */

+            case ':': /* Option missing required argument */

+            default:

+                goto BadOpt;

+        }

+    }

+

+    /*  RedGetoptLong() has permuted argv to move all non-option arguments to

+        the end.  We expect to find a volume identifier.

+    */

+    if(red_optind >= argc)

+    {

+        RedPrintf("Missing volume argument\n");

+        goto BadOpt;

+    }

+

+    bVolNum = RedFindVolumeNumber(argv[red_optind]);

+    if(bVolNum == REDCONF_VOLUME_COUNT)

+    {

+        RedPrintf("Error: \"%s\" is not a valid volume identifier.\n", argv[red_optind]);

+        goto BadOpt;

+    }

+

+    if(pbVolNum != NULL)

+    {

+        *pbVolNum = bVolNum;

+    }

+

+    red_optind++; /* Move past volume parameter. */

+    if(red_optind < argc)

+    {

+        int32_t ii;

+

+        for(ii = red_optind; ii < argc; ii++)

+        {

+            RedPrintf("Error: Unexpected command-line argument \"%s\".\n", argv[ii]);

+        }

+

+        goto BadOpt;

+    }

+

+    return PARAMSTATUS_OK;

+

+  BadOpt:

+

+    RedPrintf("%s - invalid parameters\n", argv[0U]);

+    usage(argv[0U]);

+    return PARAMSTATUS_BAD;

+

+  Help:

+

+    usage(argv[0U]);

+    return PARAMSTATUS_HELP;

+}

+

+

+/** @brief Set default fsstress parameters.

+

+    @param pParam   Populated with the default fsstress parameters.

+*/

+void FsstressDefaultParams(

+    FSSTRESSPARAM *pParam)

+{

+    RedMemSet(pParam, 0U, sizeof(*pParam));

+    pParam->ulLoops = 1U;

+    pParam->ulNops = 10000U;

+}

+

+

+/** @brief Start fsstress.

+

+    @param pParam   fsstress parameters, either from FsstressParseParams() or

+                    constructed programatically.

+

+    @return Zero on success, otherwise nonzero.

+*/

+int FsstressStart(

+    const FSSTRESSPARAM *pParam)

+{

+    char buf[10];

+    int fd;

+    int i;

+    int cleanup;

+    int loops;

+    int loopcntr = 1;

+

+    nops = sizeof(ops) / sizeof(ops[0]);

+    ops_end = &ops[nops];

+

+    /*  Copy the already-parsed parameters into the traditional variables.

+    */

+    cleanup = pParam->fNoCleanup ? 1 : 0;

+    loops = pParam->ulLoops;

+    operations = pParam->ulNops;

+    namerand = pParam->fNamePad ? 1 : 0;

+    seed = pParam->ulSeed;

+    verbose = pParam->fVerbose ? 1 : 0;

+

+    make_freq_table();

+

+    while ((loopcntr <= loops) || (loops == 0)) {

+        RedSNPrintf(buf, sizeof(buf), "fss%x", getpid());

+        fd = creat(buf, 0666);

+        maxfsize = (off64_t) MAXFSIZE;

+        dcache_init();

+        if (!seed) {

+            seed = (unsigned long)RedOsClockGetTime();

+            RedPrintf("seed = %ld\n", seed);

+        }

+        close(fd);

+        unlink(buf);

+        procid = 0;

+        doproc();

+        if (cleanup == 0) {

+            delete_tree("/");

+            for (i = 0; i < FT_nft; i++) {

+                flist[i].nslots = 0;

+                flist[i].nfiles = 0;

+                free(flist[i].fents);

+                flist[i].fents = NULL;

+            }

+        }

+        loopcntr++;

+    }

+    return 0;

+}

+

+static int delete_tree(const char *path)

+{

+    REDSTAT sb;

+    DIR *dp;

+    REDDIRENT *dep;

+    char *childpath;

+    size_t len;

+    int e;

+

+    e = stat(path, &sb);

+    if (e)

+        return errno;

+

+    if (!S_ISDIR(sb.st_mode))

+        return unlink(path) ? errno : 0;

+

+    dp = opendir(path);

+    if (dp == NULL)

+        return errno;

+

+    while((dep = readdir(dp)) != NULL) {

+        len = strlen(path) + 1 + strlen(dep->d_name) + 1;

+        childpath = malloc(len);

+

+        strcpy(childpath, path);

+        if (childpath[strlen(childpath) - 1] != '/')

+            strcat(childpath, "/");

+        strcat(childpath, dep->d_name);

+

+        e = delete_tree(childpath);

+

+        free(childpath);

+

+        if (e)

+            break;

+    }

+

+    if (e == 0 && strcmp(path, "/") != 0) {

+        e = rmdir(path) ? errno : 0;

+    }

+    closedir(dp);

+    return e;

+}

+

+static void add_to_flist(int ft, int id, int parent)

+{

+    fent_t *fep;

+    flist_t *ftp;

+

+    ftp = &flist[ft];

+    if (ftp->nfiles == ftp->nslots) {

+        ftp->nslots += FLIST_SLOT_INCR;

+        ftp->fents = realloc(ftp->fents, ftp->nslots * sizeof(fent_t));

+    }

+    fep = &ftp->fents[ftp->nfiles++];

+    fep->id = id;

+    fep->parent = parent;

+}

+

+static void append_pathname(pathname_t *name, const char *str)

+{

+    int len;

+

+    len = strlen(str);

+#ifdef DEBUG

+    if (len && *str == '/' && name->len == 0) {

+        RedPrintf("fsstress: append_pathname failure\n");

+        chdir(homedir);

+        abort();

+

+    }

+#endif

+    name->path = realloc(name->path, name->len + 1 + len);

+    strcpy(&name->path[name->len], str);

+    name->len += len;

+}

+

+static void check_cwd(void)

+{

+#ifdef DEBUG

+    REDSTAT statbuf;

+

+    if (stat64(".", &statbuf) == 0 && statbuf.st_ino == top_ino)

+        return;

+    chdir(homedir);

+    RedPrintf("fsstress: check_cwd failure\n");

+    abort();

+

+#endif

+}

+

+static int creat_path(pathname_t *name, mode_t mode)

+{

+    char buf[MAXNAMELEN];

+    pathname_t newname;

+    int rval;

+

+    rval = creat(name->path, mode);

+    if (rval >= 0 || errno != RED_ENAMETOOLONG)

+        return rval;

+    separate_pathname(name, buf, &newname);

+    if (chdir(buf) == 0) {

+        rval = creat_path(&newname, mode);

+        chdir("..");

+    }

+    free_pathname(&newname);

+    return rval;

+}

+

+static void dcache_enter(int dirid, int slot)

+{

+    dcache[dirid % NDCACHE] = slot;

+}

+

+static void dcache_init(void)

+{

+    int i;

+

+    for (i = 0; i < NDCACHE; i++)

+        dcache[i] = -1;

+}

+

+static fent_t *dcache_lookup(int dirid)

+{

+    fent_t *fep;

+    int i;

+

+    i = dcache[dirid % NDCACHE];

+    if (i >= 0 && (fep = &flist[FT_DIR].fents[i])->id == dirid)

+        return fep;

+    return NULL;

+}

+

+static void dcache_purge(int dirid)

+{

+    int *dcp;

+

+    dcp = &dcache[dirid % NDCACHE];

+    if (*dcp >= 0 && flist[FT_DIR].fents[*dcp].id == dirid)

+        *dcp = -1;

+}

+

+static void del_from_flist(int ft, int slot)

+{

+    flist_t *ftp;

+

+    ftp = &flist[ft];

+    if (ft == FT_DIR)

+        dcache_purge(ftp->fents[slot].id);

+    if (slot != ftp->nfiles - 1) {

+        if (ft == FT_DIR)

+            dcache_purge(ftp->fents[ftp->nfiles - 1].id);

+        ftp->fents[slot] = ftp->fents[--ftp->nfiles];

+    } else

+        ftp->nfiles--;

+}

+

+static fent_t *dirid_to_fent(int dirid)

+{

+    fent_t *efep;

+    fent_t *fep;

+    flist_t *flp;

+

+    if ((fep = dcache_lookup(dirid)))

+        return fep;

+    flp = &flist[FT_DIR];

+    for (fep = flp->fents, efep = &fep[flp->nfiles]; fep < efep; fep++) {

+        if (fep->id == dirid) {

+            dcache_enter(dirid, (int)(fep - flp->fents));

+            return fep;

+        }

+    }

+    return NULL;

+}

+

+static void doproc(void)

+{

+    REDSTAT statbuf;

+    char buf[10];

+    int opno;

+    opdesc_t *p;

+

+    RedSNPrintf(buf, sizeof(buf), "p%x", procid);

+    (void)mkdir(buf);

+    if (chdir(buf) < 0 || stat64(".", &statbuf) < 0) {

+        perror(buf);

+        _exit(1);

+    }

+    top_ino = statbuf.st_ino;

+    homedir = getcwd(NULL, 0);

+    seed += procid;

+    srandom(seed);

+    if (namerand)

+        namerand = random();

+    for (opno = 0; opno < operations; opno++) {

+        p = &ops[freq_table[random() % freq_table_size]];

+        if ((unsigned long)p->func < 4096)

+            abort();

+

+        p->func(opno, random());

+    }

+    free(homedir);

+}

+

+static void fent_to_name(pathname_t *name, flist_t *flp, fent_t *fep)

+{

+    char buf[MAXNAMELEN];

+    int i;

+    fent_t *pfep;

+

+    if (fep == NULL)

+        return;

+    if (fep->parent != -1) {

+        pfep = dirid_to_fent(fep->parent);

+        fent_to_name(name, &flist[FT_DIR], pfep);

+        append_pathname(name, "/");

+    }

+    i = RedSNPrintf(buf, sizeof(buf), "%c%x", flp->tag, fep->id);

+    namerandpad(fep->id, buf, i);

+    append_pathname(name, buf);

+}

+

+static void fix_parent(int oldid, int newid)

+{

+    fent_t *fep;

+    flist_t *flp;

+    int i;

+    int j;

+

+    for (i = 0, flp = flist; i < FT_nft; i++, flp++) {

+        for (j = 0, fep = flp->fents; j < flp->nfiles; j++, fep++) {

+            if (fep->parent == oldid)

+                fep->parent = newid;

+        }

+    }

+}

+

+static void free_pathname(pathname_t *name)

+{

+    if (name->path) {

+        free(name->path);

+        name->path = NULL;

+        name->len = 0;

+    }

+}

+

+static int generate_fname(fent_t *fep, int ft, pathname_t *name, int *idp, int *v)

+{

+    char buf[MAXNAMELEN];

+    flist_t *flp;

+    int id;

+    int j;

+    int len;

+

+    flp = &flist[ft];

+    len = RedSNPrintf(buf, sizeof(buf), "%c%x", flp->tag, id = nameseq++);

+    namerandpad(id, buf, len);

+    if (fep) {

+        fent_to_name(name, &flist[FT_DIR], fep);

+        append_pathname(name, "/");

+    }

+    append_pathname(name, buf);

+    *idp = id;

+    *v = verbose;

+    for (j = 0; !*v && j < ilistlen; j++) {

+        if (ilist[j] == id) {

+            *v = 1;

+            break;

+        }

+    }

+    return 1;

+}

+

+static int

+get_fname(int which, long r, pathname_t *name, flist_t **flpp, fent_t **fepp, int *v)

+{

+    int c;

+    fent_t *fep;

+    flist_t *flp;

+    int i;

+    int j;

+    int x;

+

+    for (i = 0, c = 0, flp = flist; i < FT_nft; i++, flp++) {

+        if (which & (1 << i))

+            c += flp->nfiles;

+    }

+    if (c == 0) {

+        if (flpp)

+            *flpp = NULL;

+        if (fepp)

+            *fepp = NULL;

+        *v = verbose;

+        return 0;

+    }

+    x = (int)(r % c);

+    for (i = 0, c = 0, flp = flist; i < FT_nft; i++, flp++) {

+        if (which & (1 << i)) {

+            if (x < c + flp->nfiles) {

+                fep = &flp->fents[x - c];

+                if (name)

+                    fent_to_name(name, flp, fep);

+                if (flpp)

+                    *flpp = flp;

+                if (fepp)

+                    *fepp = fep;

+                *v = verbose;

+                for (j = 0; !*v && j < ilistlen; j++) {

+                    if (ilist[j] == fep->id) {

+                        *v = 1;

+                        break;

+                    }

+                }

+                return 1;

+            }

+            c += flp->nfiles;

+        }

+    }

+#ifdef DEBUG

+    RedPrintf("fsstress: get_fname failure\n");

+    abort();

+#endif

+    return -1;

+

+}

+

+static void init_pathname(pathname_t *name)

+{

+    name->len = 0;

+    name->path = NULL;

+}

+

+static int link_path(pathname_t *name1, pathname_t *name2)

+{

+    char buf1[MAXNAMELEN];

+    char buf2[MAXNAMELEN];

+    int down1;

+    pathname_t newname1;

+    pathname_t newname2;

+    int rval;

+

+    rval = link(name1->path, name2->path);

+    if (rval >= 0 || errno != RED_ENAMETOOLONG)

+        return rval;

+    separate_pathname(name1, buf1, &newname1);

+    separate_pathname(name2, buf2, &newname2);

+    if (strcmp(buf1, buf2) == 0) {

+        if (chdir(buf1) == 0) {

+            rval = link_path(&newname1, &newname2);

+            chdir("..");

+        }

+    } else {

+        if (strcmp(buf1, "..") == 0)

+            down1 = 0;

+        else if (strcmp(buf2, "..") == 0)

+            down1 = 1;

+        else if (strlen(buf1) == 0)

+            down1 = 0;

+        else if (strlen(buf2) == 0)

+            down1 = 1;

+        else

+            down1 = MAX(newname1.len, 3 + name2->len) <=

+                MAX(3 + name1->len, newname2.len);

+        if (down1) {

+            free_pathname(&newname2);

+            append_pathname(&newname2, "../");

+            append_pathname(&newname2, name2->path);

+            if (chdir(buf1) == 0) {

+                rval = link_path(&newname1, &newname2);

+                chdir("..");

+            }

+        } else {

+            free_pathname(&newname1);

+            append_pathname(&newname1, "../");

+            append_pathname(&newname1, name1->path);

+            if (chdir(buf2) == 0) {

+                rval = link_path(&newname1, &newname2);

+                chdir("..");

+            }

+        }

+    }

+    free_pathname(&newname1);

+    free_pathname(&newname2);

+    return rval;

+}

+

+static int lstat64_path(pathname_t *name, REDSTAT *sbuf)

+{

+    char buf[MAXNAMELEN];

+    pathname_t newname;

+    int rval;

+

+    rval = lstat64(name->path, sbuf);

+    if (rval >= 0 || errno != RED_ENAMETOOLONG)

+        return rval;

+    separate_pathname(name, buf, &newname);

+    if (chdir(buf) == 0) {

+        rval = lstat64_path(&newname, sbuf);

+        chdir("..");

+    }

+    free_pathname(&newname);

+    return rval;

+}

+

+static void make_freq_table(void)

+{

+    int f;

+    int i;

+    opdesc_t *p;

+

+    for (p = ops, f = 0; p < ops_end; p++)

+        f += p->freq;

+    freq_table = malloc(f * sizeof(*freq_table));

+    freq_table_size = f;

+    for (p = ops, i = 0; p < ops_end; p++) {

+        for (f = 0; f < p->freq; f++, i++)

+            freq_table[i] = p->op;

+    }

+}

+

+static int mkdir_path(pathname_t *name, mode_t mode)

+{

+    char buf[MAXNAMELEN];

+    pathname_t newname;

+    int rval;

+

+    rval = mkdir(name->path);

+    if (rval >= 0 || errno != RED_ENAMETOOLONG)

+        return rval;

+    separate_pathname(name, buf, &newname);

+    if (chdir(buf) == 0) {

+        rval = mkdir_path(&newname, mode);

+        chdir("..");

+    }

+    free_pathname(&newname);

+    return rval;

+}

+

+static void namerandpad(int id, char *buf, int len)

+{

+    int bucket;

+    static int buckets[8] = {0};

+    static int bucket_count = 0;

+    int bucket_value;

+    int i;

+    int padlen;

+    int padmod;

+

+    if (namerand == 0)

+        return;

+

+    /*  buckets[] used to be a statically initialized array with the following

+        initializer: { 2, 4, 8, 16, 32, 64, 128, MAXNAMELEN - 1 }

+

+        The problem is that with Reliance Edge, the maximum name length might be

+        less than 128.  So the below code populates buckets[] in a similar

+        fashion but avoids name lengths longer than the maximum.  For example,

+        if the max name is 20, the resulting array is { 2, 4, 8, 16, 20 }.

+    */

+    if (!bucket_count) {

+        bucket_count = sizeof(buckets) / sizeof(buckets[0]);

+        bucket_value = 2;

+        for (i = 0; i < bucket_count; i++) {

+            if (bucket_value > 128 || bucket_value >= (int)MAXNAMELEN - 1)

+                break;

+            buckets[i] = bucket_value;

+            bucket_value *= 2;

+        }

+        if (i < bucket_count) {

+            buckets[i] = MAXNAMELEN - 1;

+            i++;

+        }

+        bucket_count = i;

+    }

+

+    bucket = (id ^ namerand) % bucket_count;

+    padmod = buckets[bucket] + 1 - len;

+    if (padmod <= 0)

+        return;

+    padlen = (id ^ namerand) % padmod;

+    if (padlen) {

+        memset(&buf[len], 'X', padlen);

+        buf[len + padlen] = '\0';

+    }

+}

+

+static int open_path(pathname_t *name, int oflag)

+{

+    char buf[MAXNAMELEN];

+    pathname_t newname;

+    int rval;

+

+    rval = open(name->path, oflag);

+    if (rval >= 0 || errno != RED_ENAMETOOLONG)

+        return rval;

+    separate_pathname(name, buf, &newname);

+    if (chdir(buf) == 0) {

+        rval = open_path(&newname, oflag);

+        chdir("..");

+    }

+    free_pathname(&newname);

+    return rval;

+}

+

+static DIR *opendir_path(pathname_t *name)

+{

+    char buf[MAXNAMELEN];

+    pathname_t newname;

+    DIR *rval;

+

+    rval = opendir(name->path);

+    if (rval || errno != RED_ENAMETOOLONG)

+        return rval;

+    separate_pathname(name, buf, &newname);

+    if (chdir(buf) == 0) {

+        rval = opendir_path(&newname);

+        chdir("..");

+    }

+    free_pathname(&newname);

+    return rval;

+}

+

+static int rename_path(pathname_t *name1, pathname_t *name2)

+{

+    char buf1[MAXNAMELEN];

+    char buf2[MAXNAMELEN];

+    int down1;

+    pathname_t newname1;

+    pathname_t newname2;

+    int rval;

+

+    rval = rename(name1->path, name2->path);

+    if (rval >= 0 || errno != RED_ENAMETOOLONG)

+        return rval;

+    separate_pathname(name1, buf1, &newname1);

+    separate_pathname(name2, buf2, &newname2);

+    if (strcmp(buf1, buf2) == 0) {

+        if (chdir(buf1) == 0) {

+            rval = rename_path(&newname1, &newname2);

+            chdir("..");

+        }

+    } else {

+        if (strcmp(buf1, "..") == 0)

+            down1 = 0;

+        else if (strcmp(buf2, "..") == 0)

+            down1 = 1;

+        else if (strlen(buf1) == 0)

+            down1 = 0;

+        else if (strlen(buf2) == 0)

+            down1 = 1;

+        else

+            down1 = MAX(newname1.len, 3 + name2->len) <=

+                MAX(3 + name1->len, newname2.len);

+        if (down1) {

+            free_pathname(&newname2);

+            append_pathname(&newname2, "../");

+            append_pathname(&newname2, name2->path);

+            if (chdir(buf1) == 0) {

+                rval = rename_path(&newname1, &newname2);

+                chdir("..");

+            }

+        } else {

+            free_pathname(&newname1);

+            append_pathname(&newname1, "../");

+            append_pathname(&newname1, name1->path);

+            if (chdir(buf2) == 0) {

+                rval = rename_path(&newname1, &newname2);

+                chdir("..");

+            }

+        }

+    }

+    free_pathname(&newname1);

+    free_pathname(&newname2);

+    return rval;

+}

+

+static int rmdir_path(pathname_t *name)

+{

+    char buf[MAXNAMELEN];

+    pathname_t newname;

+    int rval;

+

+    rval = rmdir(name->path);

+    if (rval >= 0 || errno != RED_ENAMETOOLONG)

+        return rval;

+    separate_pathname(name, buf, &newname);

+    if (chdir(buf) == 0) {

+        rval = rmdir_path(&newname);

+        chdir("..");

+    }

+    free_pathname(&newname);

+    return rval;

+}

+

+static void separate_pathname(pathname_t *name, char *buf, pathname_t *newname)

+{

+    char *slash;

+

+    init_pathname(newname);

+    slash = strchr(name->path, '/');

+    if (slash == NULL) {

+        buf[0] = '\0';

+        return;

+    }

+    *slash = '\0';

+    strcpy(buf, name->path);

+    *slash = '/';

+    append_pathname(newname, slash + 1);

+}

+

+static int stat64_path(pathname_t *name, REDSTAT *sbuf)

+{

+    char buf[MAXNAMELEN];

+    pathname_t newname;

+    int rval;

+

+    rval = stat64(name->path, sbuf);

+    if (rval >= 0 || errno != RED_ENAMETOOLONG)

+        return rval;

+    separate_pathname(name, buf, &newname);

+    if (chdir(buf) == 0) {

+        rval = stat64_path(&newname, sbuf);

+        chdir("..");

+    }

+    free_pathname(&newname);

+    return rval;

+}

+

+static int truncate64_path(pathname_t *name, off64_t length)

+{

+    char buf[MAXNAMELEN];

+    pathname_t newname;

+    int rval;

+

+    rval = truncate64(name->path, length);

+    if (rval >= 0 || errno != RED_ENAMETOOLONG)

+        return rval;

+    separate_pathname(name, buf, &newname);

+    if (chdir(buf) == 0) {

+        rval = truncate64_path(&newname, length);

+        chdir("..");

+    }

+    free_pathname(&newname);

+    return rval;

+}

+

+static int unlink_path(pathname_t *name)

+{

+    char buf[MAXNAMELEN];

+    pathname_t newname;

+    int rval;

+

+    rval = unlink(name->path);

+    if (rval >= 0 || errno != RED_ENAMETOOLONG)

+        return rval;

+    separate_pathname(name, buf, &newname);

+    if (chdir(buf) == 0) {

+        rval = unlink_path(&newname);

+        chdir("..");

+    }

+    free_pathname(&newname);

+    return rval;

+}

+

+static void usage(const char *progname)

+{

+    RedPrintf("usage: %s VolumeID [Options]\n", progname);

+    RedPrintf("File system stress test.\n\n");

+    RedPrintf("Where:\n");

+    RedPrintf("  VolumeID\n");

+    RedPrintf("      A volume number (e.g., 2) or a volume path prefix (e.g., VOL1: or /data)\n");

+    RedPrintf("      of the volume to test.\n");

+    RedPrintf("And 'Options' are any of the following:\n");

+    RedPrintf("  --no-cleanup, -c\n");

+    RedPrintf("      Specifies not to remove files (cleanup) after execution\n");

+    RedPrintf("  --loops=count, -l count\n");

+    RedPrintf("      Specifies the number of times the entire test should loop.  Use 0 for\n");

+    RedPrintf("      infinite.  Default 1.\n");

+    RedPrintf("  --nops=count, -n count\n");

+    RedPrintf("      Specifies the number of operations to run (default 10000).\n");

+    RedPrintf("  --namepad, -r\n");

+    RedPrintf("      Specifies to use random name padding (resulting in longer names).\n");

+    RedPrintf("  --seed=value, -s value\n");

+    RedPrintf("      Specifies the seed for the random number generator (default timestamp).\n");

+    RedPrintf("  --verbose, -v\n");

+    RedPrintf("      Specifies verbose mode (without this, test is very quiet).\n");

+    RedPrintf("  --dev=devname, -D devname\n");

+    RedPrintf("      Specifies the device name.  This is typically only meaningful when\n");

+    RedPrintf("      running the test on a host machine.  This can be \"ram\" to test on a RAM\n");

+    RedPrintf("      disk, the path and name of a file disk (e.g., red.bin); or an OS-specific\n");

+    RedPrintf("      reference to a device (on Windows, a drive letter like G: or a device name\n");

+    RedPrintf("      like \\\\.\\PhysicalDrive7).\n");

+    RedPrintf("  --help, -H\n");

+    RedPrintf("      Prints this usage text and exits.\n\n");

+    RedPrintf("Warning: This test will format the volume -- destroying all existing data.\n\n");

+}

+

+static void creat_f(int opno, long r)

+{

+    int e;

+    int e1;

+    pathname_t f;

+    int fd;

+    fent_t *fep;

+    int id;

+    int parid;

+    int type;

+    int v;

+    int v1;

+    int esz = 0;

+

+    if (!get_fname(FT_DIRm, r, NULL, NULL, &fep, &v1))

+        parid = -1;

+    else

+        parid = fep->id;

+    init_pathname(&f);

+    type = rtpct ? ((int)(random() % 100) > rtpct ? FT_REG : FT_RTF) : FT_REG;

+    e = generate_fname(fep, type, &f, &id, &v);

+    v |= v1;

+    if (!e) {

+        if (v) {

+            fent_to_name(&f, &flist[FT_DIR], fep);

+            RedPrintf("%d/%d: creat - no filename from %s\n",

+                   procid, opno, f.path);

+        }

+        free_pathname(&f);

+        return;

+    }

+    fd = creat_path(&f, 0666);

+    e = fd < 0 ? errno : 0;

+    e1 = 0;

+    check_cwd();

+    esz = 0;

+    if (fd >= 0) {

+        add_to_flist(type, id, parid);

+        close(fd);

+    }

+    if (v)

+        RedPrintf("%d/%d: creat %s x:%d %d %d\n", procid, opno, f.path,

+               esz, e, e1);

+    free_pathname(&f);

+}

+

+static void fdatasync_f(int opno, long r)

+{

+    int e;

+    pathname_t f;

+    int fd;

+    int v;

+

+    init_pathname(&f);

+    if (!get_fname(FT_REGFILE, r, &f, NULL, NULL, &v)) {

+        if (v)

+            RedPrintf("%d/%d: fdatasync - no filename\n",

+                   procid, opno);

+        free_pathname(&f);

+        return;

+    }

+    fd = open_path(&f, O_WRONLY);

+    e = fd < 0 ? errno : 0;

+    check_cwd();

+    if (fd < 0) {

+        if (v)

+            RedPrintf("%d/%d: fdatasync - open %s failed %d\n",

+                   procid, opno, f.path, e);

+        free_pathname(&f);

+        return;

+    }

+    e = fdatasync(fd) < 0 ? errno : 0;

+    if (v)

+        RedPrintf("%d/%d: fdatasync %s %d\n", procid, opno, f.path, e);

+    free_pathname(&f);

+    close(fd);

+}

+

+static void fsync_f(int opno, long r)

+{

+    int e;

+    pathname_t f;

+    int fd;

+    int v;

+

+    init_pathname(&f);

+    if (!get_fname(FT_REGFILE, r, &f, NULL, NULL, &v)) {

+        if (v)

+            RedPrintf("%d/%d: fsync - no filename\n", procid, opno);

+        free_pathname(&f);

+        return;

+    }

+    fd = open_path(&f, O_WRONLY);

+    e = fd < 0 ? errno : 0;

+    check_cwd();

+    if (fd < 0) {

+        if (v)

+            RedPrintf("%d/%d: fsync - open %s failed %d\n",

+                   procid, opno, f.path, e);

+        free_pathname(&f);

+        return;

+    }

+    e = fsync(fd) < 0 ? errno : 0;

+    if (v)

+        RedPrintf("%d/%d: fsync %s %d\n", procid, opno, f.path, e);

+    free_pathname(&f);

+    close(fd);

+}

+

+static void getdents_f(int opno, long r)

+{

+    DIR *dir;

+    pathname_t f;

+    int v;

+

+    init_pathname(&f);

+    if (!get_fname(FT_DIRm, r, &f, NULL, NULL, &v))

+        append_pathname(&f, ".");

+    dir = opendir_path(&f);

+    check_cwd();

+    if (dir == NULL) {

+        if (v)

+            RedPrintf("%d/%d: getdents - can't open %s\n",

+                   procid, opno, f.path);

+        free_pathname(&f);

+        return;

+    }

+    while (readdir64(dir) != NULL)

+        continue;

+    if (v)

+        RedPrintf("%d/%d: getdents %s 0\n", procid, opno, f.path);

+    free_pathname(&f);

+    closedir(dir);

+}

+

+static void link_f(int opno, long r)

+{

+    int e;

+    pathname_t f;

+    fent_t *fep;

+    flist_t *flp;

+    int id;

+    pathname_t l;

+    int parid;

+    int v;

+    int v1;

+

+    init_pathname(&f);

+    if (!get_fname(FT_NOTDIR, r, &f, &flp, NULL, &v1)) {

+        if (v1)

+            RedPrintf("%d/%d: link - no file\n", procid, opno);

+        free_pathname(&f);

+        return;

+    }

+    if (!get_fname(FT_DIRm, random(), NULL, NULL, &fep, &v))

+        parid = -1;

+    else

+        parid = fep->id;

+    v |= v1;

+    init_pathname(&l);

+    e = generate_fname(fep, (int)(flp - flist), &l, &id, &v1);

+    v |= v1;

+    if (!e) {

+        if (v) {

+            fent_to_name(&l, &flist[FT_DIR], fep);

+            RedPrintf("%d/%d: link - no filename from %s\n",

+                   procid, opno, l.path);

+        }

+        free_pathname(&l);

+        free_pathname(&f);

+        return;

+    }

+    e = link_path(&f, &l) < 0 ? errno : 0;

+    check_cwd();

+    if (e == 0)

+        add_to_flist((int)(flp - flist), id, parid);

+    if (v)

+        RedPrintf("%d/%d: link %s %s %d\n", procid, opno, f.path, l.path,

+               e);

+    free_pathname(&l);

+    free_pathname(&f);

+}

+

+static void mkdir_f(int opno, long r)

+{

+    int e;

+    pathname_t f;

+    fent_t *fep;

+    int id;

+    int parid;

+    int v;

+    int v1;

+

+    if (!get_fname(FT_DIRm, r, NULL, NULL, &fep, &v))

+        parid = -1;

+    else

+        parid = fep->id;

+    init_pathname(&f);

+    e = generate_fname(fep, FT_DIR, &f, &id, &v1);

+    v |= v1;

+    if (!e) {

+        if (v) {

+            fent_to_name(&f, &flist[FT_DIR], fep);

+            RedPrintf("%d/%d: mkdir - no filename from %s\n",

+                   procid, opno, f.path);

+        }

+        free_pathname(&f);

+        return;

+    }

+    e = mkdir_path(&f, 0777) < 0 ? errno : 0;

+    check_cwd();

+    if (e == 0)

+        add_to_flist(FT_DIR, id, parid);

+    if (v)

+        RedPrintf("%d/%d: mkdir %s %d\n", procid, opno, f.path, e);

+    free_pathname(&f);

+}

+

+static void read_f(int opno, long r)

+{

+    char *buf;

+    int e;

+    pathname_t f;

+    int fd;

+    uint32_t len;

+    __int64_t lr;

+    off64_t off;

+    REDSTAT stb;

+    int v;

+

+    init_pathname(&f);

+    if (!get_fname(FT_REGFILE, r, &f, NULL, NULL, &v)) {

+        if (v)

+            RedPrintf("%d/%d: read - no filename\n", procid, opno);

+        free_pathname(&f);

+        return;

+    }

+    fd = open_path(&f, O_RDONLY);

+    e = fd < 0 ? errno : 0;

+    check_cwd();

+    if (fd < 0) {

+        if (v)

+            RedPrintf("%d/%d: read - open %s failed %d\n",

+                   procid, opno, f.path, e);

+        free_pathname(&f);

+        return;

+    }

+    if (fstat64(fd, &stb) < 0) {

+        if (v)

+            RedPrintf("%d/%d: read - fstat64 %s failed %d\n",

+                   procid, opno, f.path, errno);

+        free_pathname(&f);

+        close(fd);

+        return;

+    }

+    if (stb.st_size == 0) {

+        if (v)

+            RedPrintf("%d/%d: read - %s zero size\n", procid, opno,

+                   f.path);

+        free_pathname(&f);

+        close(fd);

+        return;

+    }

+    lr = ((__int64_t) random() << 32) + random();

+    off = (off64_t) (lr % stb.st_size);

+    lseek64(fd, off, SEEK_SET);

+    len = (random() % (getpagesize() * 4)) + 1;

+    buf = malloc(len);

+    e = read(fd, buf, len) < 0 ? errno : 0;

+    free(buf);

+    if (v)

+        RedPrintf("%d/%d: read %s [%lld,%ld] %d\n",

+               procid, opno, f.path, (long long)off, (long int)len, e);

+    free_pathname(&f);

+    close(fd);

+}

+

+static void rename_f(int opno, long r)

+{

+    fent_t *dfep;

+    int e;

+    pathname_t f;

+    fent_t *fep;

+    flist_t *flp;

+    int id;

+    pathname_t newf;

+    int oldid;

+    int parid;

+    int v;

+    int v1;

+

+    init_pathname(&f);

+    if (!get_fname(FT_ANYm, r, &f, &flp, &fep, &v1)) {

+        if (v1)

+            RedPrintf("%d/%d: rename - no filename\n", procid, opno);

+        free_pathname(&f);

+        return;

+    }

+    if (!get_fname(FT_DIRm, random(), NULL, NULL, &dfep, &v))

+        parid = -1;

+    else

+        parid = dfep->id;

+    v |= v1;

+    init_pathname(&newf);

+    e = generate_fname(dfep, (int)(flp - flist), &newf, &id, &v1);

+    v |= v1;

+    if (!e) {

+        if (v) {

+            fent_to_name(&f, &flist[FT_DIR], dfep);

+            RedPrintf("%d/%d: rename - no filename from %s\n",

+                   procid, opno, f.path);

+        }

+        free_pathname(&newf);

+        free_pathname(&f);

+        return;

+    }

+    e = rename_path(&f, &newf) < 0 ? errno : 0;

+    check_cwd();

+    if (e == 0) {

+        if (flp - flist == FT_DIR) {

+            oldid = fep->id;

+            fix_parent(oldid, id);

+        }

+        del_from_flist((int)(flp - flist), (int)(fep - flp->fents));

+        add_to_flist((int)(flp - flist), id, parid);

+    }

+    if (v)

+        RedPrintf("%d/%d: rename %s to %s %d\n", procid, opno, f.path,

+               newf.path, e);

+    free_pathname(&newf);

+    free_pathname(&f);

+}

+

+static void rmdir_f(int opno, long r)

+{

+    int e;

+    pathname_t f;

+    fent_t *fep;

+    int v;

+

+    init_pathname(&f);

+    if (!get_fname(FT_DIRm, r, &f, NULL, &fep, &v)) {

+        if (v)

+            RedPrintf("%d/%d: rmdir - no directory\n", procid, opno);

+        free_pathname(&f);

+        return;

+    }

+    e = rmdir_path(&f) < 0 ? errno : 0;

+    check_cwd();

+    if (e == 0)

+        del_from_flist(FT_DIR, (int)(fep - flist[FT_DIR].fents));

+    if (v)

+        RedPrintf("%d/%d: rmdir %s %d\n", procid, opno, f.path, e);

+    free_pathname(&f);

+}

+

+static void stat_f(int opno, long r)

+{

+    int e;

+    pathname_t f;

+    REDSTAT stb;

+    int v;

+

+    init_pathname(&f);

+    if (!get_fname(FT_ANYm, r, &f, NULL, NULL, &v)) {

+        if (v)

+            RedPrintf("%d/%d: stat - no entries\n", procid, opno);

+        free_pathname(&f);

+        return;

+    }

+    e = lstat64_path(&f, &stb) < 0 ? errno : 0;

+    check_cwd();

+    if (v)

+        RedPrintf("%d/%d: stat %s %d\n", procid, opno, f.path, e);

+    free_pathname(&f);

+}

+

+static void truncate_f(int opno, long r)

+{

+    int e;

+    pathname_t f;

+    __int64_t lr;

+    off64_t off;

+    REDSTAT stb;

+    int v;

+

+    init_pathname(&f);

+    if (!get_fname(FT_REGFILE, r, &f, NULL, NULL, &v)) {

+        if (v)

+            RedPrintf("%d/%d: truncate - no filename\n", procid, opno);

+        free_pathname(&f);

+        return;

+    }

+    e = stat64_path(&f, &stb) < 0 ? errno : 0;

+    check_cwd();

+    if (e > 0) {

+        if (v)

+            RedPrintf("%d/%d: truncate - stat64 %s failed %d\n",

+                   procid, opno, f.path, e);

+        free_pathname(&f);

+        return;

+    }

+    lr = ((__int64_t) random() << 32) + random();

+    off = lr % MIN(stb.st_size + (1024 * 1024), MAXFSIZE);

+    off %= maxfsize;

+    e = truncate64_path(&f, off) < 0 ? errno : 0;

+    check_cwd();

+    if (v)

+        RedPrintf("%d/%d: truncate %s %lld %d\n", procid, opno, f.path,

+               (long long)off, e);

+    free_pathname(&f);

+}

+

+static void unlink_f(int opno, long r)

+{

+    int e;

+    pathname_t f;

+    fent_t *fep;

+    flist_t *flp;

+    int v;

+

+    init_pathname(&f);

+    if (!get_fname(FT_NOTDIR, r, &f, &flp, &fep, &v)) {

+        if (v)

+            RedPrintf("%d/%d: unlink - no file\n", procid, opno);

+        free_pathname(&f);

+        return;

+    }

+    e = unlink_path(&f) < 0 ? errno : 0;

+    check_cwd();

+    if (e == 0)

+        del_from_flist((int)(flp - flist), (int)(fep - flp->fents));

+    if (v)

+        RedPrintf("%d/%d: unlink %s %d\n", procid, opno, f.path, e);

+    free_pathname(&f);

+}

+

+static void write_f(int opno, long r)

+{

+    char *buf;

+    int e;

+    pathname_t f;

+    int fd;

+    uint32_t len;

+    __int64_t lr;

+    off64_t off;

+    REDSTAT stb;

+    int v;

+

+    init_pathname(&f);

+    if (!get_fname(FT_REGm, r, &f, NULL, NULL, &v)) {

+        if (v)

+            RedPrintf("%d/%d: write - no filename\n", procid, opno);

+        free_pathname(&f);

+        return;

+    }

+    fd = open_path(&f, O_WRONLY);

+    e = fd < 0 ? errno : 0;

+    check_cwd();

+    if (fd < 0) {

+        if (v)

+            RedPrintf("%d/%d: write - open %s failed %d\n",

+                   procid, opno, f.path, e);

+        free_pathname(&f);

+        return;

+    }

+    if (fstat64(fd, &stb) < 0) {

+        if (v)

+            RedPrintf("%d/%d: write - fstat64 %s failed %d\n",

+                   procid, opno, f.path, errno);

+        free_pathname(&f);

+        close(fd);

+        return;

+    }

+    lr = ((__int64_t) random() << 32) + random();

+    off = (off64_t) (lr % MIN(stb.st_size + (1024 * 1024), MAXFSIZE));

+    off %= maxfsize;

+    lseek64(fd, off, SEEK_SET);

+    len = (random() % (getpagesize() * 4)) + 1;

+    buf = malloc(len);

+    memset(buf, nameseq & 0xff, len);

+    e = write(fd, buf, len) < 0 ? errno : 0;

+    free(buf);

+    if (v)

+        RedPrintf("%d/%d: write %s [%lld,%ld] %d\n",

+               procid, opno, f.path, (long long)off, (long int)len, e);

+    free_pathname(&f);

+    close(fd);

+}

+

+

+#if REDCONF_CHECKER == 1

+static void check_f(int opno, long r)

+{

+    int32_t ret;

+    const char *pszVolume = gpRedVolConf->pszPathPrefix;

+

+    (void)r;

+

+    errno = 0;

+

+    ret = red_transact(pszVolume);

+

+    if(ret == 0)

+    {

+        ret = red_umount(pszVolume);

+

+        if(ret == 0)

+        {

+            int32_t ret2;

+

+            errno = -RedCoreVolCheck();

+            if(errno != 0)

+            {

+                ret = -1;

+            }

+

+            ret2 = red_mount(pszVolume);

+

+            if(ret == 0)

+            {

+                ret = ret2;

+            }

+

+            if(ret2 != 0)

+            {

+                exit(1);

+            }

+        }

+    }

+

+    if (verbose)

+    {

+        RedPrintf("%d/%d: check %s %d\n", procid, opno, pszVolume, errno);

+    }

+}

+#endif

+

+

+#endif /* FSSTRESS_SUPPORTED */

+

diff --git a/FreeRTOS-Plus/Source/Reliance-Edge/tests/posix/redposixcompat.h b/FreeRTOS-Plus/Source/Reliance-Edge/tests/posix/redposixcompat.h
new file mode 100644
index 0000000..6c59e93
--- /dev/null
+++ b/FreeRTOS-Plus/Source/Reliance-Edge/tests/posix/redposixcompat.h
@@ -0,0 +1,152 @@
+/*             ----> DO NOT REMOVE THE FOLLOWING NOTICE <----

+

+                   Copyright (c) 2014-2015 Datalight, Inc.

+                       All Rights Reserved Worldwide.

+

+    This program is free software; you can redistribute it and/or modify

+    it under the terms of the GNU General Public License as published by

+    the Free Software Foundation; use version 2 of the License.

+

+    This program is distributed in the hope that it will be useful,

+    but "AS-IS," WITHOUT ANY WARRANTY; without even the implied warranty

+    of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the

+    GNU General Public License for more details.

+

+    You should have received a copy of the GNU General Public License along

+    with this program; if not, write to the Free Software Foundation, Inc.,

+    51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.

+*/

+/*  Businesses and individuals that for commercial or other reasons cannot

+    comply with the terms of the GPLv2 license may obtain a commercial license

+    before incorporating Reliance Edge into proprietary software for

+    distribution in any form.  Visit http://www.datalight.com/reliance-edge for

+    more information.

+*/

+/** @file

+    @brief Defines macros which make the Reliance Edge POSIX-like API look more

+           like the actual POSIX API.

+

+    This file is intended for porting POSIX file system tests; it is not

+    intended for application use.

+*/

+#ifndef REDPOSIXCOMPAT_H

+#define REDPOSIXCOMPAT_H

+

+

+#ifndef assert

+#define assert(x) REDASSERT(x)

+#endif

+

+

+#undef O_RDONLY

+#undef O_WRONLY

+#undef O_RDWR

+#undef O_APPEND

+#undef O_CREAT

+#undef O_EXCL

+#undef O_TRUNC

+#define O_RDONLY RED_O_RDONLY

+#define O_WRONLY RED_O_WRONLY

+#define O_RDWR RED_O_RDWR

+#define O_APPEND RED_O_APPEND

+#define O_CREAT RED_O_CREAT

+#define O_EXCL RED_O_EXCL

+#define O_TRUNC RED_O_TRUNC

+

+#undef SEEK_SET

+#undef SEEK_CUR

+#undef SEEK_END

+#define SEEK_SET RED_SEEK_SET

+#define SEEK_CUR RED_SEEK_CUR

+#define SEEK_END RED_SEEK_END

+

+/*  Old-fashioned Linux seek names.

+*/

+#undef L_SET

+#undef L_INCR

+#undef L_XTND

+#define L_SET SEEK_SET

+#define L_INCR SEEK_CUR

+#define L_XTND SEEK_END

+

+#undef S_IFDIR

+#undef S_IFREG

+#undef S_ISDIR

+#undef S_ISREG

+#define S_IFDIR RED_S_IFDIR

+#define S_IFREG RED_S_IFREG

+#define S_ISDIR(m) RED_S_ISDIR(m)

+#define S_ISREG(m) RED_S_ISREG(m)

+

+#undef ST_RDONLY

+#undef ST_NOSUID

+#define ST_RDONLY RED_ST_RDONLY

+#define ST_NOSUID RED_ST_NOSUID

+

+#undef open

+#undef creat

+#undef unlink

+#undef mkdir

+#undef rmdir

+#undef rename

+#undef link

+#undef close

+#undef read

+#undef write

+#undef fsync

+#undef fdatasync

+#undef lseek

+#undef ftruncate

+#undef fstat

+#undef opendir

+#undef readdir

+#undef rewinddir

+#undef closedir

+#define open(path, oflag) red_open(path, oflag)

+#define creat(path, mode) open(path, O_WRONLY|O_CREAT|O_TRUNC)

+#define unlink(path) red_unlink(path)

+#define mkdir(path) red_mkdir(path)

+#define rmdir(path) red_rmdir(path)

+#define rename(old, new) red_rename(old, new)

+#define link(path, hardlink) red_link(path, hardlink)

+#define close(fd) red_close(fd)

+#define read(fd, buf, len) red_read(fd, buf, len)

+#define write(fd, buf, len) red_write(fd, buf, len)

+#define fsync(fd) red_fsync(fd)

+#define fdatasync(fd) fsync(fd)

+#define lseek(fd, offset, whence) red_lseek(fd, offset, whence)

+#define lseek64(fd, offset, whence) lseek(fd, offset, whence)

+#define ftruncate(fd, size) red_ftruncate(fd, size)

+#define fstat(fd, stat) red_fstat(fd, stat)

+#define fstat64(fd, stat) fstat(fd, stat)

+#define opendir(path) red_opendir(path)

+#define readdir(dirp) red_readdir(dirp)

+#define readdir64(dirp) readdir(dirp)

+#define rewinddir(dirp) red_rewinddir(dirp)

+#define closedir(dirp) red_closedir(dirp)

+

+#undef DIR

+#define DIR REDDIR

+

+#undef errno

+#define errno (*(int *)red_errnoptr())

+

+#undef memcpy

+#undef memmove

+#undef memset

+#undef strlen

+#undef strncmp

+#undef strcmp

+#undef strncpy

+#define memcpy(d, s, l) RedMemCpy(d, s, (uint32_t)(l))

+#define memmove(d, s, l) RedMemMove(d, s, (uint32_t)(l))

+#define memset(d, c, l) RedMemSet(d, (uint8_t)(c), (uint32_t)(l))

+#define strlen(s) RedStrLen(s)

+#define strncmp(s1, s2, l) RedStrNCmp(s1, s2, (uint32_t)(l))

+#define strcmp(s1, s2) RedStrCmp(s1, s2)

+#define strncpy(d, s, l) RedStrNCpy(d, s, (uint32_t)(l))

+

+

+#endif

+

+

diff --git a/FreeRTOS-Plus/Source/Reliance-Edge/tests/util/atoi.c b/FreeRTOS-Plus/Source/Reliance-Edge/tests/util/atoi.c
new file mode 100644
index 0000000..e4cd113
--- /dev/null
+++ b/FreeRTOS-Plus/Source/Reliance-Edge/tests/util/atoi.c
@@ -0,0 +1,478 @@
+/*             ----> DO NOT REMOVE THE FOLLOWING NOTICE <----

+

+                   Copyright (c) 2014-2015 Datalight, Inc.

+                       All Rights Reserved Worldwide.

+

+    This program is free software; you can redistribute it and/or modify

+    it under the terms of the GNU General Public License as published by

+    the Free Software Foundation; use version 2 of the License.

+

+    This program is distributed in the hope that it will be useful,

+    but "AS-IS," WITHOUT ANY WARRANTY; without even the implied warranty

+    of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the

+    GNU General Public License for more details.

+

+    You should have received a copy of the GNU General Public License along

+    with this program; if not, write to the Free Software Foundation, Inc.,

+    51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.

+*/

+/*  Businesses and individuals that for commercial or other reasons cannot

+    comply with the terms of the GPLv2 license may obtain a commercial license

+    before incorporating Reliance Edge into proprietary software for

+    distribution in any form.  Visit http://www.datalight.com/reliance-edge for

+    more information.

+*/

+/** @file

+    @brief Implements utilities that convert strings to numbers.

+*/

+#include <redfs.h>

+#include <redtestutils.h>

+

+

+#define ISHEXDIGITU(c)  (((c) >= 'A') && ((c) <= 'F'))

+#define ISHEXDIGITL(c)  (((c) >= 'a') && ((c) <= 'f'))

+#define ISHEXDIGIT(c)   (ISHEXDIGITL(c) || ISHEXDIGITU(c))

+

+

+/** @brief Converts an ASCII number into an int32_t.

+

+    Converts all decimal digit numbers up to the end of the string or to the

+    first non-numerical character.

+

+    @note This function does *not* ignore leading white space.

+

+    @param pszNum   Pointer to a constant array of characters.

+

+    @return The integer represented in the string.

+*/

+int32_t RedAtoI(

+    const char *pszNum)

+{

+    int32_t     lValue = 0;

+    int32_t     lNegative = 1;

+    uint32_t    ulIdx = 0U;

+

+    if(pszNum[ulIdx] == '+')

+    {

+        ulIdx++;

+    }

+    else if(pszNum[ulIdx] == '-')

+    {

+        ulIdx++;

+        lNegative = -1;

+    }

+    else

+    {

+        /*  No sign, implicitly positive.

+        */

+    }

+

+    while(ISDIGIT(pszNum[ulIdx]))

+    {

+        lValue *= 10;

+        lValue += pszNum[ulIdx] - '0';

+        ulIdx++;

+    }

+

+    lValue *= lNegative;

+

+    return lValue;

+}

+

+

+/** @brief Convert a hexadecimal ASCII number into a uint32_t value.

+

+    The function processes all hex digits up to a NUL-terminator, or to the

+    first non-hex character.  Only hexadecimal digits are processed, so leading

+    white space, or a leading "0x" prefix are not allowed.

+

+    If pachNum points to an empty string (points to a NUL), this function will

+    return NULL, and the value at *pulNum will not be modified.

+

+    @note This function does not check for overflow.  If there are more

+          significant digits than can be represented in a uint32_t variable, the

+          output is unspecified.

+

+    @param pachNum  A pointer to a constant array of hex characters.

+    @param pulNum   A pointer to the location in which to store the uint32_t

+                    result.  Upon return, this value will be modified ONLY if

+                    the function succeeds and the returned pointer is valid (not

+                    NULL).

+

+    @return A pointer to the byte following the converted number or NULL to

+            indicate failure.

+*/

+const char *RedHtoUL(

+    const char *pszNum,

+    uint32_t   *pulNum)

+{

+    uint64_t    ullValue;

+    const char *pszReturn;

+

+    pszReturn = RedHtoULL(pszNum, &ullValue);

+    if(pszReturn != NULL)

+    {

+        if(ullValue < UINT32_MAX)

+        {

+            *pulNum = (uint32_t)ullValue;

+        }

+        else

+        {

+            pszReturn = NULL;

+        }

+    }

+

+    return pszReturn;

+}

+

+

+/** @brief Convert a hexadecimal ASCII number into a D_UINT64 value.

+

+    The function processes all hex digits up to a NUL-terminator, or to the

+    first non-hex character.  Only hexadecimal digits are processed, so leading

+    white space, or a leading "0x" prefix are not allowed.

+

+    If pachNum points to an empty string (points to a NUL), this function will

+    return NULL, and the value at *pulNum will not be modified.

+

+    @note This function does not check for overflow.  If there are more

+          significant digits than can be represented in a uint64_t variable, the

+          output is unspecified.

+

+    @param pszNum   A pointer to a constant array of hex characters.

+    @param pullNum  A pointer to the location in which to store the uint64_t

+                    result.  Upon return, this value will be modified ONLY if

+                    the function succeeds and the returned pointer is valid (not

+                    NULL).

+

+    @return A pointer to the byte following the converted number, or NULL to

+            indicate failure.

+*/

+const char *RedHtoULL(

+    const char *pszNum,

+    uint64_t   *pullNum)

+{

+    uint64_t    ullValue = 0U;

+    const char *pszReturn = NULL;

+    uint32_t    ulIdx = 0U;

+

+    REDASSERT(pszNum != NULL);

+    REDASSERT(pullNum != NULL);

+

+    while(pszNum[ulIdx] != '\0')

+    {

+        char cDigit = pszNum[ulIdx];

+

+        if(ISDIGIT(cDigit))

+        {

+            cDigit -= '0';

+        }

+        else if(ISHEXDIGITU(cDigit))

+        {

+            cDigit -= ('A' - 10);

+        }

+        else if(ISHEXDIGITL(cDigit))

+        {

+            cDigit -= ('a' - 10);

+        }

+        else

+        {

+            break;

+        }

+

+        REDASSERT((ullValue & UINT64_SUFFIX(0xF000000000000000)) == 0U);

+

+        ullValue <<= 4U;

+        ullValue += cDigit;

+

+        ulIdx++;

+        pszReturn = &pszNum[ulIdx];

+    }

+

+    /*  Modify the number returned only if we found one or more valid hex

+        digits.

+    */

+    if(pszReturn != NULL)

+    {

+        *pullNum = ullValue;

+    }

+

+    return pszReturn;

+}

+

+

+/** @brief Convert the ASCII number to a uint32_t  value.

+

+    The number may be hex or decimal.  Hex numbers must be prefixed by '0x', and

+    they may be upper or lower case.  The conversion process will stop with the

+    first non hex or decimal digit.

+

+    If the number is negative (the first character is a '-' sign), the value

+    will be range checked and returned as the equivalent unsigned value.

+

+    @note   This function will NOT fail for numbers which exceed the size of a

+            uint32_t value.

+

+    @param pszNum   A pointer to the ASCII number to convert

+    @param pulNum   A pointer to the uint32_t location to store the result.

+                    This value will be modified on return only if the function

+                    succeeds and the returned pointer is valid (not NULL).

+

+    @return A pointer to the byte following the converted number, or NULL to

+            indicate failure.

+*/

+const char *RedNtoUL(

+    const char *pszNum,

+    uint32_t   *pulNum)

+{

+    bool        fNegative = false;

+    uint32_t    ulIdx = 0U;

+    const char *pszReturn;

+

+    REDASSERT(pszNum != NULL);

+    REDASSERT(pulNum != NULL);

+

+    if(pszNum[ulIdx] == '-')

+    {

+        fNegative = true;

+        ulIdx++;

+    }

+

+    /*  Hex numbers must be prefixed with '0x'.

+    */

+    if((pszNum[ulIdx] == '0') && ((pszNum[ulIdx + 1U] == 'x') || (pszNum[ulIdx + 1U] == 'X')))

+    {

+        ulIdx += 2U;

+

+        if(ISDIGIT(pszNum[ulIdx]) || ISHEXDIGIT(pszNum[ulIdx]))

+        {

+            pszReturn = RedHtoUL(&pszNum[ulIdx], pulNum);

+        }

+        else

+        {

+            pszReturn = NULL;

+        }

+    }

+    else if(ISDIGIT(pszNum[ulIdx]))

+    {

+        uint32_t ulTemp;

+

+        ulTemp = RedAtoI(&pszNum[ulIdx]);

+

+        while(ISDIGIT(pszNum[ulIdx]))

+        {

+            ulIdx++;

+        }

+

+        if(fNegative)

+        {

+            /*  Fail if the number is out of range.

+            */

+            if(ulTemp > INT32_MAX)

+            {

+                pszReturn = NULL;

+            }

+            else

+            {

+                *pulNum = -((int32_t)ulTemp);

+                pszReturn = &pszNum[ulIdx];

+            }

+        }

+        else

+        {

+            *pulNum = ulTemp;

+            pszReturn = &pszNum[ulIdx];

+        }

+    }

+    else

+    {

+        /*  Return an error if there is not at least one hex or decimal digit.

+        */

+        pszReturn = NULL;

+    }

+

+    return pszReturn;

+}

+

+

+/** @brief Convert the ASCII number pointed to by pachNum to a uint64_t value.

+

+    The number may be hex or decimal.  Hex numbers must be prefixed by '0x', and

+    they may be upper or lower case.  The conversion process will stop with the

+    first non hex or decimal digit.

+

+    If the number is negative (the first character is a '-' sign), the value

+    will be range checked and returned as the equivalent unsigned value.

+

+    @param pszNum   A pointer to the ASCII number to convert.

+    @param pullNum  A pointer to the uint64_t location to store the result.

+                    This value will be modified on return only if the function

+                    succeeds and the returned pointer is valid (not NULL).

+

+    @return A pointer to the byte following the converted number, or NULL to

+            indicate failure.

+*/

+const char *RedNtoULL(

+    const char *pszNum,

+    uint64_t   *pullNum)

+{

+    bool        fNegative = false;

+    uint32_t    ulIdx = 0U;

+    const char *pszReturn;

+

+    REDASSERT(pszNum != NULL);

+    REDASSERT(pullNum != NULL);

+

+    if(pszNum[ulIdx] == '-')

+    {

+        fNegative = true;

+        ulIdx++;

+    }

+

+    /*  Hex numbers must be prefixed with '0x'.

+    */

+    if((pszNum[ulIdx] == '0') && ((pszNum[ulIdx + 1U] == 'x') || (pszNum[ulIdx + 1U] == 'X')))

+    {

+        ulIdx += 2U;

+

+        if(ISDIGIT(pszNum[ulIdx]) || ISHEXDIGIT(pszNum[ulIdx]))

+        {

+            pszReturn = RedHtoULL(&pszNum[ulIdx], pullNum);

+        }

+        else

+        {

+            pszReturn = NULL;

+        }

+    }

+    else if(ISDIGIT(pszNum[ulIdx]))

+    {

+        uint64_t ullTemp = 0U;

+

+        while(ISDIGIT(pszNum[ulIdx]))

+        {

+            ullTemp *= 10U;

+            ullTemp += pszNum[ulIdx] - '0';

+            ulIdx++;

+        }

+

+        if(fNegative)

+        {

+            /*  Fail if the number is out of range.

+            */

+            if(ullTemp > INT64_MAX)

+            {

+                pszReturn = NULL;

+            }

+            else

+            {

+                *pullNum = (uint64_t)(-((int64_t)ullTemp));

+                pszReturn = &pszNum[ulIdx];

+            }

+        }

+        else

+        {

+            *pullNum = ullTemp;

+            pszReturn = &pszNum[ulIdx];

+        }

+    }

+    else

+    {

+        /*  Return an error if there is not at least one hex or decimal digit.

+        */

+        pszReturn = NULL;

+    }

+

+    return pszReturn;

+}

+

+

+/** @brief Convert an ASCII hex or decimal number, which may may have a "B",

+           "KB", or "MB" suffix (case insensitive), to a binary value.

+

+    Hex numbers must be prefixed with "0x".

+

+    @note If there is no postfix, KB is assumed!

+

+    May fail due to bad formatting or overflow.

+

+    @param pszNum       A pointer to the ASCII number to convert.

+    @param pulResult    A pointer to a uint32_t in which to place the result.

+

+    @return A pointer to the byte following the string, or NULL to indicate an

+            error.  In the event of an error, *pulResult will not be modified.

+*/

+const char *RedSizeToUL(

+    const char *pszNum,

+    uint32_t   *pulResult)

+{

+    uint32_t    ulResult;

+    const char *pszSuffix;

+    const char *pszReturn;

+    uint32_t    ulIdx = 0U;

+

+    REDASSERT(pszNum != NULL);

+    REDASSERT(pulResult != NULL);

+

+    /*  Do the basic hex/decimal conversion

+    */

+    pszSuffix = RedNtoUL(pszNum, &ulResult);

+    if(pszSuffix != NULL)

+    {

+        if((pszSuffix[ulIdx] == 'B') || (pszSuffix[ulIdx] == 'b'))

+        {

+            ulIdx++;

+            pszReturn = &pszSuffix[ulIdx];

+        }

+        else if(    ((pszSuffix[ulIdx] == 'M') || (pszSuffix[ulIdx] == 'm'))

+                 && ((pszSuffix[ulIdx + 1U] == 'B') || (pszSuffix[ulIdx + 1U] == 'b')))

+        {

+            ulIdx += 2U;

+

+            if(ulResult > (UINT32_MAX / (1024U * 1024U)))

+            {

+                pszReturn = NULL;

+            }

+            else

+            {

+                ulResult *= 1024U * 1024U;

+                pszReturn = &pszSuffix[ulIdx];

+            }

+        }

+        else

+        {

+            /*  The number is either postfixed with "KB" or something

+                else (we don't care), but we must increment the pointer

+                if it is something recognize.

+            */

+            if(    ((pszSuffix[ulIdx] == 'K') || (pszSuffix[ulIdx] == 'k'))

+                && ((pszSuffix[ulIdx + 1U] == 'B') || (pszSuffix[ulIdx + 1U] == 'b')))

+            {

+                ulIdx += 2U;

+            }

+

+            /*  "B" or "MB" were not specified, so it must be "KB"

+            */

+            if(ulResult > (UINT32_MAX / 1024U))

+            {

+                pszReturn = NULL;

+            }

+            else

+            {

+                ulResult *= 1024UL;

+                pszReturn = &pszSuffix[ulIdx];

+            }

+        }

+

+        if(pszReturn != NULL)

+        {

+            *pulResult = ulResult;

+        }

+    }

+    else

+    {

+        pszReturn = NULL;

+    }

+

+    return pszReturn;

+}

+

diff --git a/FreeRTOS-Plus/Source/Reliance-Edge/tests/util/math.c b/FreeRTOS-Plus/Source/Reliance-Edge/tests/util/math.c
new file mode 100644
index 0000000..e8f5201
--- /dev/null
+++ b/FreeRTOS-Plus/Source/Reliance-Edge/tests/util/math.c
@@ -0,0 +1,641 @@
+/*             ----> DO NOT REMOVE THE FOLLOWING NOTICE <----

+

+                   Copyright (c) 2014-2015 Datalight, Inc.

+                       All Rights Reserved Worldwide.

+

+    This program is free software; you can redistribute it and/or modify

+    it under the terms of the GNU General Public License as published by

+    the Free Software Foundation; use version 2 of the License.

+

+    This program is distributed in the hope that it will be useful,

+    but "AS-IS," WITHOUT ANY WARRANTY; without even the implied warranty

+    of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the

+    GNU General Public License for more details.

+

+    You should have received a copy of the GNU General Public License along

+    with this program; if not, write to the Free Software Foundation, Inc.,

+    51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.

+*/

+/*  Businesses and individuals that for commercial or other reasons cannot

+    comply with the terms of the GPLv2 license may obtain a commercial license

+    before incorporating Reliance Edge into proprietary software for

+    distribution in any form.  Visit http://www.datalight.com/reliance-edge for

+    more information.

+*/

+/** @file

+    @brief Implements routines for certain 64-bit math operations and simulated

+           floating point.

+

+    RedUint64DivMod32() and RedUint64DivMod64() are derived from code at

+    http://www.hackersdelight.org.  This web site states explicitly that "You

+    are free to use, copy, and distribute any of the code on this web site,

+    whether modified by you or not.  You need not give attribution."

+*/

+#include <redfs.h>

+#include <redtestutils.h>

+

+

+static uint32_t nlz64(uint64_t ullValue);

+

+

+/** @brief Return a ratio value formatted as a floating point string accurate to

+           the specified number of decimal places.

+

+    The  function exists to provide floating point style output without using

+    any actual floating point types.

+

+    This function may scale the numbers down to avoid overflow at the high end.

+    Likewise, potential divide-by-zero errors are internally avoided.  Here are

+    some examples:

+

+    Dividend | Divisor | DecPlaces | Result

+    -------- | ------- | --------- | ------

+    12133    | 28545   | 2         | "0.42"

+    1539     | 506     | 2         | "3.04"

+

+    To get a number formatted as a percentage, take the take the portion of the

+    total (normally the smaller part), multiply it by 100, and pass it to this

+    function as the Dividend, pass the "total" value to this function as the

+    Divisor, and specify the desired number of decimal places.

+

+    For example, if you have a disk format overhead value of N blocks out of a

+    total of Y blocks on the disk, and you want to display the format overhead

+    as a percentage, you would use a function call

+    similar to:

+

+    ~~~{.c}

+    RedRatio(szBuffer, sizeof(szBuffer), N*100U, Y, 2U);

+    ~~~

+

+    If N=145, Y=4096, and decimal places is 2, the resulting output would be

+    "3.54".

+

+    The string returned will always be null-terminated, even if it means

+    stomping on the least significant decimal digit.

+

+    If either the dividend or divisor values are zero, the string "0.0" will be

+    returned, with the prescribed number of decimal places.

+

+    @note This function has "reasonable" limits which meet the needs of the

+          various supplemental utilities which use this function.  Extremely

+          large ratios, or using many decimal places may not function as

+          desired.

+

+    Parameters:

+    @param pBuffer      A pointer to the buffer in which to store the null

+                        terminated results.

+    @param ulBufferLen  The length of the output buffer.

+    @param ullDividend  The "total" value to divide.

+    @param ullDivisor   The portion of ullDividend for which to calculate the

+                        ratio (may be greater than ulDividend).

+    @param ulDecPlaces  The number of decimal places to use, from 0 to 9.

+

+    @return @p pBuffer.

+*/

+char *RedRatio(

+    char       *pBuffer,

+    uint32_t    ulBufferLen,

+    uint64_t    ullDividend,

+    uint64_t    ullDivisor,

+    uint32_t    ulDecPlaces)

+{

+    REDASSERT(pBuffer != NULL);

+    REDASSERT(ulBufferLen > 0U);

+    REDASSERT(ulDecPlaces <= 9U);   /* arbitrary */

+

+    if((ullDivisor > 0U) && (ullDividend > 0U))

+    {

+        uint32_t    ii;

+        uint32_t    ulFactor = 1U;

+        uint64_t    ullDecimal;

+        uint64_t    ullTemp;

+

+        for(ii = 1U; ii <= ulDecPlaces; ii++)

+        {

+            ulFactor *= 10U;

+        }

+

+        ullDecimal = RedMulDiv64(ullDividend, ulFactor, ullDivisor);

+

+        /*  Shouldn't really be calling this function in a situation where we

+            can overflow at this point...

+        */

+        REDASSERT(ullDecimal != UINT64_MAX);

+

+        if(ullDivisor <= ullDividend)

+        {

+            uint32_t ulDecimal;

+

+            (void)RedUint64DivMod32(ullDecimal, ulFactor, &ulDecimal);

+            ullDecimal = ulDecimal;

+        }

+

+        ullTemp = RedUint64DivMod64(ullDividend, ullDivisor, NULL);

+

+        if(ulDecPlaces > 0U)

+        {

+            RedSNPrintf(pBuffer, ulBufferLen, "%llu.%0*llu", (unsigned long long)ullTemp,

+                (unsigned)ulDecPlaces, (unsigned long long)ullDecimal);

+        }

+        else

+        {

+            RedSNPrintf(pBuffer, ulBufferLen, "%llu", (unsigned long long)ullTemp);

+        }

+    }

+    else

+    {

+        /*  If either the dividend or divisor is zero, then just output a "0.0"

+            string with the prescribed number of decimal places.

+        */

+        if(ulDecPlaces > 0U)

+        {

+            RedSNPrintf(pBuffer, ulBufferLen, "0.%0*u", (unsigned)ulDecPlaces, 0U);

+        }

+        else

+        {

+            RedStrNCpy(pBuffer, "0", ulBufferLen);

+        }

+    }

+

+    /*  Ensure the returned buffer is always null-terminated

+    */

+    pBuffer[ulBufferLen - 1U] = '\0';

+

+    return pBuffer;

+}

+

+

+/** @brief Multiply 64-bit and 32-bit numbers, and divide by a 64-bit number,

+           returning a 64-bit result.

+

+    @note This function may return an approximate value if multiplying

+          @p ullBase and @p ulMultplier results in a number larger than 64-bits

+          _and_ this cannot be avoided by scaling.

+

+    @param ullBase      The base 64-bit number number.

+    @param ulMultiplier The 32-bit number by which to multiply.

+    @param ullDivisor   The 64-bit number by which to divide.

+

+    @return The 64-bit unsigned integer result.  Always returns zero if either

+            @p ullBase or @p ulMultiplier are zero (regardless what

+            @p ullDivisor is).  Returns UINT64_MAX if an overflow condition

+            occurred, or if @p ullDivisor is zero.

+*/

+uint64_t RedMulDiv64(

+    uint64_t ullBase,

+    uint32_t ulMultiplier,

+    uint64_t ullDivisor)

+{

+    uint64_t ullTemp;

+

+    /*  Result would always be zero if either of these are zero.  Specifically

+        test this case before looking for a zero divisor.

+    */

+    if((ullBase == 0U) || (ulMultiplier == 0U))

+    {

+        return 0U;

+    }

+

+    if(ullDivisor == 0U)

+    {

+        return UINT64_MAX;

+    }

+

+    /*  Since we don't have the ability (yet) to use 128-bit numbers, we jump

+        through the following hoops (in order) to try to determine the proper

+        results without losing precision:

+

+        1) Shift the divisor and one of the multiplicands as many times as is

+           necessary to reduce the scale -- only if it can be done without

+           losing precision.

+        2) Divide one of the multiplicands by the divisor first, but only if it

+           divides evenly, preserving precision.

+        3) Same as #2, but try it for the other multiplicand.

+        4) Last ditch, divide the larger multiplicand by the divisor first, then

+           do the multiply.  This <WILL> lose precision.

+

+        These solutions are identified as CODE-PATHs #1-4 which are used to

+        identify the matching tests in dltmain.c.

+

+        Note that execution might partially include CODE-PATH #1 up until

+        shifting can no longer be done without losing precision.  In that case,

+        one of the three remaining options will be used.

+    */

+

+    ullTemp = RedUint64DivMod32(UINT64_MAX, ulMultiplier, NULL);

+    while(ullBase > ullTemp)

+    {

+        uint64_t ullMod;

+        uint64_t ullBaseTemp;

+        uint64_t ullWideMultiplier;

+

+        /*  CODE-PATH #1

+        */

+        /*  So long as ulDivisor, and at least one of the other numbers, are

+            evenly divisible by 2, we can scale the numbers so the result does

+            not overflow the intermediate 64-bit value.

+        */

+        if((ullDivisor & 1U) == 0U)

+        {

+            if((ullBase & 1U) == 0U)

+            {

+                /*  CODE-PATH #1a

+                */

+                ullDivisor >>= 1U;

+                ullBase >>= 1U;

+                continue;

+            }

+

+            if(((ulMultiplier & 1U) == 0U) && ((ullTemp & UINT64_SUFFIX(0x8000000000000000)) == 0U))

+            {

+                /*  CODE-PATH #1b

+                */

+                ullDivisor >>= 1U;

+                ulMultiplier >>= 1U;

+                ullTemp <<= 1U;

+                continue;

+            }

+        }

+

+        /*  If we get to this point, the above method (#1) cannot be used

+            because not enough of the numbers are even long enough to scale the

+            operands down.  We'll see if either multiplicand is evenly divisble

+            by ulDivisor, and if so, do the divide first, then the multiply.

+            (Note that once we get to this point, we will never exercise the

+            while{} loop anymore.)

+        */

+

+        /*  CODE-PATH #2

+        */

+        ullBaseTemp = RedUint64DivMod64(ullBase, ullDivisor, &ullMod);

+        if(ullMod == 0U)

+        {

+            /*  Evenly divides, so check that we won't overflow, and finish up.

+            */

+            ullBase = ullBaseTemp;

+            if(ullBase > ullTemp)

+            {

+                return UINT64_MAX;

+            }

+            else

+            {

+                /*  We've validated that this will not overflow.

+                */

+                ullBase *= ulMultiplier;

+                return ullBase;

+            }

+        }

+

+        /*  CODE-PATH #3

+        */

+        ullWideMultiplier = RedUint64DivMod64(ulMultiplier, ullDivisor, &ullMod);

+        if(ullMod == 0U)

+        {

+            /*  Evenly divides, so check that we won't overflow, and finish up.

+            */

+

+            /*  Must recalculate ullTemp relative to ullBase

+            */

+            ullTemp = RedUint64DivMod64(UINT64_MAX, ullBase, NULL);

+            if(ullWideMultiplier > ullTemp)

+            {

+                return UINT64_MAX;

+            }

+            else

+            {

+                uint32_t ulNarrowMultiplier = (uint32_t)ullWideMultiplier;

+

+                /*  We've validated that this will not overflow.

+                */

+                ullBase *= ulNarrowMultiplier;

+                return ullBase;

+            }

+        }

+

+        /*  CODE-PATH #4

+

+            Neither of the multipliers is evenly divisible by the divisor, so

+            just punt and divide the larger number first, then do the final

+            multiply.

+

+            All the other attempts above would preserve precision -- this is the

+            only case where precision may be lost.

+        */

+

+        /*  If necessary reverse the ullBase and ulMultiplier operands so that

+            ullBase contains the larger of the two values.

+        */

+        if(ullBase < ulMultiplier)

+        {

+            uint32_t ulTemp = ulMultiplier;

+

+            ulMultiplier = (uint32_t)ullBase;

+            ullBase = ulTemp;

+        }

+

+        ullBase = RedUint64DivMod64(ullBase, ullDivisor, NULL);

+        ullTemp = RedUint64DivMod32(UINT64_MAX, ulMultiplier, NULL);

+        if(ullBase > ullTemp)

+        {

+            return UINT64_MAX;

+        }

+        else

+        {

+            ullBase *= ulMultiplier;

+            return ullBase;

+        }

+    }

+

+    /*  We only get to this point if either there was never any chance of

+        overflow, or if the pure shifting mechanism succeeded in reducing

+        the scale so overflow is not a problem.

+    */

+

+    ullBase *= ulMultiplier;

+    ullBase = RedUint64DivMod64(ullBase, ullDivisor, NULL);

+

+    return ullBase;

+}

+

+

+/** @brief Divide a 64-bit value by a 32-bit value, returning the quotient and

+           the remainder.

+

+    Essentially this function does the following:

+

+    ~~~{.c}

+    if(pulRemainder != NULL)

+    {

+        *pulRemainder = (uint32_t)(ullDividend % ulDivisor);

+    }

+    return ullDividend / ulDivisor;

+    ~~~

+

+    However, it does so without ever actually dividing/modulating a 64-bit

+    value, since such operations are not allowed in all environments.

+

+    @param ullDividend  The value to divide.

+    @param ulDivisor    The value to divide by.

+    @param pulRemander  Populated with the remainder; may be NULL.

+

+    @return The quotient (result of the division).

+*/

+uint64_t RedUint64DivMod32(

+    uint64_t    ullDividend,

+    uint32_t    ulDivisor,

+    uint32_t   *pulRemainder)

+{

+    uint64_t    ullQuotient;

+    uint32_t    ulResultRemainder;

+

+    /*  Check for divide by zero.

+    */

+    if(ulDivisor == 0U)

+    {

+        REDERROR();

+

+        /*  Nonsense value if no asserts.

+        */

+        ullQuotient = UINT64_SUFFIX(0xFFFFFFFFFFFFFBAD);

+        ulResultRemainder = 0xFFFFFBADU;

+    }

+    else if(ullDividend <= UINT32_MAX)

+    {

+        uint32_t ulDividend = (uint32_t)ullDividend;

+

+        ullQuotient = ulDividend / ulDivisor;

+        ulResultRemainder = ulDividend % ulDivisor;

+    }

+    else

+    {

+        uint32_t    ulResultHi;

+        uint32_t    ulResultLo;

+        uint32_t    ulRemainder;

+        uint8_t     bIndex;

+        uint32_t    ulThisDivision;

+        uint32_t    ulMask;

+        uint8_t     ucNextValue;

+        uint32_t    ulInterimHi, ulInterimLo;

+        uint32_t    ulLowDword = (uint32_t)ullDividend;

+        uint32_t    ulHighDword = (uint32_t)(ullDividend >> 32U);

+

+        /*  Compute the high part and get the remainder

+        */

+        ulResultHi = ulHighDword / ulDivisor;

+        ulResultLo = 0U;

+        ulRemainder = ulHighDword % ulDivisor;

+

+        /*  Compute the low part

+        */

+        ulMask = 0xFF000000U;

+        for(bIndex = 0U; bIndex < sizeof(uint32_t); bIndex++)

+        {

+            ucNextValue = (uint8_t)((ulLowDword & ulMask) >> ((sizeof(uint32_t) - 1U - bIndex) * 8U));

+            ulInterimHi = ulRemainder >> 24U;

+            ulInterimLo = (ulRemainder << 8U) | ucNextValue;

+            ulThisDivision = 0U;

+            while(ulInterimHi != 0U)

+            {

+                uint64_t ullInterim = ((uint64_t)ulInterimHi << 32U) + ulInterimLo;

+

+                ullInterim -= ulDivisor;

+                ulThisDivision++;

+

+                ulInterimHi = (uint32_t)(ullInterim >> 32U);

+                ulInterimLo = (uint32_t)ullInterim;

+            }

+            ulThisDivision += ulInterimLo / ulDivisor;

+            ulRemainder = ulInterimLo % ulDivisor;

+            ulResultLo <<= 8U;

+            ulResultLo += ulThisDivision;

+            ulMask >>= 8U;

+        }

+

+        ullQuotient = ((uint64_t)ulResultHi << 32U) + ulResultLo;

+        ulResultRemainder = (uint32_t)(ullDividend - (ullQuotient * ulDivisor));

+    }

+

+    if(pulRemainder != NULL)

+    {

+        *pulRemainder = ulResultRemainder;

+    }

+

+    return ullQuotient;

+}

+

+

+/** @brief Divide a 64-bit value by a 64-bit value, returning the quotient and

+           the remainder.

+

+    Essentially this function does the following:

+

+    ~~~{.c}

+    if(pullRemainder != NULL)

+    {

+        *pullRemainder = ullDividend % ullDivisor;

+    }

+    return ullDividend / ullDivisor;

+    ~~~

+

+    However, it does so without ever actually dividing/modulating a 64-bit

+    value, since such operations are not allowed in all environments.

+

+    @param ullDividend  The value to divide.

+    @param ullDivisor   The value to divide by.

+    @param pullRemander Populated with the remainder; may be NULL.

+

+    @return The quotient (result of the division).

+*/

+uint64_t RedUint64DivMod64(

+    uint64_t    ullDividend,

+    uint64_t    ullDivisor,

+    uint64_t   *pullRemainder)

+{

+    /*  The variables u0, u1, etc. take on only 32-bit values, but they are

+        declared uint64_t to avoid some compiler warning messages and to avoid

+        some unnecessary EXTRs that the compiler would put in, to convert

+        uint64_ts to ints.

+    */

+    uint64_t    u0;

+    uint64_t    u1;

+    uint64_t    q0;

+    uint64_t    q1;

+    uint64_t    ullQuotient;

+

+    /*  First the procedure takes care of the case in which the divisor is a

+        32-bit quantity.  There are two subcases: (1) If the left half of the

+        dividend is less than the divisor, one execution of RedUint64DivMod32()

+        is all that is required (overflow is not possible). (2) Otherwise it

+        does two divisions, using the grade school method.

+    */

+

+    if((ullDivisor >> 32U) == 0U)

+    {

+        if((ullDividend >> 32U) < ullDivisor)

+        {

+            /*  If ullDividend/ullDivisor cannot overflow, just do one division.

+            */

+            ullQuotient = RedUint64DivMod32(ullDividend, (uint32_t)ullDivisor, NULL);

+        }

+        else

+        {

+            uint32_t k;

+

+            /*  If ullDividend/ullDivisor would overflow:

+            */

+

+            /*  Break ullDividend up into two halves.

+            */

+            u1 = ullDividend >> 32U;

+            u0 = ullDividend & 0xFFFFFFFFU;

+

+            /*  First quotient digit and first remainder.

+            */

+            q1 = RedUint64DivMod32(u1, (uint32_t)ullDivisor, &k);

+

+            /*  2nd quot. digit.

+            */

+            q0 = RedUint64DivMod32(((uint64_t)k << 32U) + u0, (uint32_t)ullDivisor, NULL);

+

+            ullQuotient = (q1 << 32U) + q0;

+        }

+    }

+    else

+    {

+        uint64_t n;

+        uint64_t v1;

+

+        n = nlz64(ullDivisor);          /* 0 <= n <= 31. */

+        v1 = (ullDivisor << n) >> 32U;  /* Normalize the divisor so its MSB is 1. */

+        u1 = ullDividend >> 1U;         /* To ensure no overflow. */

+

+        /*  Get quotient from divide unsigned insn.

+        */

+        q1 = RedUint64DivMod32(u1, (uint32_t)v1, NULL);

+

+        q0 = (q1 << n) >> 31U;  /* Undo normalization and division of ullDividend by 2. */

+

+        /*  Make q0 correct or too small by 1.

+        */

+        if(q0 != 0U)

+        {

+            q0--;

+        }

+

+        if((ullDividend - (q0 * ullDivisor)) >= ullDivisor)

+        {

+            q0++;   /* Now q0 is correct. */

+        }

+

+        ullQuotient = q0;

+    }

+

+    if(pullRemainder != NULL)

+    {

+        *pullRemainder = ullDividend - (ullQuotient * ullDivisor);

+    }

+

+    return ullQuotient;

+}

+

+

+/** @brief Compute the number of leading zeroes in a 64-bit value.

+

+    @param ullValue The value for which to compute the NLZ.

+

+    @return The number of leading zeroes in @p ullValue.

+*/

+static uint32_t nlz64(

+    uint64_t    ullValue)

+{

+    uint32_t    n;

+

+    if(ullValue == 0U)

+    {

+        n = 64U;

+    }

+    else

+    {

+        uint64_t x = ullValue;

+

+        n = 0U;

+

+        if(x <= UINT64_SUFFIX(0x00000000FFFFFFFF))

+        {

+            n += 32U;

+            x <<= 32U;

+        }

+

+        if(x <= UINT64_SUFFIX(0x0000FFFFFFFFFFFF))

+        {

+            n += 16U;

+            x <<= 16U;

+        }

+

+        if(x <= UINT64_SUFFIX(0x00FFFFFFFFFFFFFF))

+        {

+            n += 8U;

+            x <<= 8U;

+        }

+

+        if(x <= UINT64_SUFFIX(0x0FFFFFFFFFFFFFFF))

+        {

+            n += 4U;

+            x <<= 4U;

+        }

+

+        if(x <= UINT64_SUFFIX(0x3FFFFFFFFFFFFFFF))

+        {

+            n += 2U;

+            x <<= 2U;

+        }

+

+        if(x <= UINT64_SUFFIX(0x7FFFFFFFFFFFFFFF))

+        {

+            n += 1;

+        }

+    }

+

+    return n;

+}

+

diff --git a/FreeRTOS-Plus/Source/Reliance-Edge/tests/util/printf.c b/FreeRTOS-Plus/Source/Reliance-Edge/tests/util/printf.c
new file mode 100644
index 0000000..3ae98a4
--- /dev/null
+++ b/FreeRTOS-Plus/Source/Reliance-Edge/tests/util/printf.c
@@ -0,0 +1,1264 @@
+/*             ----> DO NOT REMOVE THE FOLLOWING NOTICE <----

+

+                   Copyright (c) 2014-2015 Datalight, Inc.

+                       All Rights Reserved Worldwide.

+

+    This program is free software; you can redistribute it and/or modify

+    it under the terms of the GNU General Public License as published by

+    the Free Software Foundation; use version 2 of the License.

+

+    This program is distributed in the hope that it will be useful,

+    but "AS-IS," WITHOUT ANY WARRANTY; without even the implied warranty

+    of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the

+    GNU General Public License for more details.

+

+    You should have received a copy of the GNU General Public License along

+    with this program; if not, write to the Free Software Foundation, Inc.,

+    51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.

+*/

+/*  Businesses and individuals that for commercial or other reasons cannot

+    comply with the terms of the GPLv2 license may obtain a commercial license

+    before incorporating Reliance Edge into proprietary software for

+    distribution in any form.  Visit http://www.datalight.com/reliance-edge for

+    more information.

+*/

+/** @file

+    @brief Implements functions for printing.

+

+    These functions are intended to be used in portable test code, which cannot

+    assume the standard I/O functions will be available.  Similar to their ANSI

+    C counterparts, these functions allow formatting text strings and (if the

+    configuration allows it) outputing formatted text.  The latter ability

+    relies on the RedOsOutputString() OS service function.

+

+    Do *not* use these functions in code which can safely assume the standard

+    I/O functions are available (e.g., in host tools code).

+

+    Do *not* use these functions from within the file system driver.  These

+    functions use variable arguments and thus are not MISRA-C:2012 compliant.

+*/

+#include <redfs.h>

+#include <redtestutils.h>

+#include <limits.h>

+#include <stdarg.h>

+

+

+/** @brief Maximum number of bytes of output supported by RedPrintf().

+

+    Typically only Datalight code uses these functions, and that could should be

+    written to respect this limit, so it should not normally be necessary to

+    adjust this value.

+*/

+#define OUTPUT_BUFFER_SIZE 256U

+

+

+typedef enum

+{

+    PRFMT_UNKNOWN = 0,

+    PRFMT_CHAR,

+    PRFMT_ANSISTRING,

+    PRFMT_SIGNED8BIT,

+    PRFMT_UNSIGNED8BIT,

+    PRFMT_SIGNED16BIT,

+    PRFMT_UNSIGNED16BIT,

+    PRFMT_SIGNED32BIT,

+    PRFMT_UNSIGNED32BIT,

+    PRFMT_SIGNED64BIT,

+    PRFMT_UNSIGNED64BIT,

+    PRFMT_HEX8BIT,

+    PRFMT_HEX16BIT,

+    PRFMT_HEX32BIT,

+    PRFMT_HEX64BIT,

+    PRFMT_POINTER,

+    PRFMT_DOUBLEPERCENT

+} PRINTTYPE;

+

+typedef struct

+{

+    PRINTTYPE       type;               /* The PRFMT_* type found */

+    uint32_t        ulSpecifierIdx;     /* Returns a pointer to the % sign */

+    uint32_t        ulFillLen;

+    char            cFillChar;

+    bool            fLeftJustified;

+    bool            fHasIllegalType;    /* TRUE if an illegal sequence was skipped over */

+    bool            fHasVarWidth;

+} PRINTFORMAT;

+

+

+/*  Our output handlers are written for standard fixed width data types.  Map

+    the standard ANSI C data types onto our handlers.  Currently this code has

+    the following requirements:

+

+    1) shorts must be either 16 or 32 bits

+    2) ints must be either 16 or 32 bits

+    3) longs must be between 32 or 64 bits

+    4) long longs must be 64 bits

+*/

+#if (USHRT_MAX == 0xFFFFU)

+  #define MAPSHORT          PRFMT_SIGNED16BIT

+  #define MAPUSHORT         PRFMT_UNSIGNED16BIT

+  #define MAPHEXUSHORT      PRFMT_HEX16BIT

+#elif (USHRT_MAX == 0xFFFFFFFFU)

+  #define MAPSHORT          PRFMT_SIGNED32BIT

+  #define MAPUSHORT         PRFMT_UNSIGNED32BIT

+  #define MAPHEXUSHORT      PRFMT_HEX32BIT

+#else

+  #error "The 'short' data type does not have a 16 or 32-bit width"

+#endif

+

+#if (UINT_MAX == 0xFFFFU)

+  #define MAPINT            PRFMT_SIGNED16BIT

+  #define MAPUINT           PRFMT_UNSIGNED16BIT

+  #define MAPHEXUINT        PRFMT_HEX16BIT

+#elif (UINT_MAX == 0xFFFFFFFFU)

+  #define MAPINT            PRFMT_SIGNED32BIT

+  #define MAPUINT           PRFMT_UNSIGNED32BIT

+  #define MAPHEXUINT        PRFMT_HEX32BIT

+#else

+  #error "The 'int' data type does not have a 16 or 32-bit width"

+#endif

+

+#if (ULONG_MAX == 0xFFFFFFFFU)

+  #define MAPLONG           PRFMT_SIGNED32BIT

+  #define MAPULONG          PRFMT_UNSIGNED32BIT

+  #define MAPHEXULONG       PRFMT_HEX32BIT

+#elif (ULONG_MAX <= UINT64_SUFFIX(0xFFFFFFFFFFFFFFFF))

+  /*  We've run into unusual environments where "longs" are 40-bits wide.

+      In this event, map them to 64-bit types so no data is lost.

+  */

+  #define MAPLONG         PRFMT_SIGNED64BIT

+  #define MAPULONG        PRFMT_UNSIGNED64BIT

+  #define MAPHEXULONG     PRFMT_HEX64BIT

+#else

+  #error "The 'long' data type is not between 32 and 64 bits wide"

+#endif

+

+#if defined(ULLONG_MAX) && (ULLONG_MAX != UINT64_SUFFIX(0xFFFFFFFFFFFFFFFF))

+  #error "The 'long long' data type is not 64 bits wide"

+#else

+  #define MAPLONGLONG       PRFMT_SIGNED64BIT

+  #define MAPULONGLONG      PRFMT_UNSIGNED64BIT

+  #define MAPHEXULONGLONG   PRFMT_HEX64BIT

+#endif

+

+

+static uint32_t ProcessFormatSegment(char *pcBuffer, uint32_t ulBufferLen, const char *pszFormat, PRINTFORMAT *pFormat, uint32_t *pulSpecifierLen);

+static uint32_t ParseFormatSpecifier(char const *pszFomat, PRINTFORMAT *pFormatType);

+static PRINTTYPE ParseFormatType(const char *pszFormat, uint32_t *pulTypeLen);

+static uint32_t LtoA(char *pcBuffer, uint32_t ulBufferLen, int32_t lNum, uint32_t ulFillLen, char cFill);

+static uint32_t LLtoA(char *pcBuffer, uint32_t ulBufferLen, int64_t llNum, uint32_t ulFillLen, char cFill);

+static uint32_t ULtoA(char *pcBuffer, uint32_t ulBufferLen, uint32_t ulNum, bool fHex, uint32_t ulFillLen, char cFill);

+static uint32_t ULLtoA(char *pcBuffer, uint32_t ulBufferLen, uint64_t ullNum, bool fHex, uint32_t ulFillLen, char cFill);

+static uint32_t FinishToA(const char *pcDigits, uint32_t ulDigits, char *pcOutBuffer, uint32_t ulBufferLen, uint32_t ulFillLen, char cFill);

+

+

+/*  Digits for the *LtoA() routines.

+*/

+static const char gacDigits[] = "0123456789ABCDEF";

+

+

+#if REDCONF_OUTPUT == 1

+/** @brief Print formatted data with a variable length argument list.

+

+    This function provides a subset of the ANSI C printf() functionality with

+    several extensions to support fixed size data types.

+

+    See RedVSNPrintf() for the list of supported types.

+

+    @param pszFormat    A pointer to the null-terminated format string.

+    @param ...          The variable length argument list.

+*/

+void RedPrintf(

+    const char *pszFormat,

+    ...)

+{

+    va_list     arglist;

+

+    va_start(arglist, pszFormat);

+

+    RedVPrintf(pszFormat, arglist);

+

+    va_end(arglist);

+}

+

+

+/** @brief Print formatted data using a pointer to a variable length argument

+           list.

+

+    This function provides a subset of the ANSI C vprintf() functionality.

+

+    See RedVSNPrintf() for the list of supported types.

+

+    This function accommodates a maximum output length of #OUTPUT_BUFFER_SIZE.

+    If this function must truncate the output, and the original string was

+    \n terminated, the truncated output will be \n terminated as well.

+

+    @param pszFormat    A pointer to the null-terminated format string.

+    @param arglist      The variable length argument list.

+*/

+void RedVPrintf(

+    const char *pszFormat,

+    va_list     arglist)

+{

+    char        achBuffer[OUTPUT_BUFFER_SIZE];

+

+    if(RedVSNPrintf(achBuffer, sizeof(achBuffer), pszFormat, arglist) == -1)

+    {

+        /*  Ensture the buffer is null terminated.

+        */

+        achBuffer[sizeof(achBuffer) - 1U] = '\0';

+

+        /*  If the original string was \n terminated and the new one is not, due to

+            truncation, stuff a \n into the new one.

+        */

+        if(pszFormat[RedStrLen(pszFormat) - 1U] == '\n')

+        {

+            achBuffer[sizeof(achBuffer) - 2U] = '\n';

+        }

+    }

+

+    RedOsOutputString(achBuffer);

+}

+#endif /* #if REDCONF_OUTPUT == 1 */

+

+

+/** @brief Format arguments into a string using a subset of the ANSI C

+           vsprintf() functionality.

+

+    This function is modeled after the Microsoft _snprint() extension to the

+    ANSI C sprintf() function, and allows a buffer length to be specified so

+    that overflow is avoided.

+

+    See RedVSNPrintf() for the list of supported types.

+

+    @param pcBuffer     A pointer to the output buffer

+    @param ulBufferLen  The output buffer length

+    @param pszFormat    A pointer to the null terminated format string

+    @param ...          Variable argument list

+

+    @return The length output, or -1 if the buffer filled up.  If -1 is

+            returned, the output buffer may not be null-terminated.

+*/

+int32_t RedSNPrintf(

+    char       *pcBuffer,

+    uint32_t    ulBufferLen,

+    const char *pszFormat,

+    ...)

+{

+    int32_t     iLen;

+    va_list     arglist;

+

+    va_start(arglist, pszFormat);

+

+    iLen = RedVSNPrintf(pcBuffer, ulBufferLen, pszFormat, arglist);

+

+    va_end(arglist);

+

+    return iLen;

+}

+

+

+/** @brief Format arguments into a string using a subset of the ANSI C

+           vsprintf() functionality.

+

+    This function is modeled after the Microsoft _vsnprint() extension to the

+    ANSI C vsprintf() function, and requires a buffer length to be specified so

+    that overflow is avoided.

+

+    The following ANSI C standard formatting codes are supported:

+

+    | Code | Meaning                            |

+    | ---- | ---------------------------------- |

+    | %c   | Format a character                 |

+    | %s   | Format a null-terminated C string  |

+    | %hd  | Format a signed short              |

+    | %hu  | Format an unsigned short           |

+    | %d   | Format a signed integer            |

+    | %u   | Format an unsigned integer         |

+    | %ld  | Format a signed long               |

+    | %lu  | Format an unsigned long            |

+    | %lld | Format a signed long long          |

+    | %llu | Format an unsigned long long       |

+    | %hx  | Format a short in hex              |

+    | %x   | Format an integer in hex           |

+    | %lx  | Format a long in hex               |

+    | %llx | Format a long long in hex          |

+    | %p   | Format a pointer (hex value)       |

+

+    @note All formatting codes are case-sensitive.

+

+    Fill characters and field widths are supported per the ANSI standard, as is

+    left justification with the '-' character.

+

+    The only supported fill characters are '0', ' ', and '_'.

+

+    '*' is supported to specify variable length field widths.

+

+    Hexidecimal numbers are always displayed in upper case.  Formatting codes

+    which specifically request upper case (e.g., "%lX") are not supported.

+

+    Unsupported behaviors:

+      - Precision is not supported.

+      - Floating point is not supported.

+

+    Errata:

+    - There is a subtle difference in the return value for this function versus

+      the Microsoft implementation.  In the Microsoft version, if the buffer

+      exactly fills up, but there is no room for a null-terminator, the return

+      value will be the length of the buffer.  In this code, -1 will be returned

+      when this happens.

+    - When using left justified strings, the only supported fill character is a

+      space, regardless of what may be specified.  It is not clear if this is

+      ANSI standard or just the way the Microsoft function works, but we emulate

+      the Microsoft behavior.

+

+    @param pcBuffer     A pointer to the output buffer.

+    @param ulBufferLen  The output buffer length.

+    @param pszFormat    A pointer to the null terminated ANSI format string.

+    @param arglist      Variable argument list.

+

+    @return  The length output, or -1 if the buffer filled up.  If -1 is

+             returned, the output buffer may not be null-terminated.

+*/

+int32_t RedVSNPrintf(

+    char       *pcBuffer,

+    uint32_t    ulBufferLen,

+    const char *pszFormat,

+    va_list     arglist)

+{

+    uint32_t    ulBufIdx = 0U;

+    uint32_t    ulFmtIdx = 0U;

+    int32_t     iLen;

+

+    while((pszFormat[ulFmtIdx] != '\0') && (ulBufIdx < ulBufferLen))

+    {

+        PRINTFORMAT fmt;

+        uint32_t    ulSpecifierLen;

+        uint32_t    ulWidth;

+

+        /*  Process the next segment of the format string, outputting

+            any non-format specifiers, as output buffer space allows,

+            and return information about the next format specifier.

+        */

+        ulWidth = ProcessFormatSegment(&pcBuffer[ulBufIdx], ulBufferLen - ulBufIdx, &pszFormat[ulFmtIdx], &fmt, &ulSpecifierLen);

+        if(ulWidth)

+        {

+            REDASSERT(ulWidth <= (ulBufferLen - ulBufIdx));

+

+            ulBufIdx += ulWidth;

+        }

+

+        /*  If no specifier was found, or if the output buffer is

+            full, we're done -- get out.

+        */

+        if((ulSpecifierLen == 0U) || (ulBufIdx == ulBufferLen))

+        {

+            break;

+        }

+

+        /*  Otherwise, the math should add up for these things...

+        */

+        REDASSERT(&pszFormat[fmt.ulSpecifierIdx] == &pszFormat[ulWidth]);

+

+        /*  Point past the specifier, to the next piece of the format string.

+        */

+        ulFmtIdx = ulFmtIdx + fmt.ulSpecifierIdx + ulSpecifierLen;

+

+        if(fmt.fHasVarWidth)

+        {

+            int iFillLen = va_arg(arglist, int);

+

+            if(iFillLen >= 0)

+            {

+                fmt.ulFillLen = (uint32_t)iFillLen;

+            }

+            else

+            {

+                /*  Bogus fill length.  Ignore.

+                */

+                fmt.ulFillLen = 0U;

+            }

+        }

+

+        switch(fmt.type)

+        {

+            case PRFMT_DOUBLEPERCENT:

+            {

+                /*  Nothing to do.  A single percent has already been output,

+                    and we just finished skipping past the second percent.

+                */

+                break;

+            }

+

+            /*----------------->  Small int handling  <------------------

+             *

+             *  Values smaller than "int" will be promoted to "int" by

+             *  the compiler, so we must retrieve them using "int" when

+             *  calling va_arg().  Once we've done that, we immediately

+             *  put the value into the desired data type.

+             *---------------------------------------------------------*/

+

+            case PRFMT_CHAR:

+            {

+                pcBuffer[ulBufIdx] = (char)va_arg(arglist, int);

+                ulBufIdx++;

+                break;

+            }

+            case PRFMT_SIGNED8BIT:

+            {

+                int8_t num = (int8_t)va_arg(arglist, int);

+

+                ulBufIdx += LtoA(&pcBuffer[ulBufIdx], ulBufferLen - ulBufIdx, num, fmt.ulFillLen, fmt.cFillChar);

+                break;

+            }

+            case PRFMT_UNSIGNED8BIT:

+            {

+                uint8_t bNum = (uint8_t)va_arg(arglist, unsigned);

+

+                ulBufIdx += ULtoA(&pcBuffer[ulBufIdx], ulBufferLen - ulBufIdx, bNum, false, fmt.ulFillLen, fmt.cFillChar);

+                break;

+            }

+            case PRFMT_HEX8BIT:

+            {

+                uint8_t bNum = (uint8_t)va_arg(arglist, unsigned);

+

+                ulBufIdx += ULtoA(&pcBuffer[ulBufIdx], ulBufferLen - ulBufIdx, bNum, true, fmt.ulFillLen, fmt.cFillChar);

+                break;

+            }

+            case PRFMT_SIGNED16BIT:

+            {

+                int16_t num = (int16_t)va_arg(arglist, int);

+

+                ulBufIdx += LtoA(&pcBuffer[ulBufIdx], ulBufferLen - ulBufIdx, num, fmt.ulFillLen, fmt.cFillChar);

+                break;

+            }

+            case PRFMT_UNSIGNED16BIT:

+            {

+                uint16_t uNum = (uint16_t)va_arg(arglist, unsigned);

+

+                ulBufIdx += ULtoA(&pcBuffer[ulBufIdx], ulBufferLen - ulBufIdx, uNum, false, fmt.ulFillLen, fmt.cFillChar);

+                break;

+            }

+            case PRFMT_HEX16BIT:

+            {

+                uint16_t uNum = (uint16_t)va_arg(arglist, unsigned);

+

+                ulBufIdx += ULtoA(&pcBuffer[ulBufIdx], ulBufferLen - ulBufIdx, uNum, true, fmt.ulFillLen, fmt.cFillChar);

+                break;

+            }

+            case PRFMT_SIGNED32BIT:

+            {

+                int32_t lNum = va_arg(arglist, int32_t);

+

+                ulBufIdx += LtoA(&pcBuffer[ulBufIdx], ulBufferLen - ulBufIdx, lNum, fmt.ulFillLen, fmt.cFillChar);

+                break;

+            }

+            case PRFMT_UNSIGNED32BIT:

+            {

+                uint32_t ulNum = va_arg(arglist, uint32_t);

+

+                ulBufIdx += ULtoA(&pcBuffer[ulBufIdx], ulBufferLen - ulBufIdx, ulNum, false, fmt.ulFillLen, fmt.cFillChar);

+                break;

+            }

+            case PRFMT_HEX32BIT:

+            {

+                uint32_t ulNum = va_arg(arglist, uint32_t);

+

+                ulBufIdx += ULtoA(&pcBuffer[ulBufIdx], ulBufferLen - ulBufIdx, ulNum, true, fmt.ulFillLen, fmt.cFillChar);

+                break;

+            }

+            case PRFMT_SIGNED64BIT:

+            {

+                int64_t llNum = va_arg(arglist, int64_t);

+

+                ulBufIdx += LLtoA(&pcBuffer[ulBufIdx], ulBufferLen - ulBufIdx, llNum, fmt.ulFillLen, fmt.cFillChar);

+                break;

+            }

+            case PRFMT_UNSIGNED64BIT:

+            {

+                uint64_t ullNum = va_arg(arglist, uint64_t);

+

+                ulBufIdx += ULLtoA(&pcBuffer[ulBufIdx], ulBufferLen - ulBufIdx, ullNum, false, fmt.ulFillLen, fmt.cFillChar);

+                break;

+            }

+            case PRFMT_HEX64BIT:

+            {

+                uint64_t ullNum = va_arg(arglist, uint64_t);

+

+                ulBufIdx += ULLtoA(&pcBuffer[ulBufIdx], ulBufferLen - ulBufIdx, ullNum, true, fmt.ulFillLen, fmt.cFillChar);

+                break;

+            }

+            case PRFMT_POINTER:

+            {

+                const void *ptr = va_arg(arglist, const void *);

+

+                /*  Assert our assumption.

+                */

+                REDASSERT(sizeof(void *) <= 8U);

+

+                /*  Format as either a 64-bit or a 32-bit value.

+                */

+                if(sizeof(void *) > 4U)

+                {

+                    /*  Attempt to quiet warnings.

+                    */

+                    uintptr_t   ptrval = (uintptr_t)ptr;

+                    uint64_t    ullPtrVal = (uint64_t)ptrval;

+

+                    ulBufIdx += ULLtoA(&pcBuffer[ulBufIdx], ulBufferLen - ulBufIdx, ullPtrVal, true, fmt.ulFillLen, fmt.cFillChar);

+                }

+                else

+                {

+                    /*  Attempt to quiet warnings.

+                    */

+                    uintptr_t   ptrval = (uintptr_t)ptr;

+                    uint32_t    ulPtrVal = (uint32_t)ptrval;

+

+                    ulBufIdx += ULtoA(&pcBuffer[ulBufIdx], ulBufferLen - ulBufIdx, ulPtrVal, true, fmt.ulFillLen, fmt.cFillChar);

+                }

+

+                break;

+            }

+            case PRFMT_ANSISTRING:

+            {

+                const char *pszArg = va_arg(arglist, const char *);

+                uint32_t    ulArgIdx = 0U;

+

+                if(pszArg == NULL)

+                {

+                    pszArg = "null";

+                }

+

+                if(fmt.ulFillLen > 0U)

+                {

+                    if(!fmt.fLeftJustified)

+                    {

+                        uint32_t ulLen = RedStrLen(pszArg);

+

+                        /*  So long as we are not left justifying, fill as many

+                            characters as is necessary to make the string right

+                            justified.

+                        */

+                        while(((ulBufferLen - ulBufIdx) > 0U) && (fmt.ulFillLen > ulLen))

+                        {

+                            pcBuffer[ulBufIdx] = fmt.cFillChar;

+                            ulBufIdx++;

+                            fmt.ulFillLen--;

+                        }

+                    }

+

+                    /*  Move as many characters as we have space for into the

+                        output buffer.

+                    */

+                    while(((ulBufferLen - ulBufIdx) > 0U) && (pszArg[ulArgIdx] != '\0'))

+                    {

+                        pcBuffer[ulBufIdx] = pszArg[ulArgIdx];

+                        ulBufIdx++;

+                        ulArgIdx++;

+                        if(fmt.ulFillLen > 0U)

+                        {

+                            fmt.ulFillLen--;

+                        }

+                    }

+

+                    /*  If there is any space left to fill, do it (the string

+                        must have been left justified).

+                    */

+                    while(((ulBufferLen - ulBufIdx) > 0U) && (fmt.ulFillLen > 0U))

+                    {

+                        /*  This is NOT a typo -- when using left justified

+                            strings, spaces are the only allowed fill character.

+                            See the errata.

+                        */

+                        pcBuffer[ulBufIdx] = ' ';

+                        ulBufIdx++;

+                        fmt.ulFillLen--;

+                    }

+                }

+                else

+                {

+                    /*  No fill characters, just move up to as many

+                        characters as we have space for in the output

+                        buffer.

+                    */

+                    while(((ulBufferLen - ulBufIdx) > 0U) && (pszArg[ulArgIdx] != '\0'))

+                    {

+                        pcBuffer[ulBufIdx] = pszArg[ulArgIdx];

+                        ulBufIdx++;

+                        ulArgIdx++;

+                    }

+                }

+                break;

+            }

+            default:

+            {

+                REDERROR();

+                break;

+            }

+        }

+    }

+

+    /*  If there is space, tack on a null and return the output length

+        processed, not including the null.

+    */

+    if(ulBufIdx < ulBufferLen)

+    {

+        pcBuffer[ulBufIdx] = '\0';

+        iLen = (int32_t)ulBufIdx;

+    }

+    else

+    {

+        /*  Not enough space, just return -1, with no null termination

+        */

+        iLen = -1;

+    }

+

+    return iLen;

+}

+

+

+/** @brief  Process the next segment of the format string, outputting any

+            non-format specifiers, as output buffer space allows, and return

+            information about the next format specifier.

+

+    @note   If the returned value is the same as the supplied @p ulBufferLen,

+            the output buffer will not be null-terminated.  In all other cases,

+            the result will be null-terminated.  The returned length will never

+            include the null in the count.

+

+    @param pcBuffer         The output buffer.

+    @param ulBufferLen      The output buffer length.

+    @param pszFormat        The format string to process.

+    @param pFormat          The PRINTFORMAT structure to fill.

+    @param pulSpecifierLen  Returns the length of any format specifier string,

+                            or zero if no specifier was found.

+

+    @return The count of characters from pszFormatt which were processed and

+            copied to pcBuffer.

+        - If zero is returned and *pulSpecifierLen is non-zero, then

+          a format specifier string was found at the start of pszFmt.

+        - If non-zero is returned and *pulSpecifierLen is zero, then

+          no format specifier string was found, and the entire pszFmt

+          string was copied to pBuffer (or as much as will fit).

+*/

+static uint32_t ProcessFormatSegment(

+    char           *pcBuffer,

+    uint32_t        ulBufferLen,

+    const char     *pszFormat,

+    PRINTFORMAT    *pFormat,

+    uint32_t       *pulSpecifierLen)

+{

+    uint32_t        ulWidth = 0U;

+

+    /*  Find the next format specifier string, and information about it.

+    */

+    *pulSpecifierLen = ParseFormatSpecifier(pszFormat, pFormat);

+

+    if(*pulSpecifierLen == 0U)

+    {

+        /*  If no specifier was found at all, then simply output the full length

+            of the string, or as much as will fit.

+         */

+        ulWidth = REDMIN(ulBufferLen, RedStrLen(pszFormat));

+

+        RedMemCpy(pcBuffer, pszFormat, ulWidth);

+    }

+    else

+    {

+        /*  If we encountered a double percent, skip past one of them so it is

+            copied into the output buffer.

+        */

+        if(pFormat->type == PRFMT_DOUBLEPERCENT)

+        {

+            pFormat->ulSpecifierIdx++;

+

+            /*  A double percent specifier always has a length of two.  Since

+                we're processing one of those percent signs, reduce the length

+                to one.  Assert it so.

+            */

+            REDASSERT(*pulSpecifierLen == 2U);

+

+            (*pulSpecifierLen)--;

+        }

+

+        /*  So long as the specifier is not the very first thing in the format

+            string...

+        */

+        if(pFormat->ulSpecifierIdx != 0U)

+        {

+            /*  A specifier was found, but there is other data preceding it.

+                Copy as much as allowed to the output buffer.

+            */

+            ulWidth = REDMIN(ulBufferLen, pFormat->ulSpecifierIdx);

+

+            RedMemCpy(pcBuffer, pszFormat, ulWidth);

+        }

+    }

+

+    /*  If there is room in the output buffer, null-terminate whatever is there.

+        But note that the returned length never includes the null.

+    */

+    if(ulWidth < ulBufferLen)

+    {

+        pcBuffer[ulWidth] = 0U;

+    }

+

+    return ulWidth;

+}

+

+

+/** @brief Parse the specified format string for a valid RedVSNPrintf() format

+           sequence, and return information about it.

+

+    @param pszFormat    The format string to process.

+    @param pFormatType  The PRINTFORMAT structure to fill.  The data is only

+                        valid if a non-zero length is returned.

+

+    @return The length of the full format specifier string, starting at

+            pFormat->ulSpecifierIdx.  Returns zero if a valid specifier was

+            not found.

+*/

+static uint32_t ParseFormatSpecifier(

+    char const     *pszFomat,

+    PRINTFORMAT    *pFormatType)

+{

+    bool            fContainsIllegalSequence = false;

+    uint32_t        ulLen = 0U;

+    uint32_t        ulIdx = 0U;

+

+    while(pszFomat[ulIdx] != '\0')

+    {

+        uint32_t    ulTypeLen;

+

+        /*  general output

+        */

+        if(pszFomat[ulIdx] != '%')

+        {

+            ulIdx++;

+        }

+        else

+        {

+            RedMemSet(pFormatType, 0U, sizeof(*pFormatType));

+

+            /*  Record the location of the start of the format sequence

+            */

+            pFormatType->ulSpecifierIdx = ulIdx;

+            ulIdx++;

+

+            if(pszFomat[ulIdx] == '-')

+            {

+                pFormatType->fLeftJustified = true;

+                ulIdx++;

+            }

+

+            if((pszFomat[ulIdx] == '0') || (pszFomat[ulIdx] == '_'))

+            {

+                pFormatType->cFillChar = pszFomat[ulIdx];

+                ulIdx++;

+            }

+            else

+            {

+                pFormatType->cFillChar = ' ';

+            }

+

+            if(pszFomat[ulIdx] == '*')

+            {

+                pFormatType->fHasVarWidth = true;

+                ulIdx++;

+            }

+            else if(ISDIGIT(pszFomat[ulIdx]))

+            {

+                pFormatType->ulFillLen = (uint32_t)RedAtoI(&pszFomat[ulIdx]);

+                while(ISDIGIT(pszFomat[ulIdx]))

+                {

+                    ulIdx++;

+                }

+            }

+            else

+            {

+                /*  No fill length.

+                */

+            }

+

+            pFormatType->type = ParseFormatType(&pszFomat[ulIdx], &ulTypeLen);

+            if(pFormatType->type != PRFMT_UNKNOWN)

+            {

+                /*  Even though we are returning successfully, keep track of

+                    whether an illegal sequence was encountered and skipped.

+                */

+                pFormatType->fHasIllegalType = fContainsIllegalSequence;

+

+                ulLen = (ulIdx - pFormatType->ulSpecifierIdx) + ulTypeLen;

+                break;

+            }

+

+            /*  In the case of an unrecognized type string, simply ignore

+                it entirely.  Reset the pointer to the position following

+                the percent sign, so it is not found again.

+            */

+            fContainsIllegalSequence = false;

+            ulIdx = pFormatType->ulSpecifierIdx + 1U;

+        }

+    }

+

+    return ulLen;

+}

+

+

+/** @brief Parse a RedPrintf() format type string to determine the proper data

+           type.

+

+    @param pszFormat    The format string to process.  This must be a pointer to

+                        the character following any width or justification

+                        characters.

+    @param pulTypeLen   The location in which to store the type length.  The

+                        value will be 0 if PRFMT_UNKNOWN is returned.

+

+    @return Rhe PRFMT_* type value, or PRFMT_UNKNOWN if the type is not

+            recognized.

+*/

+static PRINTTYPE ParseFormatType(

+    const char     *pszFormat,

+    uint32_t       *pulTypeLen)

+{

+    PRINTTYPE       fmtType = PRFMT_UNKNOWN;

+    uint32_t        ulIdx = 0U;

+

+    switch(pszFormat[ulIdx])

+    {

+        case '%':

+            fmtType = PRFMT_DOUBLEPERCENT;

+            break;

+        case 'c':

+            fmtType = PRFMT_CHAR;

+            break;

+        case 's':

+            fmtType = PRFMT_ANSISTRING;

+            break;

+        case 'p':

+            fmtType = PRFMT_POINTER;

+            break;

+        case 'd':

+            fmtType = MAPINT;

+            break;

+        case 'u':

+            fmtType = MAPUINT;

+            break;

+        case 'x':

+            fmtType = MAPHEXUINT;

+            break;

+        case 'h':

+        {

+            ulIdx++;

+            switch(pszFormat[ulIdx])

+            {

+                case 'd':

+                    fmtType = MAPSHORT;

+                    break;

+                case 'u':

+                    fmtType = MAPUSHORT;

+                    break;

+                case 'x':

+                    fmtType = MAPHEXUSHORT;

+                    break;

+                default:

+                    break;

+            }

+            break;

+        }

+        case 'l':

+        {

+            ulIdx++;

+            switch(pszFormat[ulIdx])

+            {

+                case 'd':

+                    fmtType = MAPLONG;

+                    break;

+                case 'u':

+                    fmtType = MAPULONG;

+                    break;

+                case 'x':

+                    fmtType = MAPHEXULONG;

+                    break;

+                case 'l':

+                {

+                    ulIdx++;

+                    switch(pszFormat[ulIdx])

+                    {

+                        case 'd':

+                            fmtType = MAPLONGLONG;

+                            break;

+                        case 'u':

+                            fmtType = MAPULONGLONG;

+                            break;

+                        case 'X':

+                            fmtType = MAPHEXULONGLONG;

+                            break;

+                        default:

+                            break;

+                    }

+                    break;

+                }

+                default:

+                    break;

+            }

+            break;

+        }

+        default:

+            break;

+    }

+

+    if(fmtType != PRFMT_UNKNOWN)

+    {

+        *pulTypeLen = ulIdx + 1U;

+    }

+    else

+    {

+        *pulTypeLen = 0U;

+    }

+

+    return fmtType;

+}

+

+

+/** @brief Format a signed 32-bit integer as a base 10 ASCII string.

+

+    @note   If the output buffer length is exhausted, the result will *not* be

+            null-terminated.

+

+    @note   If the @p ulFillLen value is greater than or equal to the buffer

+            length, the result will not be null-terminated, even if the

+            formatted portion of the data is shorter than the buffer length.

+

+    @param pcBuffer     The output buffer

+    @param ulBufferLen  A pointer to the output buffer length

+    @param lNum         The 32-bit signed number to convert

+    @param ulFillLen    The fill length, if any

+    @param cFill        The fill character to use

+

+    @return The length of the string.

+*/

+static uint32_t LtoA(

+    char       *pcBuffer,

+    uint32_t    ulBufferLen,

+    int32_t     lNum,

+    uint32_t    ulFillLen,

+    char        cFill)

+{

+    uint32_t    ulLen;

+

+    if(pcBuffer == NULL)

+    {

+        REDERROR();

+        ulLen = 0U;

+    }

+    else

+    {

+        char                ach[12U]; /* big enough for a int32_t in base 10 */

+        uint32_t            ulDigits = 0U;

+        uint32_t            ulNum;

+        bool                fSign;

+

+        if(lNum < 0)

+        {

+            fSign = true;

+            ulNum = (uint32_t)-lNum;

+        }

+        else

+        {

+            fSign = false;

+            ulNum = (uint32_t)lNum;

+        }

+

+        do

+        {

+            ach[ulDigits] = gacDigits[ulNum % 10U];

+            ulNum = ulNum / 10U;

+            ulDigits++;

+        }

+        while(ulNum);

+

+        if(fSign)

+        {

+            ach[ulDigits] = '-';

+            ulDigits++;

+        }

+

+        ulLen = FinishToA(ach, ulDigits, pcBuffer, ulBufferLen, ulFillLen, cFill);

+    }

+

+    return ulLen;

+}

+

+

+/** @brief Format a signed 64-bit integer as a base 10 ASCII string.

+

+    @note   If the output buffer length is exhausted, the result will *not* be

+            null-terminated.

+

+    @note   If the @p ulFillLen value is greater than or equal to the buffer

+            length, the result will not be null-terminated, even if the

+            formatted portion of the data is shorter than the buffer length.

+

+    @param pcBuffer     The output buffer

+    @param ulBufferLen  A pointer to the output buffer length

+    @param llNum        The 64-bit signed number to convert

+    @param ulFillLen    The fill length, if any

+    @param cFill        The fill character to use

+

+    @return The length of the string.

+*/

+static uint32_t LLtoA(

+    char       *pcBuffer,

+    uint32_t    ulBufferLen,

+    int64_t     llNum,

+    uint32_t    ulFillLen,

+    char        cFill)

+{

+    uint32_t    ulLen;

+

+    if(pcBuffer == NULL)

+    {

+        REDERROR();

+        ulLen = 0U;

+    }

+    else

+    {

+        char                ach[12U]; /* big enough for a int32_t in base 10 */

+        uint32_t            ulDigits = 0U;

+        uint64_t            ullNum;

+        bool                fSign;

+

+        if(llNum < 0)

+        {

+            fSign = true;

+            ullNum = (uint64_t)-llNum;

+        }

+        else

+        {

+            fSign = false;

+            ullNum = (uint64_t)llNum;

+        }

+

+        /*  Not allowed to assume that 64-bit division is OK, so use a

+            software division routine.

+        */

+        do

+        {

+            uint64_t ullQuotient;

+            uint32_t ulRemainder;

+

+            /*  Note: RedUint64DivMod32() is smart enough to use normal division

+                once ullNumericVal <= UINT32_MAX.

+            */

+            ullQuotient = RedUint64DivMod32(ullNum, 10U, &ulRemainder);

+

+            ach[ulDigits] = gacDigits[ulRemainder];

+            ullNum = ullQuotient;

+            ulDigits++;

+        }

+        while(ullNum > 0U);

+

+        if(fSign)

+        {

+            ach[ulDigits] = '-';

+            ulDigits++;

+        }

+

+        ulLen = FinishToA(ach, ulDigits, pcBuffer, ulBufferLen, ulFillLen, cFill);

+    }

+

+    return ulLen;

+}

+

+

+/** @brief Format an unsigned 32-bit integer as an ASCII string as decimal or

+           hex.

+

+    @note If the output buffer length is exhausted, the result will *not* be

+          null-terminated.

+

+    @param pcBuffer     The output buffer

+    @param ulBufferLen  The output buffer length

+    @param ulNum        The 32-bit unsigned number to convert

+    @param fHex         If true, format as hex; if false, decimal.

+    @param ulFillLen    The fill length, if any

+    @param cFill        The fill character to use

+

+    @return The length of the string.

+*/

+static uint32_t ULtoA(

+    char       *pcBuffer,

+    uint32_t    ulBufferLen,

+    uint32_t    ulNum,

+    bool        fHex,

+    uint32_t    ulFillLen,

+    char        cFill)

+{

+    uint32_t    ulLen;

+

+    if(pcBuffer == NULL)

+    {

+        REDERROR();

+        ulLen = 0U;

+    }

+    else

+    {

+        char        ach[11U];   /* Big enough for a uint32_t in radix 10 */

+        uint32_t    ulDigits = 0U;

+        uint32_t    ulNumericVal = ulNum;

+        uint32_t    ulRadix = fHex ? 16U : 10U;

+

+        do

+        {

+            ach[ulDigits] = gacDigits[ulNumericVal % ulRadix];

+            ulNumericVal = ulNumericVal / ulRadix;

+            ulDigits++;

+        }

+        while(ulNumericVal > 0U);

+

+        ulLen = FinishToA(ach, ulDigits, pcBuffer, ulBufferLen, ulFillLen, cFill);

+    }

+

+    return ulLen;

+}

+

+

+/** @brief Format an unsigned 64-bit integer as an ASCII string as decimal or

+           hex.

+

+    @note If the output buffer length is exhausted, the result will *not* be

+          null-terminated.

+

+    @param pcBuffer     The output buffer.

+    @param ulBufferLen  The output buffer length.

+    @param ullNum       The unsigned 64-bit number to convert.

+    @param fHex         If true, format as hex; if false, decimal.

+    @param ulFillLen    The fill length, if any.

+    @param cFill        The fill character to use.

+

+    @return The length of the string.

+*/

+static uint32_t ULLtoA(

+    char       *pcBuffer,

+    uint32_t    ulBufferLen,

+    uint64_t    ullNum,

+    bool        fHex,

+    uint32_t    ulFillLen,

+    char        cFill)

+{

+    uint32_t    ulLen;

+

+    if(pcBuffer == NULL)

+    {

+        REDERROR();

+        ulLen = 0U;

+    }

+    else

+    {

+

+        char        ach[21U];   /* Big enough for a uint64_t in radix 10 */

+        uint32_t    ulDigits = 0U;

+        uint64_t    ullNumericVal = ullNum;

+

+        if(fHex)

+        {

+            /*  We can figure out the digits using bit operations.

+            */

+            do

+            {

+                ach[ulDigits] = gacDigits[ullNumericVal & 15U];

+                ullNumericVal >>= 4U;

+                ulDigits++;

+            }

+            while(ullNumericVal > 0U);

+        }

+        else

+        {

+            /*  Not allowed to assume that 64-bit division is OK, so use a

+                software division routine.

+            */

+            do

+            {

+                uint64_t ullQuotient;

+                uint32_t ulRemainder;

+

+                /*  Note: RedUint64DivMod32() is smart enough to use normal division

+                    once ullNumericVal <= UINT32_MAX.

+                */

+                ullQuotient = RedUint64DivMod32(ullNumericVal, 10U, &ulRemainder);

+

+                ach[ulDigits] = gacDigits[ulRemainder];

+                ullNumericVal = ullQuotient;

+                ulDigits++;

+            }

+            while(ullNumericVal > 0U);

+        }

+

+        ulLen = FinishToA(ach, ulDigits, pcBuffer, ulBufferLen, ulFillLen, cFill);

+    }

+

+    return ulLen;

+}

+

+

+/** @brief Finish converting a number into an ASCII string representing that

+           number.

+

+    This helper function contains common logic that needs to run at the end of

+    all the "toA" functions.  It adds the fill character and reverses the digits

+    string.

+

+    @param pcDigits     The digits (and sign) for the ASCII string, in reverse

+                        order as they were computed.

+    @param ulDigits     The number of digit characters.

+    @param pcOutBuffer  The output buffer.

+    @param ulBufferLen  The length of the output buffer.

+    @param ulFillLen    The fill length.  If the number string is shorter than

+                        this, the remaining bytes are filled with @p cFill.

+    @param cFill        The fill character.

+

+    @return The length of @p pcOutBuffer.

+*/

+static uint32_t FinishToA(

+    const char *pcDigits,

+    uint32_t    ulDigits,

+    char       *pcOutBuffer,

+    uint32_t    ulBufferLen,

+    uint32_t    ulFillLen,

+    char        cFill)

+{

+    uint32_t    ulIdx = 0U;

+    uint32_t    ulDigitIdx = ulDigits;

+

+    /*  user may have asked for a fill char

+    */

+    if(ulFillLen > ulDigits)

+    {

+        uint32_t ulFillRem = ulFillLen - ulDigits;

+

+        while((ulFillRem > 0U) && (ulIdx < ulBufferLen))

+        {

+            pcOutBuffer[ulIdx] = cFill;

+            ulIdx++;

+            ulFillRem--;

+        }

+    }

+

+    /*  reverse the string

+    */

+    while((ulDigitIdx > 0) && (ulIdx < ulBufferLen))

+    {

+        ulDigitIdx--;

+        pcOutBuffer[ulIdx] = pcDigits[ulDigitIdx];

+        ulIdx++;

+    }

+

+    if(ulIdx < ulBufferLen)

+    {

+        pcOutBuffer[ulIdx] = '\0';

+    }

+

+    return ulIdx;

+}

+

diff --git a/FreeRTOS-Plus/Source/Reliance-Edge/tests/util/rand.c b/FreeRTOS-Plus/Source/Reliance-Edge/tests/util/rand.c
new file mode 100644
index 0000000..5f05be7
--- /dev/null
+++ b/FreeRTOS-Plus/Source/Reliance-Edge/tests/util/rand.c
@@ -0,0 +1,159 @@
+/*             ----> DO NOT REMOVE THE FOLLOWING NOTICE <----

+

+                   Copyright (c) 2014-2015 Datalight, Inc.

+                       All Rights Reserved Worldwide.

+

+    This program is free software; you can redistribute it and/or modify

+    it under the terms of the GNU General Public License as published by

+    the Free Software Foundation; use version 2 of the License.

+

+    This program is distributed in the hope that it will be useful,

+    but "AS-IS," WITHOUT ANY WARRANTY; without even the implied warranty

+    of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the

+    GNU General Public License for more details.

+

+    You should have received a copy of the GNU General Public License along

+    with this program; if not, write to the Free Software Foundation, Inc.,

+    51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.

+*/

+/*  Businesses and individuals that for commercial or other reasons cannot

+    comply with the terms of the GPLv2 license may obtain a commercial license

+    before incorporating Reliance Edge into proprietary software for

+    distribution in any form.  Visit http://www.datalight.com/reliance-edge for

+    more information.

+*/

+/** @file

+    @brief Implements a random number generator.

+*/

+#include <redfs.h>

+#include <redtestutils.h>

+

+

+/*  This is the global seed used by the random number generator when the caller

+    has not provided a seed to either the RedRand32() or RedRand64() functions.

+*/

+static uint64_t ullGlobalRandomNumberSeed;

+

+/*  Whether the above seed has been initialized.

+*/

+static bool fGlobalSeedInited;

+

+

+/** @brief Set the global seed used by the random number generator.

+

+    The global seed gets used when RedRand64() or RedRand32() are called with

+    a NULL seed argument.

+

+    @param ullSeed  The value to use as the global RNG seed.

+*/

+void RedRandSeed(

+    uint64_t ullSeed)

+{

+    ullGlobalRandomNumberSeed = ullSeed;

+    fGlobalSeedInited = true;

+}

+

+

+/** @brief Generate a 64-bit pseudo-random number.

+

+    The period of this random number generator is 2^64 (1.8 x 1019).  These

+    parameters are the same as the default one-stream SPRNG lcg64 generator and

+    it satisfies the requirements for a maximal period.

+

+    The tempering value is used and an AND mask and is specifically selected to

+    favor the distribution of lower bits.

+

+    @param pullSeed A pointer to the seed to use.  Set this value to NULL to

+                    use the internal global seed value.

+

+    @return A pseudo-random number in the range [0, UINT64_MAX].

+*/

+uint64_t RedRand64(

+    uint64_t       *pullSeed)

+{

+    const uint64_t  ullA = UINT64_SUFFIX(2862933555777941757);

+    const uint64_t  ullC = UINT64_SUFFIX(3037000493);

+    const uint64_t  ullT = UINT64_SUFFIX(4921441182957829599);

+    uint64_t        ullN;

+    uint64_t       *pullSeedPtr;

+    uint64_t        ullLocalSeed;

+

+    if(pullSeed != NULL)

+    {

+        ullLocalSeed = *pullSeed;

+        pullSeedPtr = pullSeed;

+    }

+    else

+    {

+        if(!fGlobalSeedInited)

+        {

+            /*  Unfortunately, the Reliance Edge OS services don't give us much

+                to work with to initialize the global seed.  There is no entropy

+                abstraction, no tick count abstraction, and the timestamp

+                abstraction uses an opaque type which is not guaranteed to be an

+                integer.  The best we can do is use the RTC.

+

+                Tests using the RNG should be supplying a seed anyway, for

+                reproducibility.

+            */

+            RedRandSeed((uint64_t)RedOsClockGetTime());

+        }

+

+        ullLocalSeed = ullGlobalRandomNumberSeed;

+        pullSeedPtr = &ullGlobalRandomNumberSeed;

+    }

+

+    ullN = (ullLocalSeed * ullA) + ullC;

+

+    *pullSeedPtr = ullN;

+

+    /*  The linear congruential generator used above produces good psuedo-random

+        64-bit number sequences, however, as with any LCG, the period of the

+        lower order bits is much shorter resulting in alternately odd/even pairs

+        in bit zero.

+

+        The result of the LGC above is tempered below with a series of XOR and

+        shift operations to produce a more acceptable equidistribution of bits

+        throughout the 64-bit range.

+    */

+    ullN ^= (ullN >> 21U) & ullT;

+    ullN ^= (ullN >> 43U) & ullT;

+    ullN ^= (ullN << 23U) & ~ullT;

+    ullN ^= (ullN << 31U) & ~ullT;

+

+    return ullN;

+}

+

+

+/** @brief Generate a 32-bit pseudo-random number.

+

+    @note   The 32-bit random number generator internally uses the 64-bit random

+            number generator, returning the low 32-bits of the pseudo-random

+            64-bit value.

+

+    @param pulSeed  A pointer to the seed to use.  Set this value to NULL to use

+                    the internal global seed value.

+

+    @return A pseudo-random number in the range [0, UINT32_MAX].

+*/

+uint32_t RedRand32(

+    uint32_t   *pulSeed)

+{

+    uint64_t    ullN;

+

+    if(pulSeed != NULL)

+    {

+        uint64_t ullLocalSeed;

+

+        ullLocalSeed = *pulSeed;

+        ullN = RedRand64(&ullLocalSeed);

+        *pulSeed = (uint32_t)ullLocalSeed;

+    }

+    else

+    {

+        ullN = RedRand64(NULL);

+    }

+

+    return (uint32_t)ullN;

+}

+

diff --git a/FreeRTOS-Plus/Source/Reliance-Edge/toolcmn/getopt.c b/FreeRTOS-Plus/Source/Reliance-Edge/toolcmn/getopt.c
new file mode 100644
index 0000000..2a8f001
--- /dev/null
+++ b/FreeRTOS-Plus/Source/Reliance-Edge/toolcmn/getopt.c
@@ -0,0 +1,559 @@
+/*

+ * Copyright (c) 2002 Todd C. Miller <Todd.Miller@courtesan.com>

+ *

+ * Permission to use, copy, modify, and distribute this software for any

+ * purpose with or without fee is hereby granted, provided that the above

+ * copyright notice and this permission notice appear in all copies.

+ *

+ * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES

+ * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF

+ * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR

+ * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES

+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN

+ * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF

+ * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.

+ *

+ * Sponsored in part by the Defense Advanced Research Projects

+ * Agency (DARPA) and Air Force Research Laboratory, Air Force

+ * Materiel Command, USAF, under agreement number F39502-99-1-0512.

+ */

+/*-

+ * Copyright (c) 2000 The NetBSD Foundation, Inc.

+ * All rights reserved.

+ *

+ * This code is derived from software contributed to The NetBSD Foundation

+ * by Dieter Baron and Thomas Klausner.

+ *

+ * 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.

+ *

+ * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. 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 FOUNDATION 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.

+ */

+/** @file

+    @brief Implementations of getopt() and getopt_long() work-alike functions.

+

+    This code was taken from FreeBSD and slightly modified, mostly to rename

+    symbols with external linkage to avoid naming conflicts in systems where

+    there are real getopt()/getopt_long() implementations, and for portability.

+*/

+#include <stdio.h>

+#include <stdlib.h>

+#include <string.h>

+

+#include <redfs.h>

+#include <redgetopt.h>

+#include <redtestutils.h>

+#include <rederrno.h>

+

+

+int32_t red_opterr = 1;     /* if error message should be printed */

+int32_t red_optind = 1;     /* index into parent argv vector */

+int32_t red_optopt = '?';   /* character checked for validity */

+int32_t red_optreset;       /* reset RedGetopt */

+const char *red_optarg;     /* argument associated with option */

+

+#define PRINT_ERROR ((red_opterr) && (*options != ':'))

+

+#define FLAG_PERMUTE    0x01    /* permute non-options to the end of argv */

+#define FLAG_ALLARGS    0x02    /* treat non-options as args to option "-1" */

+#define FLAG_LONGONLY   0x04    /* operate as RedGetoptLongOnly */

+

+/* return values */

+#define BADCH       (int)'?'

+#define BADARG      ((*options == ':') ? (int)':' : (int)'?')

+#define INORDER     (int)1

+

+#define EMSG        ""

+

+#define NO_PREFIX   (-1)

+#define D_PREFIX    0

+#define DD_PREFIX   1

+#define W_PREFIX    2

+

+static int gcd(int a, int b);

+static void permute_args(int panonopt_start, int panonopt_end, int opt_end, char * const *nargv);

+static int parse_long_options(char * const *nargv, const char *options, const REDOPTION *long_options, int32_t *idx, int short_too, int flags);

+static int getopt_internal(int nargc, char * const *nargv, const char *options, const REDOPTION *long_options, int32_t *idx, int flags);

+

+static const char *place = EMSG; /* option letter processing */

+

+/* XXX: set red_optreset to 1 rather than these two */

+static int nonopt_start = -1; /* first non option argument (for permute) */

+static int nonopt_end = -1;   /* first option after non options (for permute) */

+

+/* Error messages */

+static const char recargchar[] = "option requires an argument -- %c\n";

+static const char illoptchar[] = "illegal option -- %c\n"; /* From P1003.2 */

+static int dash_prefix = NO_PREFIX;

+static const char gnuoptchar[] = "invalid option -- %c\n";

+

+static const char recargstring[] = "option `%s%s' requires an argument\n";

+static const char ambig[] = "option `%s%s' is ambiguous\n";

+static const char noarg[] = "option `%s%s' doesn't allow an argument\n";

+static const char illoptstring[] = "unrecognized option `%s%s'\n";

+

+/*

+ * Compute the greatest common divisor of a and b.

+ */

+static int

+gcd(int a, int b)

+{

+    int c;

+

+    c = a % b;

+    while (c != 0) {

+        a = b;

+        b = c;

+        c = a % b;

+    }

+

+    return (b);

+}

+

+/*

+ * Exchange the block from nonopt_start to nonopt_end with the block

+ * from nonopt_end to opt_end (keeping the same order of arguments

+ * in each block).

+ */

+static void

+permute_args(int panonopt_start, int panonopt_end, int opt_end,

+    char * const *nargv)

+{

+    int cstart, cyclelen, i, j, ncycle, nnonopts, nopts, pos;

+    char *swap;

+

+    /*

+     * compute lengths of blocks and number and size of cycles

+     */

+    nnonopts = panonopt_end - panonopt_start;

+    nopts = opt_end - panonopt_end;

+    ncycle = gcd(nnonopts, nopts);

+    cyclelen = (opt_end - panonopt_start) / ncycle;

+

+    for (i = 0; i < ncycle; i++) {

+        cstart = panonopt_end+i;

+        pos = cstart;

+        for (j = 0; j < cyclelen; j++) {

+            if (pos >= panonopt_end)

+                pos -= nnonopts;

+            else

+                pos += nopts;

+            swap = nargv[pos];

+            ((char **) nargv)[pos] = nargv[cstart];

+            ((char **)nargv)[cstart] = swap;

+        }

+    }

+}

+

+/*

+ * parse_long_options --

+ *  Parse long options in argc/argv argument vector.

+ * Returns -1 if short_too is set and the option does not match long_options.

+ */

+static int

+parse_long_options(char * const *nargv, const char *options,

+    const REDOPTION *long_options, int32_t *idx, int short_too, int flags)

+{

+    const char *current_argv, *has_equal, *current_dash;

+    size_t current_argv_len;

+    int i, match, exact_match, second_partial_match;

+

+    current_argv = place;

+    switch (dash_prefix) {

+        case D_PREFIX:

+            current_dash = "-";

+            break;

+        case DD_PREFIX:

+            current_dash = "--";

+            break;

+        case W_PREFIX:

+            current_dash = "-W ";

+            break;

+        default:

+            current_dash = "";

+            break;

+    }

+    match = -1;

+    exact_match = 0;

+    second_partial_match = 0;

+

+    red_optind++;

+

+    if ((has_equal = strchr(current_argv, '=')) != NULL) {

+        /* argument found (--option=arg) */

+        current_argv_len = has_equal - current_argv;

+        has_equal++;

+    } else

+        current_argv_len = strlen(current_argv);

+

+    for (i = 0; long_options[i].name; i++) {

+        /* find matching long option */

+        if (strncmp(current_argv, long_options[i].name,

+            current_argv_len))

+            continue;

+

+        if (strlen(long_options[i].name) == current_argv_len) {

+            /* exact match */

+            match = i;

+            exact_match = 1;

+            break;

+        }

+        /*

+         * If this is a known short option, don't allow

+         * a partial match of a single character.

+         */

+        if (short_too && current_argv_len == 1)

+            continue;

+

+        if (match == -1)    /* first partial match */

+            match = i;

+        else if ((flags & FLAG_LONGONLY) ||

+             long_options[i].has_arg !=

+                 long_options[match].has_arg ||

+             long_options[i].flag != long_options[match].flag ||

+             long_options[i].val != long_options[match].val)

+            second_partial_match = 1;

+    }

+    if (!exact_match && second_partial_match) {

+        /* ambiguous abbreviation */

+        if (PRINT_ERROR)

+            fprintf(stderr,

+                 ambig,

+                 current_dash,

+                 current_argv);

+        red_optopt = 0;

+        return (BADCH);

+    }

+    if (match != -1) {      /* option found */

+        if (long_options[match].has_arg == red_no_argument

+            && has_equal) {

+            if (PRINT_ERROR)

+                fprintf(stderr,

+                     noarg,

+                     current_dash,

+                     current_argv);

+            /*

+             * XXX: GNU sets red_optopt to val regardless of flag

+             */

+            if (long_options[match].flag == NULL)

+                red_optopt = long_options[match].val;

+            else

+                red_optopt = 0;

+            return (BADCH);

+        }

+        if (long_options[match].has_arg == red_required_argument ||

+            long_options[match].has_arg == red_optional_argument) {

+            if (has_equal)

+                red_optarg = has_equal;

+            else if (long_options[match].has_arg ==

+                red_required_argument) {

+                /*

+                 * optional argument doesn't use next nargv

+                 */

+                red_optarg = nargv[red_optind++];

+            }

+        }

+        if ((long_options[match].has_arg == red_required_argument)

+            && (red_optarg == NULL)) {

+            /*

+             * Missing argument; leading ':' indicates no error

+             * should be generated.

+             */

+            if (PRINT_ERROR)

+                fprintf(stderr,

+                    recargstring,

+                    current_dash,

+                    current_argv);

+            /*

+             * XXX: GNU sets red_optopt to val regardless of flag

+             */

+            if (long_options[match].flag == NULL)

+                red_optopt = long_options[match].val;

+            else

+                red_optopt = 0;

+            --red_optind;

+            return (BADARG);

+        }

+    } else {            /* unknown option */

+        if (short_too) {

+            --red_optind;

+            return (-1);

+        }

+        if (PRINT_ERROR)

+            fprintf(stderr,

+                  illoptstring,

+                  current_dash,

+                  current_argv);

+        red_optopt = 0;

+        return (BADCH);

+    }

+    if (idx)

+        *idx = match;

+    if (long_options[match].flag) {

+        *long_options[match].flag = long_options[match].val;

+        return (0);

+    } else

+        return (long_options[match].val);

+}

+

+/*

+ * getopt_internal --

+ *  Parse argc/argv argument vector.  Called by user level routines.

+ */

+static int

+getopt_internal(int nargc, char * const *nargv, const char *options,

+    const REDOPTION *long_options, int32_t *idx, int flags)

+{

+    char *oli;              /* option letter list index */

+    int optchar, short_too;

+

+    if (options == NULL)

+        return (-1);

+

+    /*

+     * XXX Some GNU programs (like cvs) set red_optind to 0 instead of

+     * XXX using red_optreset.  Work around this braindamage.

+     */

+    if (red_optind == 0)

+        red_optind = red_optreset = 1;

+

+    /*

+     * Disable GNU extensions if options string begins with a '+'.

+     */

+    if (*options == '-')

+        flags |= FLAG_ALLARGS;

+    else if (*options == '+')

+        flags &= ~FLAG_PERMUTE;

+    if (*options == '+' || *options == '-')

+        options++;

+

+    red_optarg = NULL;

+    if (red_optreset)

+        nonopt_start = nonopt_end = -1;

+start:

+    if (red_optreset || !*place) {      /* update scanning pointer */

+        red_optreset = 0;

+        if (red_optind >= nargc) {          /* end of argument vector */

+            place = EMSG;

+            if (nonopt_end != -1) {

+                /* do permutation, if we have to */

+                permute_args(nonopt_start, nonopt_end,

+                    red_optind, nargv);

+                red_optind -= nonopt_end - nonopt_start;

+            }

+            else if (nonopt_start != -1) {

+                /*

+                 * If we skipped non-options, set red_optind

+                 * to the first of them.

+                 */

+                red_optind = nonopt_start;

+            }

+            nonopt_start = nonopt_end = -1;

+            return (-1);

+        }

+        if (*(place = nargv[red_optind]) != '-' || place[1] == '\0') {

+            place = EMSG;       /* found non-option */

+            if (flags & FLAG_ALLARGS) {

+                /*

+                 * GNU extension:

+                 * return non-option as argument to option 1

+                 */

+                red_optarg = nargv[red_optind++];

+                return (INORDER);

+            }

+            if (!(flags & FLAG_PERMUTE)) {

+                /*

+                 * If no permutation wanted, stop parsing

+                 * at first non-option.

+                 */

+                return (-1);

+            }

+            /* do permutation */

+            if (nonopt_start == -1)

+                nonopt_start = red_optind;

+            else if (nonopt_end != -1) {

+                permute_args(nonopt_start, nonopt_end,

+                    red_optind, nargv);

+                nonopt_start = red_optind -

+                    (nonopt_end - nonopt_start);

+                nonopt_end = -1;

+            }

+            red_optind++;

+            /* process next argument */

+            goto start;

+        }

+        if (nonopt_start != -1 && nonopt_end == -1)

+            nonopt_end = red_optind;

+

+        /*

+         * If we have "-" do nothing, if "--" we are done.

+         */

+        if (place[1] != '\0' && *++place == '-' && place[1] == '\0') {

+            red_optind++;

+            place = EMSG;

+            /*

+             * We found an option (--), so if we skipped

+             * non-options, we have to permute.

+             */

+            if (nonopt_end != -1) {

+                permute_args(nonopt_start, nonopt_end,

+                    red_optind, nargv);

+                red_optind -= nonopt_end - nonopt_start;

+            }

+            nonopt_start = nonopt_end = -1;

+            return (-1);

+        }

+    }

+

+    /*

+     * Check long options if:

+     *  1) we were passed some

+     *  2) the arg is not just "-"

+     *  3) either the arg starts with -- we are RedGetoptLongOnly()

+     */

+    if (long_options != NULL && place != nargv[red_optind] &&

+        (*place == '-' || (flags & FLAG_LONGONLY))) {

+        short_too = 0;

+        dash_prefix = D_PREFIX;

+        if (*place == '-') {

+            place++;        /* --foo long option */

+            dash_prefix = DD_PREFIX;

+        } else if (*place != ':' && strchr(options, *place) != NULL)

+            short_too = 1;      /* could be short option too */

+

+        optchar = parse_long_options(nargv, options, long_options,

+            idx, short_too, flags);

+        if (optchar != -1) {

+            place = EMSG;

+            return (optchar);

+        }

+    }

+

+    if ((optchar = (int)*place++) == (int)':' ||

+        (optchar == (int)'-' && *place != '\0') ||

+        (oli = strchr(options, optchar)) == NULL) {

+        /*

+         * If the user specified "-" and  '-' isn't listed in

+         * options, return -1 (non-option) as per POSIX.

+         * Otherwise, it is an unknown option character (or ':').

+         */

+        if (optchar == (int)'-' && *place == '\0')

+            return (-1);

+        if (!*place)

+            ++red_optind;

+        if (PRINT_ERROR)

+            fprintf(stderr, gnuoptchar, optchar);

+        red_optopt = optchar;

+        return (BADCH);

+    }

+    if (long_options != NULL && optchar == 'W' && oli[1] == ';') {

+        /* -W long-option */

+        if (*place)         /* no space */

+            /* NOTHING */;

+        else if (++red_optind >= nargc) {   /* no arg */

+            place = EMSG;

+            if (PRINT_ERROR)

+                fprintf(stderr, recargchar, optchar);

+            red_optopt = optchar;

+            return (BADARG);

+        } else              /* white space */

+            place = nargv[red_optind];

+        dash_prefix = W_PREFIX;

+        optchar = parse_long_options(nargv, options, long_options,

+            idx, 0, flags);

+        place = EMSG;

+        return (optchar);

+    }

+    if (*++oli != ':') {            /* doesn't take argument */

+        if (!*place)

+            ++red_optind;

+    } else {                /* takes (optional) argument */

+        red_optarg = NULL;

+        if (*place)         /* no white space */

+            red_optarg = place;

+        else if (oli[1] != ':') {   /* arg not optional */

+            if (++red_optind >= nargc) {    /* no arg */

+                place = EMSG;

+                if (PRINT_ERROR)

+                    fprintf(stderr, recargchar, optchar);

+                red_optopt = optchar;

+                return (BADARG);

+            } else

+                red_optarg = nargv[red_optind];

+        }

+        place = EMSG;

+        ++red_optind;

+    }

+    /* dump back option letter */

+    return (optchar);

+}

+

+

+/** @brief Get option character from command line argument list.

+

+    For more details, consult the getopt() man pages, since this function is

+    generally similar.

+

+    @param nargc    Number of arguments (argc passed into main()).

+    @param nargv    Argument vector (argv passed into main()).

+    @param options  String of option characters.

+

+    @return The next known option character in @p options.  If a character not

+            found in @p options is found or if an option is missing an argument,

+            it returns '?'.  Returns -1 when the argument list is exhausted.

+*/

+int32_t RedGetopt(

+    int32_t         nargc,

+    char * const   *nargv,

+    const char     *options)

+{

+    return getopt_internal(nargc, nargv, options, NULL, NULL, FLAG_PERMUTE);

+}

+

+

+/** @brief Get long options from command line argument list.

+

+    For more details, consult the getopt_long() man pages, since this function

+    is generally similar.

+

+    @param nargc        Number of arguments (argc passed into main()).

+    @param nargv        Argument vector (argv passed into main()).

+    @param options      String of option characters.

+    @param long_options The long options; the last element of this array must be

+                        filled with zeroes.

+    @param idx          If non-NULL, then populated with the index of the long

+                        option relative to @p long_options.

+

+    @return If the flag field in REDOPTION is NULL, returns the value specified

+            in the val field, which is usually just the corresponding short

+            option.  If flag is non-NULL, returns zero and stores val in the

+            location pointed to by flag.  Returns ':' if an option was missing

+            its argument, '?' for an unknown option, and -1 when the argument

+            list is exhausted.

+*/

+int32_t RedGetoptLong(

+    int32_t             nargc,

+    char * const       *nargv,

+    const char         *options,

+    const REDOPTION    *long_options,

+    int32_t            *idx)

+{

+    return getopt_internal(nargc, nargv, options, long_options, idx, FLAG_PERMUTE);

+}

+

diff --git a/FreeRTOS-Plus/Source/Reliance-Edge/toolcmn/toolcmn.c b/FreeRTOS-Plus/Source/Reliance-Edge/toolcmn/toolcmn.c
new file mode 100644
index 0000000..0ad2b64
--- /dev/null
+++ b/FreeRTOS-Plus/Source/Reliance-Edge/toolcmn/toolcmn.c
@@ -0,0 +1,99 @@
+/*             ----> DO NOT REMOVE THE FOLLOWING NOTICE <----

+

+                   Copyright (c) 2014-2015 Datalight, Inc.

+                       All Rights Reserved Worldwide.

+

+    This program is free software; you can redistribute it and/or modify

+    it under the terms of the GNU General Public License as published by

+    the Free Software Foundation; use version 2 of the License.

+

+    This program is distributed in the hope that it will be useful,

+    but "AS-IS," WITHOUT ANY WARRANTY; without even the implied warranty

+    of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the

+    GNU General Public License for more details.

+

+    You should have received a copy of the GNU General Public License along

+    with this program; if not, write to the Free Software Foundation, Inc.,

+    51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.

+*/

+/*  Businesses and individuals that for commercial or other reasons cannot

+    comply with the terms of the GPLv2 license may obtain a commercial license

+    before incorporating Reliance Edge into proprietary software for

+    distribution in any form.  Visit http://www.datalight.com/reliance-edge for

+    more information.

+*/

+/** @file

+    @brief Implements common-code utilities for tools and tests.

+*/

+#include <stdio.h>

+#include <stdlib.h>

+#include <errno.h>

+#include <limits.h>

+

+#include <redfs.h>

+#include <redcoreapi.h>

+#include <redvolume.h>

+#include <redtoolcmn.h>

+

+

+/** @brief Convert a string into a volume number.

+

+    In a POSIX-like configuration, @p pszVolume can either be a volume number or

+    a volume path prefix.  In case of ambiguity, the volume number of a matching

+    path prefix takes precedence.

+

+    In an FSE configuration, @p pszVolume can be a volume number.

+

+    @param pszVolume    The volume string.

+

+    @return On success, returns the volume number; on failure, returns

+            #REDCONF_VOLUME_COUNT.

+*/

+uint8_t RedFindVolumeNumber(

+    const char     *pszVolume)

+{

+    unsigned long   ulNumber;

+    const char     *pszEndPtr;

+    uint8_t         bVolNum = REDCONF_VOLUME_COUNT;

+  #if REDCONF_API_POSIX == 1

+    uint8_t         bIndex;

+  #endif

+

+    /*  Determine if pszVolume can be interpreted as a volume number.

+    */

+    errno = 0;

+    ulNumber = strtoul(pszVolume, (char **)&pszEndPtr, 10);

+    if((errno == 0) && (ulNumber != ULONG_MAX) && (pszEndPtr[0U] == '\0') && (ulNumber < REDCONF_VOLUME_COUNT))

+    {

+        bVolNum = (uint8_t)ulNumber;

+    }

+

+  #if REDCONF_API_POSIX == 1

+    /*  Determine if pszVolume is a valid path prefix.

+    */

+    for(bIndex = 0U; bIndex < REDCONF_VOLUME_COUNT; bIndex++)

+    {

+        if(strcmp(gaRedVolConf[bIndex].pszPathPrefix, pszVolume) == 0)

+        {

+            break;

+        }

+    }

+

+    if(bIndex < REDCONF_VOLUME_COUNT)

+    {

+        /*  Edge case: It is technically possible for pszVolume to be both a

+            valid volume number and a valid volume prefix, for different

+            volumes.  For example, if pszVolume is "2", that would be recognized

+            as volume number 2 above.  But if "2" is the (poorly chosen) path

+            prefix for volume number 4, that would also be matched.  Since the

+            POSIX-like API is primarily name based, and the ability to use

+            volume numbers with this tool is just a convenience, the volume

+            prefix takes precedence.

+        */

+        bVolNum = bIndex;

+    }

+  #endif

+

+    return bVolNum;

+}

+

diff --git a/FreeRTOS-Plus/Source/Reliance-Edge/util/bitmap.c b/FreeRTOS-Plus/Source/Reliance-Edge/util/bitmap.c
new file mode 100644
index 0000000..c09d3c9
--- /dev/null
+++ b/FreeRTOS-Plus/Source/Reliance-Edge/util/bitmap.c
@@ -0,0 +1,101 @@
+/*             ----> DO NOT REMOVE THE FOLLOWING NOTICE <----

+

+                   Copyright (c) 2014-2015 Datalight, Inc.

+                       All Rights Reserved Worldwide.

+

+    This program is free software; you can redistribute it and/or modify

+    it under the terms of the GNU General Public License as published by

+    the Free Software Foundation; use version 2 of the License.

+

+    This program is distributed in the hope that it will be useful,

+    but "AS-IS," WITHOUT ANY WARRANTY; without even the implied warranty

+    of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the

+    GNU General Public License for more details.

+

+    You should have received a copy of the GNU General Public License along

+    with this program; if not, write to the Free Software Foundation, Inc.,

+    51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.

+*/

+/*  Businesses and individuals that for commercial or other reasons cannot

+    comply with the terms of the GPLv2 license may obtain a commercial license

+    before incorporating Reliance Edge into proprietary software for

+    distribution in any form.  Visit http://www.datalight.com/reliance-edge for

+    more information.

+*/

+/** @file

+    @brief Implements utilities for working with bitmaps.

+*/

+#include <redfs.h>

+

+

+/** @brief Query the state of a bit in a bitmap.

+

+    Bits are counted from most significant to least significant.  Thus, the mask

+    for bit zero is 0x80 applied to the first byte in the bitmap.

+

+    @param pbBitmap Pointer to the bitmap.

+    @param ulBit    The bit to query.

+

+    @retval Whether the bit is set (true) or clear (false.

+*/

+bool RedBitGet(

+    const uint8_t *pbBitmap,

+    uint32_t       ulBit)

+{

+    bool           fRet;

+

+    if(pbBitmap == NULL)

+    {

+        REDERROR();

+        fRet = false;

+    }

+    else

+    {

+        fRet = (pbBitmap[ulBit >> 3U] & (0x80U >> (ulBit & 7U))) != 0U;

+    }

+

+    return fRet;

+}

+

+

+/** @brief Set a bit in a bitmap to one.

+

+    Bits are counted from most significant to least significant.  Thus, the mask

+    for bit zero is 0x80 applied to the first byte in the bitmap.

+

+    @param pbBitmap Pointer to the bitmap.

+    @param ulBit    The bit to set.

+*/

+void RedBitSet(

+    uint8_t *pbBitmap,

+    uint32_t ulBit)

+{

+    REDASSERT(pbBitmap != NULL);

+

+    if(pbBitmap != NULL)

+    {

+        pbBitmap[ulBit >> 3U] |= (0x80U >> (ulBit & 7U));

+    }

+}

+

+

+/** @brief Clear a bit in a bitmap to zero.

+

+    Bits are counted from most significant to least significant.  Thus, the mask

+    for bit zero is 0x80 applied to the first byte in the bitmap.

+

+    @param pbBitmap Pointer to the bitmap.

+    @param ulBit    The bit to clear.

+*/

+void RedBitClear(

+    uint8_t *pbBitmap,

+    uint32_t ulBit)

+{

+    REDASSERT(pbBitmap != NULL);

+

+    if(pbBitmap != NULL)

+    {

+        pbBitmap[ulBit >> 3U] &= ~(0x80U >> (ulBit & 7U));

+    }

+}

+

diff --git a/FreeRTOS-Plus/Source/Reliance-Edge/util/crc.c b/FreeRTOS-Plus/Source/Reliance-Edge/util/crc.c
new file mode 100644
index 0000000..7ed15cb
--- /dev/null
+++ b/FreeRTOS-Plus/Source/Reliance-Edge/util/crc.c
@@ -0,0 +1,598 @@
+/*             ----> DO NOT REMOVE THE FOLLOWING NOTICE <----

+

+                   Copyright (c) 2014-2015 Datalight, Inc.

+                       All Rights Reserved Worldwide.

+

+    This program is free software; you can redistribute it and/or modify

+    it under the terms of the GNU General Public License as published by

+    the Free Software Foundation; use version 2 of the License.

+

+    This program is distributed in the hope that it will be useful,

+    but "AS-IS," WITHOUT ANY WARRANTY; without even the implied warranty

+    of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the

+    GNU General Public License for more details.

+

+    You should have received a copy of the GNU General Public License along

+    with this program; if not, write to the Free Software Foundation, Inc.,

+    51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.

+*/

+/*  Businesses and individuals that for commercial or other reasons cannot

+    comply with the terms of the GPLv2 license may obtain a commercial license

+    before incorporating Reliance Edge into proprietary software for

+    distribution in any form.  Visit http://www.datalight.com/reliance-edge for

+    more information.

+*/

+/** @file

+    @brief Implements utilities for calculating CRC-32 checksums.

+*/

+#include <redfs.h>

+

+

+/*  The CRC functions do not return errors since the only detectable error

+    condition is a NULL buffer pointer.  If such a condition does arise, the

+    functions assert and return the below CRC, which, although a legal CRC,

+    is nonetheless suspicious and could provide a clue that something has

+    gone wrong.

+*/

+#define SUSPICIOUS_CRC_VALUE    (0xBAADC0DEU)

+

+#define CRC_BITWISE     (0U)

+#define CRC_SARWATE     (1U)

+#define CRC_SLICEBY8    (2U)

+

+

+#if REDCONF_CRC_ALGORITHM == CRC_BITWISE

+

+/*  The following is representative of the polynomial accepted by CCITT 32-bit

+    and in IEEE 802.3, Ethernet 2 specification.

+

+    x^32+x^26+x^23+x^22+x^16+x^12+x^11+x^10+x^8+x^7+x^5+x^4+x^2+x+1

+       (reverse order)

+    1110 1101 1011 1000 1000 0011 0010 0000 1

+     (E)  (D)  (B)  (8)  (8)  (3)  (2)  (0)

+*/

+#define CCITT_32_POLYNOMIAL (0xEDB88320U)

+

+

+/** @brief Compute a CRC32 for the given data buffer.

+

+    For CCITT-32 compliance, the initial CRC must be set to 0.  To CRC multiple

+    buffers, call this function with the previously returned CRC value.

+

+    @param ulInitCrc32  Starting CRC value.

+    @param pBuffer      Data buffer to calculate the CRC from.

+    @param ulLength     Number of bytes of data in the given buffer.

+

+    @return The updated CRC value.

+*/

+uint32_t RedCrc32Update(

+    uint32_t    ulInitCrc32,

+    const void *pBuffer,

+    uint32_t    ulLength)

+{

+    uint32_t    ulCrc32;

+

+    if(pBuffer == NULL)

+    {

+        REDERROR();

+        ulCrc32 = SUSPICIOUS_CRC_VALUE;

+    }

+    else

+    {

+        const uint8_t  *pbBuffer = CAST_VOID_PTR_TO_CONST_UINT8_PTR(pBuffer);

+        uint32_t        ulIdx;

+

+        ulCrc32 = ~ulInitCrc32;

+

+        for(ulIdx = 0U; ulIdx < ulLength; ++ulIdx)

+        {

+            uint32_t ulBit;

+

+            ulCrc32 ^= pbBuffer[ulIdx];

+

+            /*  Branchless inner loop (greatly improves performance).

+            */

+            for(ulBit = 0U; ulBit < 8U; ulBit++)

+            {

+                ulCrc32 = ((ulCrc32 & 1U) * CCITT_32_POLYNOMIAL) ^ (ulCrc32 >> 1U);

+            }

+        }

+

+        ulCrc32 = ~ulCrc32;

+    }

+

+    return ulCrc32;

+}

+

+#elif REDCONF_CRC_ALGORITHM == CRC_SARWATE

+

+/** @brief Compute a CRC32 for the given data buffer.

+

+    For CCITT-32 compliance, the initial CRC must be set to 0.  To CRC multiple

+    buffers, call this function with the previously returned CRC value.

+

+    @param ulInitCrc32  Starting CRC value.

+    @param pBuffer      Data buffer to calculate the CRC from.

+    @param ulLength     Number of bytes of data in the given buffer.

+

+    @return The updated CRC value.

+*/

+uint32_t RedCrc32Update(

+    uint32_t    ulInitCrc32,

+    const void *pBuffer,

+    uint32_t    ulLength)

+{

+    static const uint32_t aulCrc32Table[] =

+    {

+        0x00000000U, 0x77073096U, 0xEE0E612CU, 0x990951BAU, 0x076DC419U, 0x706AF48FU, 0xE963A535U, 0x9E6495A3U,

+        0x0EDB8832U, 0x79DCB8A4U, 0xE0D5E91EU, 0x97D2D988U, 0x09B64C2BU, 0x7EB17CBDU, 0xE7B82D07U, 0x90BF1D91U,

+        0x1DB71064U, 0x6AB020F2U, 0xF3B97148U, 0x84BE41DEU, 0x1ADAD47DU, 0x6DDDE4EBU, 0xF4D4B551U, 0x83D385C7U,

+        0x136C9856U, 0x646BA8C0U, 0xFD62F97AU, 0x8A65C9ECU, 0x14015C4FU, 0x63066CD9U, 0xFA0F3D63U, 0x8D080DF5U,

+        0x3B6E20C8U, 0x4C69105EU, 0xD56041E4U, 0xA2677172U, 0x3C03E4D1U, 0x4B04D447U, 0xD20D85FDU, 0xA50AB56BU,

+        0x35B5A8FAU, 0x42B2986CU, 0xDBBBC9D6U, 0xACBCF940U, 0x32D86CE3U, 0x45DF5C75U, 0xDCD60DCFU, 0xABD13D59U,

+        0x26D930ACU, 0x51DE003AU, 0xC8D75180U, 0xBFD06116U, 0x21B4F4B5U, 0x56B3C423U, 0xCFBA9599U, 0xB8BDA50FU,

+        0x2802B89EU, 0x5F058808U, 0xC60CD9B2U, 0xB10BE924U, 0x2F6F7C87U, 0x58684C11U, 0xC1611DABU, 0xB6662D3DU,

+        0x76DC4190U, 0x01DB7106U, 0x98D220BCU, 0xEFD5102AU, 0x71B18589U, 0x06B6B51FU, 0x9FBFE4A5U, 0xE8B8D433U,

+        0x7807C9A2U, 0x0F00F934U, 0x9609A88EU, 0xE10E9818U, 0x7F6A0DBBU, 0x086D3D2DU, 0x91646C97U, 0xE6635C01U,

+        0x6B6B51F4U, 0x1C6C6162U, 0x856530D8U, 0xF262004EU, 0x6C0695EDU, 0x1B01A57BU, 0x8208F4C1U, 0xF50FC457U,

+        0x65B0D9C6U, 0x12B7E950U, 0x8BBEB8EAU, 0xFCB9887CU, 0x62DD1DDFU, 0x15DA2D49U, 0x8CD37CF3U, 0xFBD44C65U,

+        0x4DB26158U, 0x3AB551CEU, 0xA3BC0074U, 0xD4BB30E2U, 0x4ADFA541U, 0x3DD895D7U, 0xA4D1C46DU, 0xD3D6F4FBU,

+        0x4369E96AU, 0x346ED9FCU, 0xAD678846U, 0xDA60B8D0U, 0x44042D73U, 0x33031DE5U, 0xAA0A4C5FU, 0xDD0D7CC9U,

+        0x5005713CU, 0x270241AAU, 0xBE0B1010U, 0xC90C2086U, 0x5768B525U, 0x206F85B3U, 0xB966D409U, 0xCE61E49FU,

+        0x5EDEF90EU, 0x29D9C998U, 0xB0D09822U, 0xC7D7A8B4U, 0x59B33D17U, 0x2EB40D81U, 0xB7BD5C3BU, 0xC0BA6CADU,

+        0xEDB88320U, 0x9ABFB3B6U, 0x03B6E20CU, 0x74B1D29AU, 0xEAD54739U, 0x9DD277AFU, 0x04DB2615U, 0x73DC1683U,

+        0xE3630B12U, 0x94643B84U, 0x0D6D6A3EU, 0x7A6A5AA8U, 0xE40ECF0BU, 0x9309FF9DU, 0x0A00AE27U, 0x7D079EB1U,

+        0xF00F9344U, 0x8708A3D2U, 0x1E01F268U, 0x6906C2FEU, 0xF762575DU, 0x806567CBU, 0x196C3671U, 0x6E6B06E7U,

+        0xFED41B76U, 0x89D32BE0U, 0x10DA7A5AU, 0x67DD4ACCU, 0xF9B9DF6FU, 0x8EBEEFF9U, 0x17B7BE43U, 0x60B08ED5U,

+        0xD6D6A3E8U, 0xA1D1937EU, 0x38D8C2C4U, 0x4FDFF252U, 0xD1BB67F1U, 0xA6BC5767U, 0x3FB506DDU, 0x48B2364BU,

+        0xD80D2BDAU, 0xAF0A1B4CU, 0x36034AF6U, 0x41047A60U, 0xDF60EFC3U, 0xA867DF55U, 0x316E8EEFU, 0x4669BE79U,

+        0xCB61B38CU, 0xBC66831AU, 0x256FD2A0U, 0x5268E236U, 0xCC0C7795U, 0xBB0B4703U, 0x220216B9U, 0x5505262FU,

+        0xC5BA3BBEU, 0xB2BD0B28U, 0x2BB45A92U, 0x5CB36A04U, 0xC2D7FFA7U, 0xB5D0CF31U, 0x2CD99E8BU, 0x5BDEAE1DU,

+        0x9B64C2B0U, 0xEC63F226U, 0x756AA39CU, 0x026D930AU, 0x9C0906A9U, 0xEB0E363FU, 0x72076785U, 0x05005713U,

+        0x95BF4A82U, 0xE2B87A14U, 0x7BB12BAEU, 0x0CB61B38U, 0x92D28E9BU, 0xE5D5BE0DU, 0x7CDCEFB7U, 0x0BDBDF21U,

+        0x86D3D2D4U, 0xF1D4E242U, 0x68DDB3F8U, 0x1FDA836EU, 0x81BE16CDU, 0xF6B9265BU, 0x6FB077E1U, 0x18B74777U,

+        0x88085AE6U, 0xFF0F6A70U, 0x66063BCAU, 0x11010B5CU, 0x8F659EFFU, 0xF862AE69U, 0x616BFFD3U, 0x166CCF45U,

+        0xA00AE278U, 0xD70DD2EEU, 0x4E048354U, 0x3903B3C2U, 0xA7672661U, 0xD06016F7U, 0x4969474DU, 0x3E6E77DBU,

+        0xAED16A4AU, 0xD9D65ADCU, 0x40DF0B66U, 0x37D83BF0U, 0xA9BCAE53U, 0xDEBB9EC5U, 0x47B2CF7FU, 0x30B5FFE9U,

+        0xBDBDF21CU, 0xCABAC28AU, 0x53B39330U, 0x24B4A3A6U, 0xBAD03605U, 0xCDD70693U, 0x54DE5729U, 0x23D967BFU,

+        0xB3667A2EU, 0xC4614AB8U, 0x5D681B02U, 0x2A6F2B94U, 0xB40BBE37U, 0xC30C8EA1U, 0x5A05DF1BU, 0x2D02EF8DU,

+    };

+

+    uint32_t ulCrc32;

+

+    if(pBuffer == NULL)

+    {

+        REDERROR();

+        ulCrc32 = SUSPICIOUS_CRC_VALUE;

+    }

+    else

+    {

+        const uint8_t  *pbBuffer = CAST_VOID_PTR_TO_CONST_UINT8_PTR(pBuffer);

+        uint32_t        ulIdx;

+

+        ulCrc32 = ~ulInitCrc32;

+

+        for(ulIdx = 0U; ulIdx < ulLength; ++ulIdx)

+        {

+            ulCrc32 = (ulCrc32 >> 8U) ^ aulCrc32Table[(ulCrc32 ^ pbBuffer[ulIdx]) & 0xFFU];

+        }

+

+        ulCrc32 = ~ulCrc32;

+    }

+

+    return ulCrc32;

+}

+

+#elif REDCONF_CRC_ALGORITHM == CRC_SLICEBY8

+

+

+/** @brief Compute a CRC32 for the given data buffer.

+

+    For CCITT-32 compliance, the initial CRC must be set to 0.  To CRC multiple

+    buffers, call this function with the previously returned CRC value.

+

+    @param ulInitCrc32  Starting CRC value.

+    @param pBuffer      Data buffer to calculate the CRC from.

+    @param ulLength     Number of bytes of data in the given buffer.

+

+    @return The updated CRC value.

+*/

+uint32_t RedCrc32Update(

+    uint32_t    ulInitCrc32,

+    const void *pBuffer,

+    uint32_t    ulLength)

+{

+    /*  CRC32 XOR table, with slicing-by-8 extensions.

+

+        This first column of the table contains the same XOR values as used in

+        the classic byte-at-a-time Sarwate algorithm.  The other seven columns

+        are derived from the first, and are used in Intel's slicing-by-eight CRC

+        algorithm.

+

+        The layout of this array in memory is novel and deserves explanation.

+        In other implementations, including Intel's example, each of the below

+        columns is an array.  The first column is a 256-entry array, followed by

+        another 256-entry array for the second column, etc.  Testing on both ARM

+        and x86 has shown the below mixed arrangement to be about 5-9% faster.

+        One possible explanation: With the array-per-table approach, each of the

+        eight table lookups is guaranteed to be in a separate 1 KB chunk of

+        memory.  With the below array, sometimes multiple table lookups will, by

+        coincidence, be close together, making better use of the cache.

+    */

+    static const uint32_t aulCrc32Table[] =

+    {

+        0x00000000U, 0x00000000U, 0x00000000U, 0x00000000U, 0x00000000U, 0x00000000U, 0x00000000U, 0x00000000U,

+        0x77073096U, 0x191B3141U, 0x01C26A37U, 0xB8BC6765U, 0x3D6029B0U, 0xCB5CD3A5U, 0xA6770BB4U, 0xCCAA009EU,

+        0xEE0E612CU, 0x32366282U, 0x0384D46EU, 0xAA09C88BU, 0x7AC05360U, 0x4DC8A10BU, 0x979F1129U, 0x4225077DU,

+        0x990951BAU, 0x2B2D53C3U, 0x0246BE59U, 0x12B5AFEEU, 0x47A07AD0U, 0x869472AEU, 0x31E81A9DU, 0x8E8F07E3U,

+        0x076DC419U, 0x646CC504U, 0x0709A8DCU, 0x8F629757U, 0xF580A6C0U, 0x9B914216U, 0xF44F2413U, 0x844A0EFAU,

+        0x706AF48FU, 0x7D77F445U, 0x06CBC2EBU, 0x37DEF032U, 0xC8E08F70U, 0x50CD91B3U, 0x52382FA7U, 0x48E00E64U,

+        0xE963A535U, 0x565AA786U, 0x048D7CB2U, 0x256B5FDCU, 0x8F40F5A0U, 0xD659E31DU, 0x63D0353AU, 0xC66F0987U,

+        0x9E6495A3U, 0x4F4196C7U, 0x054F1685U, 0x9DD738B9U, 0xB220DC10U, 0x1D0530B8U, 0xC5A73E8EU, 0x0AC50919U,

+        0x0EDB8832U, 0xC8D98A08U, 0x0E1351B8U, 0xC5B428EFU, 0x30704BC1U, 0xEC53826DU, 0x33EF4E67U, 0xD3E51BB5U,

+        0x79DCB8A4U, 0xD1C2BB49U, 0x0FD13B8FU, 0x7D084F8AU, 0x0D106271U, 0x270F51C8U, 0x959845D3U, 0x1F4F1B2BU,

+        0xE0D5E91EU, 0xFAEFE88AU, 0x0D9785D6U, 0x6FBDE064U, 0x4AB018A1U, 0xA19B2366U, 0xA4705F4EU, 0x91C01CC8U,

+        0x97D2D988U, 0xE3F4D9CBU, 0x0C55EFE1U, 0xD7018701U, 0x77D03111U, 0x6AC7F0C3U, 0x020754FAU, 0x5D6A1C56U,

+        0x09B64C2BU, 0xACB54F0CU, 0x091AF964U, 0x4AD6BFB8U, 0xC5F0ED01U, 0x77C2C07BU, 0xC7A06A74U, 0x57AF154FU,

+        0x7EB17CBDU, 0xB5AE7E4DU, 0x08D89353U, 0xF26AD8DDU, 0xF890C4B1U, 0xBC9E13DEU, 0x61D761C0U, 0x9B0515D1U,

+        0xE7B82D07U, 0x9E832D8EU, 0x0A9E2D0AU, 0xE0DF7733U, 0xBF30BE61U, 0x3A0A6170U, 0x503F7B5DU, 0x158A1232U,

+        0x90BF1D91U, 0x87981CCFU, 0x0B5C473DU, 0x58631056U, 0x825097D1U, 0xF156B2D5U, 0xF64870E9U, 0xD92012ACU,

+        0x1DB71064U, 0x4AC21251U, 0x1C26A370U, 0x5019579FU, 0x60E09782U, 0x03D6029BU, 0x67DE9CCEU, 0x7CBB312BU,

+        0x6AB020F2U, 0x53D92310U, 0x1DE4C947U, 0xE8A530FAU, 0x5D80BE32U, 0xC88AD13EU, 0xC1A9977AU, 0xB01131B5U,

+        0xF3B97148U, 0x78F470D3U, 0x1FA2771EU, 0xFA109F14U, 0x1A20C4E2U, 0x4E1EA390U, 0xF0418DE7U, 0x3E9E3656U,

+        0x84BE41DEU, 0x61EF4192U, 0x1E601D29U, 0x42ACF871U, 0x2740ED52U, 0x85427035U, 0x56368653U, 0xF23436C8U,

+        0x1ADAD47DU, 0x2EAED755U, 0x1B2F0BACU, 0xDF7BC0C8U, 0x95603142U, 0x9847408DU, 0x9391B8DDU, 0xF8F13FD1U,

+        0x6DDDE4EBU, 0x37B5E614U, 0x1AED619BU, 0x67C7A7ADU, 0xA80018F2U, 0x531B9328U, 0x35E6B369U, 0x345B3F4FU,

+        0xF4D4B551U, 0x1C98B5D7U, 0x18ABDFC2U, 0x75720843U, 0xEFA06222U, 0xD58FE186U, 0x040EA9F4U, 0xBAD438ACU,

+        0x83D385C7U, 0x05838496U, 0x1969B5F5U, 0xCDCE6F26U, 0xD2C04B92U, 0x1ED33223U, 0xA279A240U, 0x767E3832U,

+        0x136C9856U, 0x821B9859U, 0x1235F2C8U, 0x95AD7F70U, 0x5090DC43U, 0xEF8580F6U, 0x5431D2A9U, 0xAF5E2A9EU,

+        0x646BA8C0U, 0x9B00A918U, 0x13F798FFU, 0x2D111815U, 0x6DF0F5F3U, 0x24D95353U, 0xF246D91DU, 0x63F42A00U,

+        0xFD62F97AU, 0xB02DFADBU, 0x11B126A6U, 0x3FA4B7FBU, 0x2A508F23U, 0xA24D21FDU, 0xC3AEC380U, 0xED7B2DE3U,

+        0x8A65C9ECU, 0xA936CB9AU, 0x10734C91U, 0x8718D09EU, 0x1730A693U, 0x6911F258U, 0x65D9C834U, 0x21D12D7DU,

+        0x14015C4FU, 0xE6775D5DU, 0x153C5A14U, 0x1ACFE827U, 0xA5107A83U, 0x7414C2E0U, 0xA07EF6BAU, 0x2B142464U,

+        0x63066CD9U, 0xFF6C6C1CU, 0x14FE3023U, 0xA2738F42U, 0x98705333U, 0xBF481145U, 0x0609FD0EU, 0xE7BE24FAU,

+        0xFA0F3D63U, 0xD4413FDFU, 0x16B88E7AU, 0xB0C620ACU, 0xDFD029E3U, 0x39DC63EBU, 0x37E1E793U, 0x69312319U,

+        0x8D080DF5U, 0xCD5A0E9EU, 0x177AE44DU, 0x087A47C9U, 0xE2B00053U, 0xF280B04EU, 0x9196EC27U, 0xA59B2387U,

+        0x3B6E20C8U, 0x958424A2U, 0x384D46E0U, 0xA032AF3EU, 0xC1C12F04U, 0x07AC0536U, 0xCFBD399CU, 0xF9766256U,

+        0x4C69105EU, 0x8C9F15E3U, 0x398F2CD7U, 0x188EC85BU, 0xFCA106B4U, 0xCCF0D693U, 0x69CA3228U, 0x35DC62C8U,

+        0xD56041E4U, 0xA7B24620U, 0x3BC9928EU, 0x0A3B67B5U, 0xBB017C64U, 0x4A64A43DU, 0x582228B5U, 0xBB53652BU,

+        0xA2677172U, 0xBEA97761U, 0x3A0BF8B9U, 0xB28700D0U, 0x866155D4U, 0x81387798U, 0xFE552301U, 0x77F965B5U,

+        0x3C03E4D1U, 0xF1E8E1A6U, 0x3F44EE3CU, 0x2F503869U, 0x344189C4U, 0x9C3D4720U, 0x3BF21D8FU, 0x7D3C6CACU,

+        0x4B04D447U, 0xE8F3D0E7U, 0x3E86840BU, 0x97EC5F0CU, 0x0921A074U, 0x57619485U, 0x9D85163BU, 0xB1966C32U,

+        0xD20D85FDU, 0xC3DE8324U, 0x3CC03A52U, 0x8559F0E2U, 0x4E81DAA4U, 0xD1F5E62BU, 0xAC6D0CA6U, 0x3F196BD1U,

+        0xA50AB56BU, 0xDAC5B265U, 0x3D025065U, 0x3DE59787U, 0x73E1F314U, 0x1AA9358EU, 0x0A1A0712U, 0xF3B36B4FU,

+        0x35B5A8FAU, 0x5D5DAEAAU, 0x365E1758U, 0x658687D1U, 0xF1B164C5U, 0xEBFF875BU, 0xFC5277FBU, 0x2A9379E3U,

+        0x42B2986CU, 0x44469FEBU, 0x379C7D6FU, 0xDD3AE0B4U, 0xCCD14D75U, 0x20A354FEU, 0x5A257C4FU, 0xE639797DU,

+        0xDBBBC9D6U, 0x6F6BCC28U, 0x35DAC336U, 0xCF8F4F5AU, 0x8B7137A5U, 0xA6372650U, 0x6BCD66D2U, 0x68B67E9EU,

+        0xACBCF940U, 0x7670FD69U, 0x3418A901U, 0x7733283FU, 0xB6111E15U, 0x6D6BF5F5U, 0xCDBA6D66U, 0xA41C7E00U,

+        0x32D86CE3U, 0x39316BAEU, 0x3157BF84U, 0xEAE41086U, 0x0431C205U, 0x706EC54DU, 0x081D53E8U, 0xAED97719U,

+        0x45DF5C75U, 0x202A5AEFU, 0x3095D5B3U, 0x525877E3U, 0x3951EBB5U, 0xBB3216E8U, 0xAE6A585CU, 0x62737787U,

+        0xDCD60DCFU, 0x0B07092CU, 0x32D36BEAU, 0x40EDD80DU, 0x7EF19165U, 0x3DA66446U, 0x9F8242C1U, 0xECFC7064U,

+        0xABD13D59U, 0x121C386DU, 0x331101DDU, 0xF851BF68U, 0x4391B8D5U, 0xF6FAB7E3U, 0x39F54975U, 0x205670FAU,

+        0x26D930ACU, 0xDF4636F3U, 0x246BE590U, 0xF02BF8A1U, 0xA121B886U, 0x047A07ADU, 0xA863A552U, 0x85CD537DU,

+        0x51DE003AU, 0xC65D07B2U, 0x25A98FA7U, 0x48979FC4U, 0x9C419136U, 0xCF26D408U, 0x0E14AEE6U, 0x496753E3U,

+        0xC8D75180U, 0xED705471U, 0x27EF31FEU, 0x5A22302AU, 0xDBE1EBE6U, 0x49B2A6A6U, 0x3FFCB47BU, 0xC7E85400U,

+        0xBFD06116U, 0xF46B6530U, 0x262D5BC9U, 0xE29E574FU, 0xE681C256U, 0x82EE7503U, 0x998BBFCFU, 0x0B42549EU,

+        0x21B4F4B5U, 0xBB2AF3F7U, 0x23624D4CU, 0x7F496FF6U, 0x54A11E46U, 0x9FEB45BBU, 0x5C2C8141U, 0x01875D87U,

+        0x56B3C423U, 0xA231C2B6U, 0x22A0277BU, 0xC7F50893U, 0x69C137F6U, 0x54B7961EU, 0xFA5B8AF5U, 0xCD2D5D19U,

+        0xCFBA9599U, 0x891C9175U, 0x20E69922U, 0xD540A77DU, 0x2E614D26U, 0xD223E4B0U, 0xCBB39068U, 0x43A25AFAU,

+        0xB8BDA50FU, 0x9007A034U, 0x2124F315U, 0x6DFCC018U, 0x13016496U, 0x197F3715U, 0x6DC49BDCU, 0x8F085A64U,

+        0x2802B89EU, 0x179FBCFBU, 0x2A78B428U, 0x359FD04EU, 0x9151F347U, 0xE82985C0U, 0x9B8CEB35U, 0x562848C8U,

+        0x5F058808U, 0x0E848DBAU, 0x2BBADE1FU, 0x8D23B72BU, 0xAC31DAF7U, 0x23755665U, 0x3DFBE081U, 0x9A824856U,

+        0xC60CD9B2U, 0x25A9DE79U, 0x29FC6046U, 0x9F9618C5U, 0xEB91A027U, 0xA5E124CBU, 0x0C13FA1CU, 0x140D4FB5U,

+        0xB10BE924U, 0x3CB2EF38U, 0x283E0A71U, 0x272A7FA0U, 0xD6F18997U, 0x6EBDF76EU, 0xAA64F1A8U, 0xD8A74F2BU,

+        0x2F6F7C87U, 0x73F379FFU, 0x2D711CF4U, 0xBAFD4719U, 0x64D15587U, 0x73B8C7D6U, 0x6FC3CF26U, 0xD2624632U,

+        0x58684C11U, 0x6AE848BEU, 0x2CB376C3U, 0x0241207CU, 0x59B17C37U, 0xB8E41473U, 0xC9B4C492U, 0x1EC846ACU,

+        0xC1611DABU, 0x41C51B7DU, 0x2EF5C89AU, 0x10F48F92U, 0x1E1106E7U, 0x3E7066DDU, 0xF85CDE0FU, 0x9047414FU,

+        0xB6662D3DU, 0x58DE2A3CU, 0x2F37A2ADU, 0xA848E8F7U, 0x23712F57U, 0xF52CB578U, 0x5E2BD5BBU, 0x5CED41D1U,

+        0x76DC4190U, 0xF0794F05U, 0x709A8DC0U, 0x9B14583DU, 0x58F35849U, 0x0F580A6CU, 0x440B7579U, 0x299DC2EDU,

+        0x01DB7106U, 0xE9627E44U, 0x7158E7F7U, 0x23A83F58U, 0x659371F9U, 0xC404D9C9U, 0xE27C7ECDU, 0xE537C273U,

+        0x98D220BCU, 0xC24F2D87U, 0x731E59AEU, 0x311D90B6U, 0x22330B29U, 0x4290AB67U, 0xD3946450U, 0x6BB8C590U,

+        0xEFD5102AU, 0xDB541CC6U, 0x72DC3399U, 0x89A1F7D3U, 0x1F532299U, 0x89CC78C2U, 0x75E36FE4U, 0xA712C50EU,

+        0x71B18589U, 0x94158A01U, 0x7793251CU, 0x1476CF6AU, 0xAD73FE89U, 0x94C9487AU, 0xB044516AU, 0xADD7CC17U,

+        0x06B6B51FU, 0x8D0EBB40U, 0x76514F2BU, 0xACCAA80FU, 0x9013D739U, 0x5F959BDFU, 0x16335ADEU, 0x617DCC89U,

+        0x9FBFE4A5U, 0xA623E883U, 0x7417F172U, 0xBE7F07E1U, 0xD7B3ADE9U, 0xD901E971U, 0x27DB4043U, 0xEFF2CB6AU,

+        0xE8B8D433U, 0xBF38D9C2U, 0x75D59B45U, 0x06C36084U, 0xEAD38459U, 0x125D3AD4U, 0x81AC4BF7U, 0x2358CBF4U,

+        0x7807C9A2U, 0x38A0C50DU, 0x7E89DC78U, 0x5EA070D2U, 0x68831388U, 0xE30B8801U, 0x77E43B1EU, 0xFA78D958U,

+        0x0F00F934U, 0x21BBF44CU, 0x7F4BB64FU, 0xE61C17B7U, 0x55E33A38U, 0x28575BA4U, 0xD19330AAU, 0x36D2D9C6U,

+        0x9609A88EU, 0x0A96A78FU, 0x7D0D0816U, 0xF4A9B859U, 0x124340E8U, 0xAEC3290AU, 0xE07B2A37U, 0xB85DDE25U,

+        0xE10E9818U, 0x138D96CEU, 0x7CCF6221U, 0x4C15DF3CU, 0x2F236958U, 0x659FFAAFU, 0x460C2183U, 0x74F7DEBBU,

+        0x7F6A0DBBU, 0x5CCC0009U, 0x798074A4U, 0xD1C2E785U, 0x9D03B548U, 0x789ACA17U, 0x83AB1F0DU, 0x7E32D7A2U,

+        0x086D3D2DU, 0x45D73148U, 0x78421E93U, 0x697E80E0U, 0xA0639CF8U, 0xB3C619B2U, 0x25DC14B9U, 0xB298D73CU,

+        0x91646C97U, 0x6EFA628BU, 0x7A04A0CAU, 0x7BCB2F0EU, 0xE7C3E628U, 0x35526B1CU, 0x14340E24U, 0x3C17D0DFU,

+        0xE6635C01U, 0x77E153CAU, 0x7BC6CAFDU, 0xC377486BU, 0xDAA3CF98U, 0xFE0EB8B9U, 0xB2430590U, 0xF0BDD041U,

+        0x6B6B51F4U, 0xBABB5D54U, 0x6CBC2EB0U, 0xCB0D0FA2U, 0x3813CFCBU, 0x0C8E08F7U, 0x23D5E9B7U, 0x5526F3C6U,

+        0x1C6C6162U, 0xA3A06C15U, 0x6D7E4487U, 0x73B168C7U, 0x0573E67BU, 0xC7D2DB52U, 0x85A2E203U, 0x998CF358U,

+        0x856530D8U, 0x888D3FD6U, 0x6F38FADEU, 0x6104C729U, 0x42D39CABU, 0x4146A9FCU, 0xB44AF89EU, 0x1703F4BBU,

+        0xF262004EU, 0x91960E97U, 0x6EFA90E9U, 0xD9B8A04CU, 0x7FB3B51BU, 0x8A1A7A59U, 0x123DF32AU, 0xDBA9F425U,

+        0x6C0695EDU, 0xDED79850U, 0x6BB5866CU, 0x446F98F5U, 0xCD93690BU, 0x971F4AE1U, 0xD79ACDA4U, 0xD16CFD3CU,

+        0x1B01A57BU, 0xC7CCA911U, 0x6A77EC5BU, 0xFCD3FF90U, 0xF0F340BBU, 0x5C439944U, 0x71EDC610U, 0x1DC6FDA2U,

+        0x8208F4C1U, 0xECE1FAD2U, 0x68315202U, 0xEE66507EU, 0xB7533A6BU, 0xDAD7EBEAU, 0x4005DC8DU, 0x9349FA41U,

+        0xF50FC457U, 0xF5FACB93U, 0x69F33835U, 0x56DA371BU, 0x8A3313DBU, 0x118B384FU, 0xE672D739U, 0x5FE3FADFU,

+        0x65B0D9C6U, 0x7262D75CU, 0x62AF7F08U, 0x0EB9274DU, 0x0863840AU, 0xE0DD8A9AU, 0x103AA7D0U, 0x86C3E873U,

+        0x12B7E950U, 0x6B79E61DU, 0x636D153FU, 0xB6054028U, 0x3503ADBAU, 0x2B81593FU, 0xB64DAC64U, 0x4A69E8EDU,

+        0x8BBEB8EAU, 0x4054B5DEU, 0x612BAB66U, 0xA4B0EFC6U, 0x72A3D76AU, 0xAD152B91U, 0x87A5B6F9U, 0xC4E6EF0EU,

+        0xFCB9887CU, 0x594F849FU, 0x60E9C151U, 0x1C0C88A3U, 0x4FC3FEDAU, 0x6649F834U, 0x21D2BD4DU, 0x084CEF90U,

+        0x62DD1DDFU, 0x160E1258U, 0x65A6D7D4U, 0x81DBB01AU, 0xFDE322CAU, 0x7B4CC88CU, 0xE47583C3U, 0x0289E689U,

+        0x15DA2D49U, 0x0F152319U, 0x6464BDE3U, 0x3967D77FU, 0xC0830B7AU, 0xB0101B29U, 0x42028877U, 0xCE23E617U,

+        0x8CD37CF3U, 0x243870DAU, 0x662203BAU, 0x2BD27891U, 0x872371AAU, 0x36846987U, 0x73EA92EAU, 0x40ACE1F4U,

+        0xFBD44C65U, 0x3D23419BU, 0x67E0698DU, 0x936E1FF4U, 0xBA43581AU, 0xFDD8BA22U, 0xD59D995EU, 0x8C06E16AU,

+        0x4DB26158U, 0x65FD6BA7U, 0x48D7CB20U, 0x3B26F703U, 0x9932774DU, 0x08F40F5AU, 0x8BB64CE5U, 0xD0EBA0BBU,

+        0x3AB551CEU, 0x7CE65AE6U, 0x4915A117U, 0x839A9066U, 0xA4525EFDU, 0xC3A8DCFFU, 0x2DC14751U, 0x1C41A025U,

+        0xA3BC0074U, 0x57CB0925U, 0x4B531F4EU, 0x912F3F88U, 0xE3F2242DU, 0x453CAE51U, 0x1C295DCCU, 0x92CEA7C6U,

+        0xD4BB30E2U, 0x4ED03864U, 0x4A917579U, 0x299358EDU, 0xDE920D9DU, 0x8E607DF4U, 0xBA5E5678U, 0x5E64A758U,

+        0x4ADFA541U, 0x0191AEA3U, 0x4FDE63FCU, 0xB4446054U, 0x6CB2D18DU, 0x93654D4CU, 0x7FF968F6U, 0x54A1AE41U,

+        0x3DD895D7U, 0x188A9FE2U, 0x4E1C09CBU, 0x0CF80731U, 0x51D2F83DU, 0x58399EE9U, 0xD98E6342U, 0x980BAEDFU,

+        0xA4D1C46DU, 0x33A7CC21U, 0x4C5AB792U, 0x1E4DA8DFU, 0x167282EDU, 0xDEADEC47U, 0xE86679DFU, 0x1684A93CU,

+        0xD3D6F4FBU, 0x2ABCFD60U, 0x4D98DDA5U, 0xA6F1CFBAU, 0x2B12AB5DU, 0x15F13FE2U, 0x4E11726BU, 0xDA2EA9A2U,

+        0x4369E96AU, 0xAD24E1AFU, 0x46C49A98U, 0xFE92DFECU, 0xA9423C8CU, 0xE4A78D37U, 0xB8590282U, 0x030EBB0EU,

+        0x346ED9FCU, 0xB43FD0EEU, 0x4706F0AFU, 0x462EB889U, 0x9422153CU, 0x2FFB5E92U, 0x1E2E0936U, 0xCFA4BB90U,

+        0xAD678846U, 0x9F12832DU, 0x45404EF6U, 0x549B1767U, 0xD3826FECU, 0xA96F2C3CU, 0x2FC613ABU, 0x412BBC73U,

+        0xDA60B8D0U, 0x8609B26CU, 0x448224C1U, 0xEC277002U, 0xEEE2465CU, 0x6233FF99U, 0x89B1181FU, 0x8D81BCEDU,

+        0x44042D73U, 0xC94824ABU, 0x41CD3244U, 0x71F048BBU, 0x5CC29A4CU, 0x7F36CF21U, 0x4C162691U, 0x8744B5F4U,

+        0x33031DE5U, 0xD05315EAU, 0x400F5873U, 0xC94C2FDEU, 0x61A2B3FCU, 0xB46A1C84U, 0xEA612D25U, 0x4BEEB56AU,

+        0xAA0A4C5FU, 0xFB7E4629U, 0x4249E62AU, 0xDBF98030U, 0x2602C92CU, 0x32FE6E2AU, 0xDB8937B8U, 0xC561B289U,

+        0xDD0D7CC9U, 0xE2657768U, 0x438B8C1DU, 0x6345E755U, 0x1B62E09CU, 0xF9A2BD8FU, 0x7DFE3C0CU, 0x09CBB217U,

+        0x5005713CU, 0x2F3F79F6U, 0x54F16850U, 0x6B3FA09CU, 0xF9D2E0CFU, 0x0B220DC1U, 0xEC68D02BU, 0xAC509190U,

+        0x270241AAU, 0x362448B7U, 0x55330267U, 0xD383C7F9U, 0xC4B2C97FU, 0xC07EDE64U, 0x4A1FDB9FU, 0x60FA910EU,

+        0xBE0B1010U, 0x1D091B74U, 0x5775BC3EU, 0xC1366817U, 0x8312B3AFU, 0x46EAACCAU, 0x7BF7C102U, 0xEE7596EDU,

+        0xC90C2086U, 0x04122A35U, 0x56B7D609U, 0x798A0F72U, 0xBE729A1FU, 0x8DB67F6FU, 0xDD80CAB6U, 0x22DF9673U,

+        0x5768B525U, 0x4B53BCF2U, 0x53F8C08CU, 0xE45D37CBU, 0x0C52460FU, 0x90B34FD7U, 0x1827F438U, 0x281A9F6AU,

+        0x206F85B3U, 0x52488DB3U, 0x523AAABBU, 0x5CE150AEU, 0x31326FBFU, 0x5BEF9C72U, 0xBE50FF8CU, 0xE4B09FF4U,

+        0xB966D409U, 0x7965DE70U, 0x507C14E2U, 0x4E54FF40U, 0x7692156FU, 0xDD7BEEDCU, 0x8FB8E511U, 0x6A3F9817U,

+        0xCE61E49FU, 0x607EEF31U, 0x51BE7ED5U, 0xF6E89825U, 0x4BF23CDFU, 0x16273D79U, 0x29CFEEA5U, 0xA6959889U,

+        0x5EDEF90EU, 0xE7E6F3FEU, 0x5AE239E8U, 0xAE8B8873U, 0xC9A2AB0EU, 0xE7718FACU, 0xDF879E4CU, 0x7FB58A25U,

+        0x29D9C998U, 0xFEFDC2BFU, 0x5B2053DFU, 0x1637EF16U, 0xF4C282BEU, 0x2C2D5C09U, 0x79F095F8U, 0xB31F8ABBU,

+        0xB0D09822U, 0xD5D0917CU, 0x5966ED86U, 0x048240F8U, 0xB362F86EU, 0xAAB92EA7U, 0x48188F65U, 0x3D908D58U,

+        0xC7D7A8B4U, 0xCCCBA03DU, 0x58A487B1U, 0xBC3E279DU, 0x8E02D1DEU, 0x61E5FD02U, 0xEE6F84D1U, 0xF13A8DC6U,

+        0x59B33D17U, 0x838A36FAU, 0x5DEB9134U, 0x21E91F24U, 0x3C220DCEU, 0x7CE0CDBAU, 0x2BC8BA5FU, 0xFBFF84DFU,

+        0x2EB40D81U, 0x9A9107BBU, 0x5C29FB03U, 0x99557841U, 0x0142247EU, 0xB7BC1E1FU, 0x8DBFB1EBU, 0x37558441U,

+        0xB7BD5C3BU, 0xB1BC5478U, 0x5E6F455AU, 0x8BE0D7AFU, 0x46E25EAEU, 0x31286CB1U, 0xBC57AB76U, 0xB9DA83A2U,

+        0xC0BA6CADU, 0xA8A76539U, 0x5FAD2F6DU, 0x335CB0CAU, 0x7B82771EU, 0xFA74BF14U, 0x1A20A0C2U, 0x7570833CU,

+        0xEDB88320U, 0x3B83984BU, 0xE1351B80U, 0xED59B63BU, 0xB1E6B092U, 0x1EB014D8U, 0x8816EAF2U, 0x533B85DAU,

+        0x9ABFB3B6U, 0x2298A90AU, 0xE0F771B7U, 0x55E5D15EU, 0x8C869922U, 0xD5ECC77DU, 0x2E61E146U, 0x9F918544U,

+        0x03B6E20CU, 0x09B5FAC9U, 0xE2B1CFEEU, 0x47507EB0U, 0xCB26E3F2U, 0x5378B5D3U, 0x1F89FBDBU, 0x111E82A7U,

+        0x74B1D29AU, 0x10AECB88U, 0xE373A5D9U, 0xFFEC19D5U, 0xF646CA42U, 0x98246676U, 0xB9FEF06FU, 0xDDB48239U,

+        0xEAD54739U, 0x5FEF5D4FU, 0xE63CB35CU, 0x623B216CU, 0x44661652U, 0x852156CEU, 0x7C59CEE1U, 0xD7718B20U,

+        0x9DD277AFU, 0x46F46C0EU, 0xE7FED96BU, 0xDA874609U, 0x79063FE2U, 0x4E7D856BU, 0xDA2EC555U, 0x1BDB8BBEU,

+        0x04DB2615U, 0x6DD93FCDU, 0xE5B86732U, 0xC832E9E7U, 0x3EA64532U, 0xC8E9F7C5U, 0xEBC6DFC8U, 0x95548C5DU,

+        0x73DC1683U, 0x74C20E8CU, 0xE47A0D05U, 0x708E8E82U, 0x03C66C82U, 0x03B52460U, 0x4DB1D47CU, 0x59FE8CC3U,

+        0xE3630B12U, 0xF35A1243U, 0xEF264A38U, 0x28ED9ED4U, 0x8196FB53U, 0xF2E396B5U, 0xBBF9A495U, 0x80DE9E6FU,

+        0x94643B84U, 0xEA412302U, 0xEEE4200FU, 0x9051F9B1U, 0xBCF6D2E3U, 0x39BF4510U, 0x1D8EAF21U, 0x4C749EF1U,

+        0x0D6D6A3EU, 0xC16C70C1U, 0xECA29E56U, 0x82E4565FU, 0xFB56A833U, 0xBF2B37BEU, 0x2C66B5BCU, 0xC2FB9912U,

+        0x7A6A5AA8U, 0xD8774180U, 0xED60F461U, 0x3A58313AU, 0xC6368183U, 0x7477E41BU, 0x8A11BE08U, 0x0E51998CU,

+        0xE40ECF0BU, 0x9736D747U, 0xE82FE2E4U, 0xA78F0983U, 0x74165D93U, 0x6972D4A3U, 0x4FB68086U, 0x04949095U,

+        0x9309FF9DU, 0x8E2DE606U, 0xE9ED88D3U, 0x1F336EE6U, 0x49767423U, 0xA22E0706U, 0xE9C18B32U, 0xC83E900BU,

+        0x0A00AE27U, 0xA500B5C5U, 0xEBAB368AU, 0x0D86C108U, 0x0ED60EF3U, 0x24BA75A8U, 0xD82991AFU, 0x46B197E8U,

+        0x7D079EB1U, 0xBC1B8484U, 0xEA695CBDU, 0xB53AA66DU, 0x33B62743U, 0xEFE6A60DU, 0x7E5E9A1BU, 0x8A1B9776U,

+        0xF00F9344U, 0x71418A1AU, 0xFD13B8F0U, 0xBD40E1A4U, 0xD1062710U, 0x1D661643U, 0xEFC8763CU, 0x2F80B4F1U,

+        0x8708A3D2U, 0x685ABB5BU, 0xFCD1D2C7U, 0x05FC86C1U, 0xEC660EA0U, 0xD63AC5E6U, 0x49BF7D88U, 0xE32AB46FU,

+        0x1E01F268U, 0x4377E898U, 0xFE976C9EU, 0x1749292FU, 0xABC67470U, 0x50AEB748U, 0x78576715U, 0x6DA5B38CU,

+        0x6906C2FEU, 0x5A6CD9D9U, 0xFF5506A9U, 0xAFF54E4AU, 0x96A65DC0U, 0x9BF264EDU, 0xDE206CA1U, 0xA10FB312U,

+        0xF762575DU, 0x152D4F1EU, 0xFA1A102CU, 0x322276F3U, 0x248681D0U, 0x86F75455U, 0x1B87522FU, 0xABCABA0BU,

+        0x806567CBU, 0x0C367E5FU, 0xFBD87A1BU, 0x8A9E1196U, 0x19E6A860U, 0x4DAB87F0U, 0xBDF0599BU, 0x6760BA95U,

+        0x196C3671U, 0x271B2D9CU, 0xF99EC442U, 0x982BBE78U, 0x5E46D2B0U, 0xCB3FF55EU, 0x8C184306U, 0xE9EFBD76U,

+        0x6E6B06E7U, 0x3E001CDDU, 0xF85CAE75U, 0x2097D91DU, 0x6326FB00U, 0x006326FBU, 0x2A6F48B2U, 0x2545BDE8U,

+        0xFED41B76U, 0xB9980012U, 0xF300E948U, 0x78F4C94BU, 0xE1766CD1U, 0xF135942EU, 0xDC27385BU, 0xFC65AF44U,

+        0x89D32BE0U, 0xA0833153U, 0xF2C2837FU, 0xC048AE2EU, 0xDC164561U, 0x3A69478BU, 0x7A5033EFU, 0x30CFAFDAU,

+        0x10DA7A5AU, 0x8BAE6290U, 0xF0843D26U, 0xD2FD01C0U, 0x9BB63FB1U, 0xBCFD3525U, 0x4BB82972U, 0xBE40A839U,

+        0x67DD4ACCU, 0x92B553D1U, 0xF1465711U, 0x6A4166A5U, 0xA6D61601U, 0x77A1E680U, 0xEDCF22C6U, 0x72EAA8A7U,

+        0xF9B9DF6FU, 0xDDF4C516U, 0xF4094194U, 0xF7965E1CU, 0x14F6CA11U, 0x6AA4D638U, 0x28681C48U, 0x782FA1BEU,

+        0x8EBEEFF9U, 0xC4EFF457U, 0xF5CB2BA3U, 0x4F2A3979U, 0x2996E3A1U, 0xA1F8059DU, 0x8E1F17FCU, 0xB485A120U,

+        0x17B7BE43U, 0xEFC2A794U, 0xF78D95FAU, 0x5D9F9697U, 0x6E369971U, 0x276C7733U, 0xBFF70D61U, 0x3A0AA6C3U,

+        0x60B08ED5U, 0xF6D996D5U, 0xF64FFFCDU, 0xE523F1F2U, 0x5356B0C1U, 0xEC30A496U, 0x198006D5U, 0xF6A0A65DU,

+        0xD6D6A3E8U, 0xAE07BCE9U, 0xD9785D60U, 0x4D6B1905U, 0x70279F96U, 0x191C11EEU, 0x47ABD36EU, 0xAA4DE78CU,

+        0xA1D1937EU, 0xB71C8DA8U, 0xD8BA3757U, 0xF5D77E60U, 0x4D47B626U, 0xD240C24BU, 0xE1DCD8DAU, 0x66E7E712U,

+        0x38D8C2C4U, 0x9C31DE6BU, 0xDAFC890EU, 0xE762D18EU, 0x0AE7CCF6U, 0x54D4B0E5U, 0xD034C247U, 0xE868E0F1U,

+        0x4FDFF252U, 0x852AEF2AU, 0xDB3EE339U, 0x5FDEB6EBU, 0x3787E546U, 0x9F886340U, 0x7643C9F3U, 0x24C2E06FU,

+        0xD1BB67F1U, 0xCA6B79EDU, 0xDE71F5BCU, 0xC2098E52U, 0x85A73956U, 0x828D53F8U, 0xB3E4F77DU, 0x2E07E976U,

+        0xA6BC5767U, 0xD37048ACU, 0xDFB39F8BU, 0x7AB5E937U, 0xB8C710E6U, 0x49D1805DU, 0x1593FCC9U, 0xE2ADE9E8U,

+        0x3FB506DDU, 0xF85D1B6FU, 0xDDF521D2U, 0x680046D9U, 0xFF676A36U, 0xCF45F2F3U, 0x247BE654U, 0x6C22EE0BU,

+        0x48B2364BU, 0xE1462A2EU, 0xDC374BE5U, 0xD0BC21BCU, 0xC2074386U, 0x04192156U, 0x820CEDE0U, 0xA088EE95U,

+        0xD80D2BDAU, 0x66DE36E1U, 0xD76B0CD8U, 0x88DF31EAU, 0x4057D457U, 0xF54F9383U, 0x74449D09U, 0x79A8FC39U,

+        0xAF0A1B4CU, 0x7FC507A0U, 0xD6A966EFU, 0x3063568FU, 0x7D37FDE7U, 0x3E134026U, 0xD23396BDU, 0xB502FCA7U,

+        0x36034AF6U, 0x54E85463U, 0xD4EFD8B6U, 0x22D6F961U, 0x3A978737U, 0xB8873288U, 0xE3DB8C20U, 0x3B8DFB44U,

+        0x41047A60U, 0x4DF36522U, 0xD52DB281U, 0x9A6A9E04U, 0x07F7AE87U, 0x73DBE12DU, 0x45AC8794U, 0xF727FBDAU,

+        0xDF60EFC3U, 0x02B2F3E5U, 0xD062A404U, 0x07BDA6BDU, 0xB5D77297U, 0x6EDED195U, 0x800BB91AU, 0xFDE2F2C3U,

+        0xA867DF55U, 0x1BA9C2A4U, 0xD1A0CE33U, 0xBF01C1D8U, 0x88B75B27U, 0xA5820230U, 0x267CB2AEU, 0x3148F25DU,

+        0x316E8EEFU, 0x30849167U, 0xD3E6706AU, 0xADB46E36U, 0xCF1721F7U, 0x2316709EU, 0x1794A833U, 0xBFC7F5BEU,

+        0x4669BE79U, 0x299FA026U, 0xD2241A5DU, 0x15080953U, 0xF2770847U, 0xE84AA33BU, 0xB1E3A387U, 0x736DF520U,

+        0xCB61B38CU, 0xE4C5AEB8U, 0xC55EFE10U, 0x1D724E9AU, 0x10C70814U, 0x1ACA1375U, 0x20754FA0U, 0xD6F6D6A7U,

+        0xBC66831AU, 0xFDDE9FF9U, 0xC49C9427U, 0xA5CE29FFU, 0x2DA721A4U, 0xD196C0D0U, 0x86024414U, 0x1A5CD639U,

+        0x256FD2A0U, 0xD6F3CC3AU, 0xC6DA2A7EU, 0xB77B8611U, 0x6A075B74U, 0x5702B27EU, 0xB7EA5E89U, 0x94D3D1DAU,

+        0x5268E236U, 0xCFE8FD7BU, 0xC7184049U, 0x0FC7E174U, 0x576772C4U, 0x9C5E61DBU, 0x119D553DU, 0x5879D144U,

+        0xCC0C7795U, 0x80A96BBCU, 0xC25756CCU, 0x9210D9CDU, 0xE547AED4U, 0x815B5163U, 0xD43A6BB3U, 0x52BCD85DU,

+        0xBB0B4703U, 0x99B25AFDU, 0xC3953CFBU, 0x2AACBEA8U, 0xD8278764U, 0x4A0782C6U, 0x724D6007U, 0x9E16D8C3U,

+        0x220216B9U, 0xB29F093EU, 0xC1D382A2U, 0x38191146U, 0x9F87FDB4U, 0xCC93F068U, 0x43A57A9AU, 0x1099DF20U,

+        0x5505262FU, 0xAB84387FU, 0xC011E895U, 0x80A57623U, 0xA2E7D404U, 0x07CF23CDU, 0xE5D2712EU, 0xDC33DFBEU,

+        0xC5BA3BBEU, 0x2C1C24B0U, 0xCB4DAFA8U, 0xD8C66675U, 0x20B743D5U, 0xF6999118U, 0x139A01C7U, 0x0513CD12U,

+        0xB2BD0B28U, 0x350715F1U, 0xCA8FC59FU, 0x607A0110U, 0x1DD76A65U, 0x3DC542BDU, 0xB5ED0A73U, 0xC9B9CD8CU,

+        0x2BB45A92U, 0x1E2A4632U, 0xC8C97BC6U, 0x72CFAEFEU, 0x5A7710B5U, 0xBB513013U, 0x840510EEU, 0x4736CA6FU,

+        0x5CB36A04U, 0x07317773U, 0xC90B11F1U, 0xCA73C99BU, 0x67173905U, 0x700DE3B6U, 0x22721B5AU, 0x8B9CCAF1U,

+        0xC2D7FFA7U, 0x4870E1B4U, 0xCC440774U, 0x57A4F122U, 0xD537E515U, 0x6D08D30EU, 0xE7D525D4U, 0x8159C3E8U,

+        0xB5D0CF31U, 0x516BD0F5U, 0xCD866D43U, 0xEF189647U, 0xE857CCA5U, 0xA65400ABU, 0x41A22E60U, 0x4DF3C376U,

+        0x2CD99E8BU, 0x7A468336U, 0xCFC0D31AU, 0xFDAD39A9U, 0xAFF7B675U, 0x20C07205U, 0x704A34FDU, 0xC37CC495U,

+        0x5BDEAE1DU, 0x635DB277U, 0xCE02B92DU, 0x45115ECCU, 0x92979FC5U, 0xEB9CA1A0U, 0xD63D3F49U, 0x0FD6C40BU,

+        0x9B64C2B0U, 0xCBFAD74EU, 0x91AF9640U, 0x764DEE06U, 0xE915E8DBU, 0x11E81EB4U, 0xCC1D9F8BU, 0x7AA64737U,

+        0xEC63F226U, 0xD2E1E60FU, 0x906DFC77U, 0xCEF18963U, 0xD475C16BU, 0xDAB4CD11U, 0x6A6A943FU, 0xB60C47A9U,

+        0x756AA39CU, 0xF9CCB5CCU, 0x922B422EU, 0xDC44268DU, 0x93D5BBBBU, 0x5C20BFBFU, 0x5B828EA2U, 0x3883404AU,

+        0x026D930AU, 0xE0D7848DU, 0x93E92819U, 0x64F841E8U, 0xAEB5920BU, 0x977C6C1AU, 0xFDF58516U, 0xF42940D4U,

+        0x9C0906A9U, 0xAF96124AU, 0x96A63E9CU, 0xF92F7951U, 0x1C954E1BU, 0x8A795CA2U, 0x3852BB98U, 0xFEEC49CDU,

+        0xEB0E363FU, 0xB68D230BU, 0x976454ABU, 0x41931E34U, 0x21F567ABU, 0x41258F07U, 0x9E25B02CU, 0x32464953U,

+        0x72076785U, 0x9DA070C8U, 0x9522EAF2U, 0x5326B1DAU, 0x66551D7BU, 0xC7B1FDA9U, 0xAFCDAAB1U, 0xBCC94EB0U,

+        0x05005713U, 0x84BB4189U, 0x94E080C5U, 0xEB9AD6BFU, 0x5B3534CBU, 0x0CED2E0CU, 0x09BAA105U, 0x70634E2EU,

+        0x95BF4A82U, 0x03235D46U, 0x9FBCC7F8U, 0xB3F9C6E9U, 0xD965A31AU, 0xFDBB9CD9U, 0xFFF2D1ECU, 0xA9435C82U,

+        0xE2B87A14U, 0x1A386C07U, 0x9E7EADCFU, 0x0B45A18CU, 0xE4058AAAU, 0x36E74F7CU, 0x5985DA58U, 0x65E95C1CU,

+        0x7BB12BAEU, 0x31153FC4U, 0x9C381396U, 0x19F00E62U, 0xA3A5F07AU, 0xB0733DD2U, 0x686DC0C5U, 0xEB665BFFU,

+        0x0CB61B38U, 0x280E0E85U, 0x9DFA79A1U, 0xA14C6907U, 0x9EC5D9CAU, 0x7B2FEE77U, 0xCE1ACB71U, 0x27CC5B61U,

+        0x92D28E9BU, 0x674F9842U, 0x98B56F24U, 0x3C9B51BEU, 0x2CE505DAU, 0x662ADECFU, 0x0BBDF5FFU, 0x2D095278U,

+        0xE5D5BE0DU, 0x7E54A903U, 0x99770513U, 0x842736DBU, 0x11852C6AU, 0xAD760D6AU, 0xADCAFE4BU, 0xE1A352E6U,

+        0x7CDCEFB7U, 0x5579FAC0U, 0x9B31BB4AU, 0x96929935U, 0x562556BAU, 0x2BE27FC4U, 0x9C22E4D6U, 0x6F2C5505U,

+        0x0BDBDF21U, 0x4C62CB81U, 0x9AF3D17DU, 0x2E2EFE50U, 0x6B457F0AU, 0xE0BEAC61U, 0x3A55EF62U, 0xA386559BU,

+        0x86D3D2D4U, 0x8138C51FU, 0x8D893530U, 0x2654B999U, 0x89F57F59U, 0x123E1C2FU, 0xABC30345U, 0x061D761CU,

+        0xF1D4E242U, 0x9823F45EU, 0x8C4B5F07U, 0x9EE8DEFCU, 0xB49556E9U, 0xD962CF8AU, 0x0DB408F1U, 0xCAB77682U,

+        0x68DDB3F8U, 0xB30EA79DU, 0x8E0DE15EU, 0x8C5D7112U, 0xF3352C39U, 0x5FF6BD24U, 0x3C5C126CU, 0x44387161U,

+        0x1FDA836EU, 0xAA1596DCU, 0x8FCF8B69U, 0x34E11677U, 0xCE550589U, 0x94AA6E81U, 0x9A2B19D8U, 0x889271FFU,

+        0x81BE16CDU, 0xE554001BU, 0x8A809DECU, 0xA9362ECEU, 0x7C75D999U, 0x89AF5E39U, 0x5F8C2756U, 0x825778E6U,

+        0xF6B9265BU, 0xFC4F315AU, 0x8B42F7DBU, 0x118A49ABU, 0x4115F029U, 0x42F38D9CU, 0xF9FB2CE2U, 0x4EFD7878U,

+        0x6FB077E1U, 0xD7626299U, 0x89044982U, 0x033FE645U, 0x06B58AF9U, 0xC467FF32U, 0xC813367FU, 0xC0727F9BU,

+        0x18B74777U, 0xCE7953D8U, 0x88C623B5U, 0xBB838120U, 0x3BD5A349U, 0x0F3B2C97U, 0x6E643DCBU, 0x0CD87F05U,

+        0x88085AE6U, 0x49E14F17U, 0x839A6488U, 0xE3E09176U, 0xB9853498U, 0xFE6D9E42U, 0x982C4D22U, 0xD5F86DA9U,

+        0xFF0F6A70U, 0x50FA7E56U, 0x82580EBFU, 0x5B5CF613U, 0x84E51D28U, 0x35314DE7U, 0x3E5B4696U, 0x19526D37U,

+        0x66063BCAU, 0x7BD72D95U, 0x801EB0E6U, 0x49E959FDU, 0xC34567F8U, 0xB3A53F49U, 0x0FB35C0BU, 0x97DD6AD4U,

+        0x11010B5CU, 0x62CC1CD4U, 0x81DCDAD1U, 0xF1553E98U, 0xFE254E48U, 0x78F9ECECU, 0xA9C457BFU, 0x5B776A4AU,

+        0x8F659EFFU, 0x2D8D8A13U, 0x8493CC54U, 0x6C820621U, 0x4C059258U, 0x65FCDC54U, 0x6C636931U, 0x51B26353U,

+        0xF862AE69U, 0x3496BB52U, 0x8551A663U, 0xD43E6144U, 0x7165BBE8U, 0xAEA00FF1U, 0xCA146285U, 0x9D1863CDU,

+        0x616BFFD3U, 0x1FBBE891U, 0x8717183AU, 0xC68BCEAAU, 0x36C5C138U, 0x28347D5FU, 0xFBFC7818U, 0x1397642EU,

+        0x166CCF45U, 0x06A0D9D0U, 0x86D5720DU, 0x7E37A9CFU, 0x0BA5E888U, 0xE368AEFAU, 0x5D8B73ACU, 0xDF3D64B0U,

+        0xA00AE278U, 0x5E7EF3ECU, 0xA9E2D0A0U, 0xD67F4138U, 0x28D4C7DFU, 0x16441B82U, 0x03A0A617U, 0x83D02561U,

+        0xD70DD2EEU, 0x4765C2ADU, 0xA820BA97U, 0x6EC3265DU, 0x15B4EE6FU, 0xDD18C827U, 0xA5D7ADA3U, 0x4F7A25FFU,

+        0x4E048354U, 0x6C48916EU, 0xAA6604CEU, 0x7C7689B3U, 0x521494BFU, 0x5B8CBA89U, 0x943FB73EU, 0xC1F5221CU,

+        0x3903B3C2U, 0x7553A02FU, 0xABA46EF9U, 0xC4CAEED6U, 0x6F74BD0FU, 0x90D0692CU, 0x3248BC8AU, 0x0D5F2282U,

+        0xA7672661U, 0x3A1236E8U, 0xAEEB787CU, 0x591DD66FU, 0xDD54611FU, 0x8DD55994U, 0xF7EF8204U, 0x079A2B9BU,

+        0xD06016F7U, 0x230907A9U, 0xAF29124BU, 0xE1A1B10AU, 0xE03448AFU, 0x46898A31U, 0x519889B0U, 0xCB302B05U,

+        0x4969474DU, 0x0824546AU, 0xAD6FAC12U, 0xF3141EE4U, 0xA794327FU, 0xC01DF89FU, 0x6070932DU, 0x45BF2CE6U,

+        0x3E6E77DBU, 0x113F652BU, 0xACADC625U, 0x4BA87981U, 0x9AF41BCFU, 0x0B412B3AU, 0xC6079899U, 0x89152C78U,

+        0xAED16A4AU, 0x96A779E4U, 0xA7F18118U, 0x13CB69D7U, 0x18A48C1EU, 0xFA1799EFU, 0x304FE870U, 0x50353ED4U,

+        0xD9D65ADCU, 0x8FBC48A5U, 0xA633EB2FU, 0xAB770EB2U, 0x25C4A5AEU, 0x314B4A4AU, 0x9638E3C4U, 0x9C9F3E4AU,

+        0x40DF0B66U, 0xA4911B66U, 0xA4755576U, 0xB9C2A15CU, 0x6264DF7EU, 0xB7DF38E4U, 0xA7D0F959U, 0x121039A9U,

+        0x37D83BF0U, 0xBD8A2A27U, 0xA5B73F41U, 0x017EC639U, 0x5F04F6CEU, 0x7C83EB41U, 0x01A7F2EDU, 0xDEBA3937U,

+        0xA9BCAE53U, 0xF2CBBCE0U, 0xA0F829C4U, 0x9CA9FE80U, 0xED242ADEU, 0x6186DBF9U, 0xC400CC63U, 0xD47F302EU,

+        0xDEBB9EC5U, 0xEBD08DA1U, 0xA13A43F3U, 0x241599E5U, 0xD044036EU, 0xAADA085CU, 0x6277C7D7U, 0x18D530B0U,

+        0x47B2CF7FU, 0xC0FDDE62U, 0xA37CFDAAU, 0x36A0360BU, 0x97E479BEU, 0x2C4E7AF2U, 0x539FDD4AU, 0x965A3753U,

+        0x30B5FFE9U, 0xD9E6EF23U, 0xA2BE979DU, 0x8E1C516EU, 0xAA84500EU, 0xE712A957U, 0xF5E8D6FEU, 0x5AF037CDU,

+        0xBDBDF21CU, 0x14BCE1BDU, 0xB5C473D0U, 0x866616A7U, 0x4834505DU, 0x15921919U, 0x647E3AD9U, 0xFF6B144AU,

+        0xCABAC28AU, 0x0DA7D0FCU, 0xB40619E7U, 0x3EDA71C2U, 0x755479EDU, 0xDECECABCU, 0xC209316DU, 0x33C114D4U,

+        0x53B39330U, 0x268A833FU, 0xB640A7BEU, 0x2C6FDE2CU, 0x32F4033DU, 0x585AB812U, 0xF3E12BF0U, 0xBD4E1337U,

+        0x24B4A3A6U, 0x3F91B27EU, 0xB782CD89U, 0x94D3B949U, 0x0F942A8DU, 0x93066BB7U, 0x55962044U, 0x71E413A9U,

+        0xBAD03605U, 0x70D024B9U, 0xB2CDDB0CU, 0x090481F0U, 0xBDB4F69DU, 0x8E035B0FU, 0x90311ECAU, 0x7B211AB0U,

+        0xCDD70693U, 0x69CB15F8U, 0xB30FB13BU, 0xB1B8E695U, 0x80D4DF2DU, 0x455F88AAU, 0x3646157EU, 0xB78B1A2EU,

+        0x54DE5729U, 0x42E6463BU, 0xB1490F62U, 0xA30D497BU, 0xC774A5FDU, 0xC3CBFA04U, 0x07AE0FE3U, 0x39041DCDU,

+        0x23D967BFU, 0x5BFD777AU, 0xB08B6555U, 0x1BB12E1EU, 0xFA148C4DU, 0x089729A1U, 0xA1D90457U, 0xF5AE1D53U,

+        0xB3667A2EU, 0xDC656BB5U, 0xBBD72268U, 0x43D23E48U, 0x78441B9CU, 0xF9C19B74U, 0x579174BEU, 0x2C8E0FFFU,

+        0xC4614AB8U, 0xC57E5AF4U, 0xBA15485FU, 0xFB6E592DU, 0x4524322CU, 0x329D48D1U, 0xF1E67F0AU, 0xE0240F61U,

+        0x5D681B02U, 0xEE530937U, 0xB853F606U, 0xE9DBF6C3U, 0x028448FCU, 0xB4093A7FU, 0xC00E6597U, 0x6EAB0882U,

+        0x2A6F2B94U, 0xF7483876U, 0xB9919C31U, 0x516791A6U, 0x3FE4614CU, 0x7F55E9DAU, 0x66796E23U, 0xA201081CU,

+        0xB40BBE37U, 0xB809AEB1U, 0xBCDE8AB4U, 0xCCB0A91FU, 0x8DC4BD5CU, 0x6250D962U, 0xA3DE50ADU, 0xA8C40105U,

+        0xC30C8EA1U, 0xA1129FF0U, 0xBD1CE083U, 0x740CCE7AU, 0xB0A494ECU, 0xA90C0AC7U, 0x05A95B19U, 0x646E019BU,

+        0x5A05DF1BU, 0x8A3FCC33U, 0xBF5A5EDAU, 0x66B96194U, 0xF704EE3CU, 0x2F987869U, 0x34414184U, 0xEAE10678U,

+        0x2D02EF8DU, 0x9324FD72U, 0xBE9834EDU, 0xDE0506F1U, 0xCA64C78CU, 0xE4C4ABCCU, 0x92364A30U, 0x264B06E6U,

+    };

+

+    uint32_t ulCrc32;

+

+    if(pBuffer == NULL)

+    {

+        REDERROR();

+        ulCrc32 = SUSPICIOUS_CRC_VALUE;

+    }

+    else

+    {

+        const uint8_t  *pbBuffer = CAST_VOID_PTR_TO_CONST_UINT8_PTR(pBuffer);

+        uint32_t        ulIdx = 0U;

+        const uint32_t *pulXorCrc0 = &aulCrc32Table[7U];

+        const uint32_t *pulXorCrc1 = &aulCrc32Table[6U];

+        const uint32_t *pulXorCrc2 = &aulCrc32Table[5U];

+        const uint32_t *pulXorCrc3 = &aulCrc32Table[4U];

+        const uint32_t *pulXorData4 = &aulCrc32Table[3U];

+        const uint32_t *pulXorData5 = &aulCrc32Table[2U];

+        const uint32_t *pulXorData6 = &aulCrc32Table[1U];

+        const uint32_t *pulXorData7 = &aulCrc32Table[0U];

+        uint32_t        ulSliceLen;

+

+        ulCrc32 = ~ulInitCrc32;

+

+        /*  Aligned memory access is used below.  To avoid suboptimal

+            performance and faults (depending on platform), handle the

+            unaligned initial bytes (if any) using the Sarwate algorithm.

+        */

+        while((ulIdx < ulLength) && !IS_ALIGNED_PTR(&pbBuffer[ulIdx]))

+        {

+            ulCrc32 = (ulCrc32 >> 8U) ^ aulCrc32Table[((ulCrc32 ^ pbBuffer[ulIdx]) & 0xFFU) << 3U];

+

+            ulIdx++;

+        }

+

+        /*  Round down the length to the nearest multiple of eight.

+        */

+        ulSliceLen = (((ulLength - ulIdx) >> 3U) << 3U) + ulIdx;

+

+        /*  Compute the CRC in eight byte "slices".  Takes advantage of

+            modern processors which can load in parallel from multiple

+            memory locations.

+        */

+        while(ulIdx < ulSliceLen)

+        {

+          #if REDCONF_ENDIAN_BIG == 1

+            ulCrc32 ^= pbBuffer[ulIdx] | ((uint32_t)pbBuffer[ulIdx+1U] << 8U) |

+                       ((uint32_t)pbBuffer[ulIdx+2U] << 16U) | ((uint32_t)pbBuffer[ulIdx+3U] << 24U);

+          #else

+            ulCrc32 ^= *CAST_CONST_UINT32_PTR(&pbBuffer[ulIdx]);

+          #endif

+

+            ulCrc32 =

+                pulXorCrc3[((ulCrc32 >> 24U) & 0xFFU) << 3U] ^

+                pulXorCrc2[((ulCrc32 >> 16U) & 0xFFU) << 3U] ^

+                pulXorCrc1[((ulCrc32 >> 8U)  & 0xFFU) << 3U] ^

+                pulXorCrc0[ (ulCrc32         & 0xFFU) << 3U] ^

+                pulXorData7[pbBuffer[ulIdx+7U] << 3U] ^

+                pulXorData6[pbBuffer[ulIdx+6U] << 3U] ^

+                pulXorData5[pbBuffer[ulIdx+5U] << 3U] ^

+                pulXorData4[pbBuffer[ulIdx+4U] << 3U];

+

+            ulIdx += 8U;

+        }

+

+        /*  Compute the remaining bytes with the Sarwate algorithm.

+        */

+        while(ulIdx < ulLength)

+        {

+            ulCrc32 = (ulCrc32 >> 8U) ^ aulCrc32Table[((ulCrc32 ^ pbBuffer[ulIdx]) & 0xFFU) << 3U];

+

+            ulIdx++;

+        }

+

+        ulCrc32 = ~ulCrc32;

+    }

+

+    return ulCrc32;

+}

+

+#else

+

+#error "REDCONF_CRC_ALGORITHM must be set to CRC_BITWISE, CRC_SARWATE, or CRC_SLICEBY8"

+

+#endif

+

+

+/** @brief Compute a CRC32 for a metadata node buffer.

+

+    @param pBuffer  The metadata node buffer for which to compute a CRC.  Must

+                    be a block sized buffer.

+

+    @return The CRC of the buffer.

+*/

+uint32_t RedCrcNode(

+    const void *pBuffer)

+{

+    uint32_t    ulCrc;

+

+    if(pBuffer == NULL)

+    {

+        REDERROR();

+        ulCrc = SUSPICIOUS_CRC_VALUE;

+    }

+    else

+    {

+        const uint8_t *pbBuffer = CAST_VOID_PTR_TO_CONST_UINT8_PTR(pBuffer);

+

+        /*  The first eight bytes of a metadata node contain the signature and

+            the CRC.  There is little value in CRCing the signature, and the

+            CRC cannot be CRC'd, so skip over that part of the buffer.

+        */

+        ulCrc = RedCrc32Update(0U, &pbBuffer[8U], REDCONF_BLOCK_SIZE - 8U);

+    }

+

+    return ulCrc;

+}

+

diff --git a/FreeRTOS-Plus/Source/Reliance-Edge/util/endian.c b/FreeRTOS-Plus/Source/Reliance-Edge/util/endian.c
new file mode 100644
index 0000000..3cc5452
--- /dev/null
+++ b/FreeRTOS-Plus/Source/Reliance-Edge/util/endian.c
@@ -0,0 +1,82 @@
+/*             ----> DO NOT REMOVE THE FOLLOWING NOTICE <----

+

+                   Copyright (c) 2014-2015 Datalight, Inc.

+                       All Rights Reserved Worldwide.

+

+    This program is free software; you can redistribute it and/or modify

+    it under the terms of the GNU General Public License as published by

+    the Free Software Foundation; use version 2 of the License.

+

+    This program is distributed in the hope that it will be useful,

+    but "AS-IS," WITHOUT ANY WARRANTY; without even the implied warranty

+    of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the

+    GNU General Public License for more details.

+

+    You should have received a copy of the GNU General Public License along

+    with this program; if not, write to the Free Software Foundation, Inc.,

+    51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.

+*/

+/*  Businesses and individuals that for commercial or other reasons cannot

+    comply with the terms of the GPLv2 license may obtain a commercial license

+    before incorporating Reliance Edge into proprietary software for

+    distribution in any form.  Visit http://www.datalight.com/reliance-edge for

+    more information.

+*/

+/** @file

+    @brief Implements utilities for performing endian swaps.

+*/

+#include <redfs.h>

+

+

+#ifdef REDCONF_ENDIAN_SWAP

+

+/** @brief Reverse the byte order of a 64-bit number.

+

+    @param ullToRev Number whose bytes will be reversed

+

+    @retval @p ullToRev with its bytes reversed.

+*/

+uint64_t RedRev64(

+    uint64_t    ullToRev)

+{

+    uint64_t    ullRet = ullToRev;

+

+    ullRet = ((ullRet & UINT64_SUFFIX(0x00000000FFFFFFFF)) << 32U) | ((ullRet & UINT64_SUFFIX(0xFFFFFFFF00000000)) >> 32U);

+    ullRet = ((ullRet & UINT64_SUFFIX(0x0000FFFF0000FFFF)) << 16U) | ((ullRet & UINT64_SUFFIX(0xFFFF0000FFFF0000)) >> 16U);

+    ullRet = ((ullRet & UINT64_SUFFIX(0x00FF00FF00FF00FF)) <<  8U) | ((ullRet & UINT64_SUFFIX(0xFF00FF00FF00FF00)) >>  8U);

+

+    return ullRet;

+}

+

+

+/** @brief Reverse the byte order of a 32-bit number.

+

+    @param ulToRev  Number whose bytes will be reversed

+

+    @retval @p ulToRev with its bytes reversed.

+*/

+uint32_t RedRev32(

+    uint32_t    ulToRev)

+{

+    return   ((ulToRev & 0x000000FFU) << 24U)

+           | ((ulToRev & 0x0000FF00U) <<  8U)

+           | ((ulToRev & 0x00FF0000U) >>  8U)

+           | ((ulToRev & 0xFF000000U) >> 24U);

+}

+

+

+/** @brief Reverse the byte order of a 16-bit number.

+

+    @param uToRev   Number whose bytes will be reversed

+

+    @retval @p uToRev with its bytes reversed.

+*/

+uint16_t RedRev16(

+    uint16_t    uToRev)

+{

+    return   ((uToRev & 0xFF00U) >> 8U)

+           | ((uToRev & 0x00FFU) << 8U);

+}

+

+#endif

+

diff --git a/FreeRTOS-Plus/Source/Reliance-Edge/util/memory.c b/FreeRTOS-Plus/Source/Reliance-Edge/util/memory.c
new file mode 100644
index 0000000..3c30bae
--- /dev/null
+++ b/FreeRTOS-Plus/Source/Reliance-Edge/util/memory.c
@@ -0,0 +1,301 @@
+/*             ----> DO NOT REMOVE THE FOLLOWING NOTICE <----

+

+                   Copyright (c) 2014-2015 Datalight, Inc.

+                       All Rights Reserved Worldwide.

+

+    This program is free software; you can redistribute it and/or modify

+    it under the terms of the GNU General Public License as published by

+    the Free Software Foundation; use version 2 of the License.

+

+    This program is distributed in the hope that it will be useful,

+    but "AS-IS," WITHOUT ANY WARRANTY; without even the implied warranty

+    of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the

+    GNU General Public License for more details.

+

+    You should have received a copy of the GNU General Public License along

+    with this program; if not, write to the Free Software Foundation, Inc.,

+    51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.

+*/

+/*  Businesses and individuals that for commercial or other reasons cannot

+    comply with the terms of the GPLv2 license may obtain a commercial license

+    before incorporating Reliance Edge into proprietary software for

+    distribution in any form.  Visit http://www.datalight.com/reliance-edge for

+    more information.

+*/

+/** @file

+    @brief Default implementations of memory manipulation functions.

+

+    These implementations are intended to be small and simple, and thus forego

+    all optimizations.  If the C library is available, or if there are better

+    third-party implementations available in the system, those can be used

+    instead by defining the appropriate macros in redconf.h.

+

+    These functions are not intended to be completely 100% ANSI C compatible

+    implementations, but rather are designed to meet the needs of Reliance Edge.

+    The compatibility is close enough that ANSI C compatible implementations

+    can be "dropped in" as replacements without difficulty.

+*/

+#include <redfs.h>

+

+

+#ifndef RedMemCpyUnchecked

+static void RedMemCpyUnchecked(void *pDest, const void *pSrc, uint32_t ulLen);

+#endif

+#ifndef RedMemMoveUnchecked

+static void RedMemMoveUnchecked(void *pDest, const void *pSrc, uint32_t ulLen);

+#endif

+#ifndef RedMemSetUnchecked

+static void RedMemSetUnchecked(void *pDest, uint8_t bVal, uint32_t ulLen);

+#endif

+#ifndef RedMemCmpUnchecked

+static int32_t RedMemCmpUnchecked(const void *pMem1, const void *pMem2, uint32_t ulLen);

+#endif

+

+

+/** @brief Copy memory from one address to another.

+

+    The source and destination memory buffers should not overlap.  If the

+    buffers overlap, use RedMemMove() instead.

+

+    @param pDest    The destination buffer.

+    @param pSrc     The source buffer.

+    @param ulLen    The number of bytes to copy.

+*/

+void RedMemCpy(

+    void       *pDest,

+    const void *pSrc,

+    uint32_t    ulLen)

+{

+    if((pDest == NULL) || (pSrc == NULL))

+    {

+        REDERROR();

+    }

+    else

+    {

+        RedMemCpyUnchecked(pDest, pSrc, ulLen);

+    }

+}

+

+

+#ifndef RedMemCpyUnchecked

+/** @brief Copy memory from one address to another.

+

+    This function should only be called from RedMemCpy().

+

+    @param pDest    The destination buffer.

+    @param pSrc     The source buffer.

+    @param ulLen    The number of bytes to copy.

+*/

+static void RedMemCpyUnchecked(

+    void           *pDest,

+    const void     *pSrc,

+    uint32_t        ulLen)

+{

+    uint8_t        *pbDest = CAST_VOID_PTR_TO_UINT8_PTR(pDest);

+    const uint8_t  *pbSrc = CAST_VOID_PTR_TO_CONST_UINT8_PTR(pSrc);

+    uint32_t        ulIdx;

+

+    for(ulIdx = 0U; ulIdx < ulLen; ulIdx++)

+    {

+        pbDest[ulIdx] = pbSrc[ulIdx];

+    }

+}

+#endif

+

+

+/** @brief Move memory from one address to another.

+

+    Supports overlapping memory regions.  If memory regions do not overlap, it

+    is generally better to use RedMemCpy() instead.

+

+    @param pDest    The destination buffer.

+    @param pSrc     The source buffer.

+    @param ulLen    The number of bytes to copy.

+*/

+void RedMemMove(

+    void       *pDest,

+    const void *pSrc,

+    uint32_t    ulLen)

+{

+    if((pDest == NULL) || (pSrc == NULL))

+    {

+        REDERROR();

+    }

+    else

+    {

+        RedMemMoveUnchecked(pDest, pSrc, ulLen);

+    }

+}

+

+

+#ifndef RedMemMoveUnchecked

+/** @brief Move memory from one address to another.

+

+    This function should only be called from RedMemMove().

+

+    @param pDest    The destination buffer.

+    @param pSrc     The source buffer.

+    @param ulLen    The number of bytes to copy.

+*/

+static void RedMemMoveUnchecked(

+    void           *pDest,

+    const void     *pSrc,

+    uint32_t        ulLen)

+{

+    uint8_t        *pbDest = CAST_VOID_PTR_TO_UINT8_PTR(pDest);

+    const uint8_t  *pbSrc = CAST_VOID_PTR_TO_CONST_UINT8_PTR(pSrc);

+    uint32_t        ulIdx;

+

+    if(MEMMOVE_MUST_COPY_FORWARD(pbDest, pbSrc))

+    {

+        /*  If the destination is lower than the source with overlapping memory

+            regions, we must copy from start to end in order to copy the memory

+            correctly.

+

+            Don't use RedMemCpy() to do this.  It is possible that RedMemCpy()

+            has been replaced (even though this function has not been replaced)

+            with an implementation that cannot handle any kind of buffer

+            overlap.

+        */

+        for(ulIdx = 0U; ulIdx < ulLen; ulIdx++)

+        {

+            pbDest[ulIdx] = pbSrc[ulIdx];

+        }

+    }

+    else

+    {

+        ulIdx = ulLen;

+

+        while(ulIdx > 0U)

+        {

+            ulIdx--;

+            pbDest[ulIdx] = pbSrc[ulIdx];

+        }

+    }

+}

+#endif /* RedMemMoveUnchecked */

+

+

+/** @brief Initialize a buffer with the specified byte value.

+

+    @param pDest    The buffer to initialize.

+    @param bVal     The byte value with which to initialize @p pDest.

+    @param ulLen    The number of bytes to initialize.

+*/

+void RedMemSet(

+    void       *pDest,

+    uint8_t     bVal,

+    uint32_t    ulLen)

+{

+    if(pDest == NULL)

+    {

+        REDERROR();

+    }

+    else

+    {

+        RedMemSetUnchecked(pDest, bVal, ulLen);

+    }

+}

+

+

+#ifndef RedMemSetUnchecked

+/** @brief Initialize a buffer with the specified byte value.

+

+    This function should only be called from RedMemSet().

+

+    @param pDest    The buffer to initialize.

+    @param bVal     The byte value with which to initialize @p pDest.

+    @param ulLen    The number of bytes to initialize.

+*/

+static void RedMemSetUnchecked(

+    void       *pDest,

+    uint8_t     bVal,

+    uint32_t    ulLen)

+{

+    uint8_t    *pbDest = CAST_VOID_PTR_TO_UINT8_PTR(pDest);

+    uint32_t    ulIdx;

+

+    for(ulIdx = 0U; ulIdx < ulLen; ulIdx++)

+    {

+        pbDest[ulIdx] = bVal;

+    }

+}

+#endif

+

+

+/** @brief Compare the contents of two buffers.

+

+    @param pMem1    The first buffer to compare.

+    @param pMem2    The second buffer to compare.

+    @param ulLen    The length to compare.

+

+    @return Zero if the two buffers are the same, otherwise nonzero.

+

+    @retval 0   @p pMem1 and @p pMem2 are the same.

+    @retval 1   @p pMem1 is greater than @p pMem2, as determined by the

+                values of the first differing bytes.

+    @retval -1  @p pMem2 is greater than @p pMem1, as determined by the

+                values of the first differing bytes.

+*/

+int32_t RedMemCmp(

+    const void *pMem1,

+    const void *pMem2,

+    uint32_t    ulLen)

+{

+    int32_t     lResult;

+

+    if((pMem1 == NULL) || (pMem2 == NULL))

+    {

+        REDERROR();

+        lResult = 0;

+    }

+    else

+    {

+        lResult = RedMemCmpUnchecked(pMem1, pMem2, ulLen);

+    }

+

+    return lResult;

+}

+

+

+#ifndef RedMemCmpUnchecked

+/** @brief Compare the contents of two buffers.

+

+    @param pMem1    The first buffer to compare.

+    @param pMem2    The second buffer to compare.

+    @param ulLen    The length to compare.

+

+    @return Zero if the two buffers are the same, otherwise nonzero.

+*/

+static int32_t RedMemCmpUnchecked(

+    const void     *pMem1,

+    const void     *pMem2,

+    uint32_t        ulLen)

+{

+    const uint8_t  *pbMem1 = CAST_VOID_PTR_TO_CONST_UINT8_PTR(pMem1);

+    const uint8_t  *pbMem2 = CAST_VOID_PTR_TO_CONST_UINT8_PTR(pMem2);

+    uint32_t        ulIdx = 0U;

+    int32_t         lResult;

+

+    while((ulIdx < ulLen) && (pbMem1[ulIdx] == pbMem2[ulIdx]))

+    {

+        ulIdx++;

+    }

+

+    if(ulIdx == ulLen)

+    {

+        lResult = 0;

+    }

+    else if(pbMem1[ulIdx] > pbMem2[ulIdx])

+    {

+        lResult = 1;

+    }

+    else

+    {

+        lResult = -1;

+    }

+

+    return lResult;

+}

+#endif

+

diff --git a/FreeRTOS-Plus/Source/Reliance-Edge/util/namelen.c b/FreeRTOS-Plus/Source/Reliance-Edge/util/namelen.c
new file mode 100644
index 0000000..abf2c73
--- /dev/null
+++ b/FreeRTOS-Plus/Source/Reliance-Edge/util/namelen.c
@@ -0,0 +1,61 @@
+/*             ----> DO NOT REMOVE THE FOLLOWING NOTICE <----

+

+                   Copyright (c) 2014-2015 Datalight, Inc.

+                       All Rights Reserved Worldwide.

+

+    This program is free software; you can redistribute it and/or modify

+    it under the terms of the GNU General Public License as published by

+    the Free Software Foundation; use version 2 of the License.

+

+    This program is distributed in the hope that it will be useful,

+    but "AS-IS," WITHOUT ANY WARRANTY; without even the implied warranty

+    of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the

+    GNU General Public License for more details.

+

+    You should have received a copy of the GNU General Public License along

+    with this program; if not, write to the Free Software Foundation, Inc.,

+    51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.

+*/

+/*  Businesses and individuals that for commercial or other reasons cannot

+    comply with the terms of the GPLv2 license may obtain a commercial license

+    before incorporating Reliance Edge into proprietary software for

+    distribution in any form.  Visit http://www.datalight.com/reliance-edge for

+    more information.

+*/

+/** @file

+    @brief Implements a utility to find the length of a name.

+*/

+#include <redfs.h>

+

+#if REDCONF_API_POSIX == 1

+

+

+/** @brief Determine the length of a name, terminated either by a null or a path

+           separator character.

+

+    @param pszName  The name whose length is to be determined.

+

+    @return The length of the name.

+*/

+uint32_t RedNameLen(

+    const char *pszName)

+{

+    uint32_t    ulIdx = 0U;

+

+    if(pszName == NULL)

+    {

+        REDERROR();

+    }

+    else

+    {

+        while((pszName[ulIdx] != '\0') && (pszName[ulIdx] != REDCONF_PATH_SEPARATOR))

+        {

+            ulIdx++;

+        }

+    }

+

+    return ulIdx;

+}

+

+#endif

+

diff --git a/FreeRTOS-Plus/Source/Reliance-Edge/util/sign.c b/FreeRTOS-Plus/Source/Reliance-Edge/util/sign.c
new file mode 100644
index 0000000..d182ab1
--- /dev/null
+++ b/FreeRTOS-Plus/Source/Reliance-Edge/util/sign.c
@@ -0,0 +1,63 @@
+/*             ----> DO NOT REMOVE THE FOLLOWING NOTICE <----

+

+                   Copyright (c) 2014-2015 Datalight, Inc.

+                       All Rights Reserved Worldwide.

+

+    This program is free software; you can redistribute it and/or modify

+    it under the terms of the GNU General Public License as published by

+    the Free Software Foundation; use version 2 of the License.

+

+    This program is distributed in the hope that it will be useful,

+    but "AS-IS," WITHOUT ANY WARRANTY; without even the implied warranty

+    of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the

+    GNU General Public License for more details.

+

+    You should have received a copy of the GNU General Public License along

+    with this program; if not, write to the Free Software Foundation, Inc.,

+    51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.

+*/

+/*  Businesses and individuals that for commercial or other reasons cannot

+    comply with the terms of the GPLv2 license may obtain a commercial license

+    before incorporating Reliance Edge into proprietary software for

+    distribution in any form.  Visit http://www.datalight.com/reliance-edge for

+    more information.

+*/

+/** @file

+    @brief Implements a sign on message.

+*/

+#include <redfs.h>

+

+

+/** @brief Display the Reliance Edge signon message.

+*/

+void RedSignOn(void)

+{

+  #if REDCONF_OUTPUT == 1

+

+    /*  Use RedOsOutputString() instead of RedPrintf() to avoid using variadic

+        arguments, since this function is called from the driver and cannot use

+        functions that violate MISRA-C:2012.

+    */

+    RedOsOutputString(RED_PRODUCT_NAME "\n");

+    RedOsOutputString(RED_PRODUCT_EDITION "\n");

+    RedOsOutputString(RED_PRODUCT_LEGAL "\n");

+    RedOsOutputString(RED_PRODUCT_PATENT "\n");

+

+  #else

+

+    /*  Always embed the copyright into the program data.  Use "volatile" to try

+        to avoid the compiler removing the variables.

+    */

+    static volatile const char szVersion[] = RED_PRODUCT_NAME;

+    static volatile const char szEdition[] = RED_PRODUCT_EDITION;

+    static volatile const char szCopyright[] = RED_PRODUCT_LEGAL;

+    static volatile const char szPatent[] = RED_PRODUCT_PATENT;

+

+    (void)szVersion;

+    (void)szEdition;

+    (void)szCopyright;

+    (void)szPatent;

+

+  #endif

+}

+

diff --git a/FreeRTOS-Plus/Source/Reliance-Edge/util/string.c b/FreeRTOS-Plus/Source/Reliance-Edge/util/string.c
new file mode 100644
index 0000000..46119d9
--- /dev/null
+++ b/FreeRTOS-Plus/Source/Reliance-Edge/util/string.c
@@ -0,0 +1,329 @@
+/*             ----> DO NOT REMOVE THE FOLLOWING NOTICE <----

+

+                   Copyright (c) 2014-2015 Datalight, Inc.

+                       All Rights Reserved Worldwide.

+

+    This program is free software; you can redistribute it and/or modify

+    it under the terms of the GNU General Public License as published by

+    the Free Software Foundation; use version 2 of the License.

+

+    This program is distributed in the hope that it will be useful,

+    but "AS-IS," WITHOUT ANY WARRANTY; without even the implied warranty

+    of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the

+    GNU General Public License for more details.

+

+    You should have received a copy of the GNU General Public License along

+    with this program; if not, write to the Free Software Foundation, Inc.,

+    51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.

+*/

+/*  Businesses and individuals that for commercial or other reasons cannot

+    comply with the terms of the GPLv2 license may obtain a commercial license

+    before incorporating Reliance Edge into proprietary software for

+    distribution in any form.  Visit http://www.datalight.com/reliance-edge for

+    more information.

+*/

+/** @file

+    @brief Default implementations of string manipulation functions.

+

+    These implementations are intended to be small and simple, and thus forego

+    all optimizations.  If the C library is available, or if there are better

+    third-party implementations available in the system, those can be used

+    instead by defining the appropriate macros in redconf.h.

+

+    These functions are not intended to be completely 100% ANSI C compatible

+    implementations, but rather are designed to meet the needs of Reliance Edge.

+    The compatibility is close enough that ANSI C compatible implementations

+    can be "dropped in" as replacements without difficulty.

+*/

+#include <redfs.h>

+

+

+#ifndef RedStrLenUnchecked

+static uint32_t RedStrLenUnchecked(const char *pszStr);

+#endif

+#ifndef RedStrCmpUnchecked

+static int32_t RedStrCmpUnchecked(const char *pszStr1, const char *pszStr2);

+#endif

+#ifndef RedStrNCmpUnchecked

+static int32_t RedStrNCmpUnchecked(const char *pszStr1, const char *pszStr2, uint32_t ulLen);

+#endif

+#ifndef RedStrNCpyUnchecked

+static void RedStrNCpyUnchecked(char *pszDst, const char *pszSrc, uint32_t ulLen);

+#endif

+

+

+/** @brief Determine the length (in bytes) of a null terminated string.

+

+    The length does not include the null terminator byte.

+

+    @param pszStr   The null terminated string whose length is to be determined.

+

+    @return The length of the @p pszStr string.

+*/

+uint32_t RedStrLen(

+    const char *pszStr)

+{

+    uint32_t    ulLen;

+

+    if(pszStr == NULL)

+    {

+        REDERROR();

+        ulLen = 0U;

+    }

+    else

+    {

+        /*  Cast the result to uint32_t, since RedStrLenUnchecked() might be

+            strlen(), which returns size_t, which is possibly a 64-bit value.

+        */

+        ulLen = (uint32_t)RedStrLenUnchecked(pszStr);

+    }

+

+    return ulLen;

+}

+

+

+#ifndef RedStrLenUnchecked

+/** @brief Determine the length (in bytes) of a null terminated string.

+

+    @param pszStr   The null terminated string whose length is to be determined.

+

+    @return The length of the @p pszStr string.

+*/

+static uint32_t RedStrLenUnchecked(

+    const char *pszStr)

+{

+    uint32_t    ulLen = 0U;

+

+    while(pszStr[ulLen] != '\0')

+    {

+        ulLen++;

+    }

+

+    return ulLen;

+}

+#endif

+

+

+/** @brief Compare two null terminated strings.

+

+    @param pszStr1  The first string to compare.

+    @param pszStr2  The second string to compare.

+

+    @return Zero if the two strings are the same, otherwise nonzero.

+

+    @retval 0   @p pszStr1 and @p pszStr2 are the same.

+    @retval 1   @p pszStr1 is greater than @p pszStr2, as determined by the

+                values of the first differing bytes.

+    @retval -1  @p pszStr2 is greater than @p pszStr1, as determined by the

+                values of the first differing bytes.

+*/

+int32_t RedStrCmp(

+    const char *pszStr1,

+    const char *pszStr2)

+{

+    int32_t     lResult;

+

+    if((pszStr1 == NULL) || (pszStr2 == NULL))

+    {

+        REDERROR();

+        lResult = 0;

+    }

+    else

+    {

+        lResult = RedStrCmpUnchecked(pszStr1, pszStr2);

+    }

+

+    return lResult;

+}

+

+

+#ifndef RedStrCmpUnchecked

+/** @brief Compare two null terminated strings.

+

+    @param pszStr1  The first string to compare.

+    @param pszStr2  The second string to compare.

+

+    @return Zero if the two strings are the same, otherwise nonzero.

+*/

+static int32_t RedStrCmpUnchecked(

+    const char *pszStr1,

+    const char *pszStr2)

+{

+    int32_t     lResult;

+    uint32_t    ulIdx = 0U;

+

+    while((pszStr1[ulIdx] == pszStr2[ulIdx]) && (pszStr1[ulIdx] != '\0'))

+    {

+        ulIdx++;

+    }

+

+    /*  "The sign of a non-zero return value is determined by the sign of the

+        difference between the values of the first pair of bytes (both

+        interpreted as type unsigned char) that differ in the strings being

+        compared."  Use uint8_t instead of unsigned char to avoid MISRA C

+        deviations.

+    */

+    if((uint8_t)pszStr1[ulIdx] > (uint8_t)pszStr2[ulIdx])

+    {

+        lResult = 1;

+    }

+    else if((uint8_t)pszStr1[ulIdx] < (uint8_t)pszStr2[ulIdx])

+    {

+        lResult = -1;

+    }

+    else

+    {

+        lResult = 0;

+    }

+

+    return lResult;

+}

+#endif

+

+

+/** @brief Compare the first @p ulLen characters of two null terminated strings.

+

+    @param pszStr1  The first string to compare.

+    @param pszStr2  The second string to compare.

+    @param ulLen    The maximum length to compare.  The comparison stops when

+                    either of the strings end or when @p ulLen bytes have been

+                    compared.

+

+    @return Zero if the two strings are the same, otherwise nonzero.

+

+    @retval 0   @p pszStr1 and @p pszStr2 are the same.

+    @retval 1   @p pszStr1 is greater than @p pszStr2, as determined by the

+                values of the first differing bytes.

+    @retval -1  @p pszStr2 is greater than @p pszStr1, as determined by the

+                values of the first differing bytes.

+*/

+int32_t RedStrNCmp(

+    const char *pszStr1,

+    const char *pszStr2,

+    uint32_t    ulLen)

+{

+    int32_t     lResult;

+

+    if((pszStr1 == NULL) || (pszStr2 == NULL))

+    {

+        REDERROR();

+        lResult = 0;

+    }

+    else

+    {

+        lResult = RedStrNCmpUnchecked(pszStr1, pszStr2, ulLen);

+    }

+

+    return lResult;

+}

+

+

+#ifndef RedStrNCmpUnchecked

+/** @brief Compare the first @p ulLen characters of two null terminated strings.

+

+    @param pszStr1  The first string to compare.

+    @param pszStr2  The second string to compare.

+    @param ulLen    The maximum length to compare.  The comparison stops when

+                    either of the strings end or when @p ulLen bytes have been

+                    compared.

+

+    @return Zero if the two strings are the same, otherwise nonzero.

+*/

+static int32_t RedStrNCmpUnchecked(

+    const char *pszStr1,

+    const char *pszStr2,

+    uint32_t    ulLen)

+{

+    int32_t     lResult = 0;

+    uint32_t    ulIdx;

+

+    for(ulIdx = 0U; ulIdx < ulLen; ulIdx++)

+    {

+        if(pszStr1[ulIdx] != pszStr2[ulIdx])

+        {

+            /*  "The sign of a non-zero return value is determined by the sign

+                of the difference between the values of the first pair of bytes

+                (both interpreted as type unsigned char) that differ in the

+                strings being compared."  Use uint8_t instead of unsigned char

+                to avoid MISRA C deviations.

+            */

+            if((uint8_t)pszStr1[ulIdx] > (uint8_t)pszStr2[ulIdx])

+            {

+                lResult = 1;

+            }

+            else

+            {

+                lResult = -1;

+            }

+        }

+

+        if((lResult != 0) || (pszStr1[ulIdx] == '\0'))

+        {

+            break;

+        }

+    }

+

+    return lResult;

+}

+#endif

+

+

+/** @brief Copy a string.

+

+    Copy up to @p ulLen bytes of a null-terminated string (@p pszSrc) to a

+    destination buffer (@p pszDst).  The result will not be null-terminated if

+    @p pszSrc is longer than @p ulLen - 1 bytes.

+

+    If @p pszSrc is shorter than @p ulLen - 1 bytes, the remainder of @p pszDst

+    will be filled with null bytes.

+

+    @param pszDst   The destination buffer, which is at least @p ulLen bytes

+                    in size.

+    @param pszSrc   The null-terminated string to copy.

+    @param ulLen    The maximum number of characters to copy.

+*/

+void RedStrNCpy(

+    char       *pszDst,

+    const char *pszSrc,

+    uint32_t    ulLen)

+{

+    if((pszDst == NULL) || (pszSrc == NULL))

+    {

+        REDERROR();

+    }

+    else

+    {

+        RedStrNCpyUnchecked(pszDst, pszSrc, ulLen);

+    }

+}

+

+

+#ifndef RedStrNCpyUnchecked

+/** @brief Copy a string.

+

+    @param pszDst   The destination buffer, which is at least @p ulLen bytes

+                    in size.

+    @param pszSrc   The null-terminated string to copy.

+    @param ulLen    The maximum number of characters to copy.

+*/

+static void RedStrNCpyUnchecked(

+    char       *pszDst,

+    const char *pszSrc,

+    uint32_t    ulLen)

+{

+    uint32_t    ulIdx = 0U;

+

+    while((ulIdx < ulLen) && (pszSrc[ulIdx] != '\0'))

+    {

+        pszDst[ulIdx] = pszSrc[ulIdx];

+        ulIdx++;

+    }

+

+    while(ulIdx < ulLen)

+    {

+        pszDst[ulIdx] = '\0';

+        ulIdx++;

+    }

+}

+#endif

+

diff --git a/FreeRTOS/Demo/ARM7_AT91FR40008_GCC/FreeRTOSConfig.h b/FreeRTOS/Demo/ARM7_AT91FR40008_GCC/FreeRTOSConfig.h
index d492418..002462f 100644
--- a/FreeRTOS/Demo/ARM7_AT91FR40008_GCC/FreeRTOSConfig.h
+++ b/FreeRTOS/Demo/ARM7_AT91FR40008_GCC/FreeRTOSConfig.h
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Demo/ARM7_AT91FR40008_GCC/Makefile b/FreeRTOS/Demo/ARM7_AT91FR40008_GCC/Makefile
index 1297aca..390980e 100644
--- a/FreeRTOS/Demo/ARM7_AT91FR40008_GCC/Makefile
+++ b/FreeRTOS/Demo/ARM7_AT91FR40008_GCC/Makefile
@@ -1,5 +1,5 @@
 #/*

-#    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+#    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

 #	

 #

 #    ***************************************************************************

diff --git a/FreeRTOS/Demo/ARM7_AT91FR40008_GCC/ParTest/ParTest.c b/FreeRTOS/Demo/ARM7_AT91FR40008_GCC/ParTest/ParTest.c
index 62add36..476071b 100644
--- a/FreeRTOS/Demo/ARM7_AT91FR40008_GCC/ParTest/ParTest.c
+++ b/FreeRTOS/Demo/ARM7_AT91FR40008_GCC/ParTest/ParTest.c
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Demo/ARM7_AT91FR40008_GCC/main.c b/FreeRTOS/Demo/ARM7_AT91FR40008_GCC/main.c
index ff7cc57..0e9d8e6 100644
--- a/FreeRTOS/Demo/ARM7_AT91FR40008_GCC/main.c
+++ b/FreeRTOS/Demo/ARM7_AT91FR40008_GCC/main.c
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Demo/ARM7_AT91FR40008_GCC/serial/serial.c b/FreeRTOS/Demo/ARM7_AT91FR40008_GCC/serial/serial.c
index 4cf41c6..9da154e 100644
--- a/FreeRTOS/Demo/ARM7_AT91FR40008_GCC/serial/serial.c
+++ b/FreeRTOS/Demo/ARM7_AT91FR40008_GCC/serial/serial.c
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Demo/ARM7_AT91FR40008_GCC/serial/serialISR.c b/FreeRTOS/Demo/ARM7_AT91FR40008_GCC/serial/serialISR.c
index 8f1bd50..5f0d57f 100644
--- a/FreeRTOS/Demo/ARM7_AT91FR40008_GCC/serial/serialISR.c
+++ b/FreeRTOS/Demo/ARM7_AT91FR40008_GCC/serial/serialISR.c
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Demo/ARM7_AT91SAM7S64_IAR/FreeRTOSConfig.h b/FreeRTOS/Demo/ARM7_AT91SAM7S64_IAR/FreeRTOSConfig.h
index 1e6e3fa..4ca3280 100644
--- a/FreeRTOS/Demo/ARM7_AT91SAM7S64_IAR/FreeRTOSConfig.h
+++ b/FreeRTOS/Demo/ARM7_AT91SAM7S64_IAR/FreeRTOSConfig.h
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Demo/ARM7_AT91SAM7S64_IAR/ParTest/ParTest.c b/FreeRTOS/Demo/ARM7_AT91SAM7S64_IAR/ParTest/ParTest.c
index b4cb322..f60b4a4 100644
--- a/FreeRTOS/Demo/ARM7_AT91SAM7S64_IAR/ParTest/ParTest.c
+++ b/FreeRTOS/Demo/ARM7_AT91SAM7S64_IAR/ParTest/ParTest.c
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Demo/ARM7_AT91SAM7S64_IAR/USB/USBSample.c b/FreeRTOS/Demo/ARM7_AT91SAM7S64_IAR/USB/USBSample.c
index 991353c..a5b1f7e 100644
--- a/FreeRTOS/Demo/ARM7_AT91SAM7S64_IAR/USB/USBSample.c
+++ b/FreeRTOS/Demo/ARM7_AT91SAM7S64_IAR/USB/USBSample.c
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Demo/ARM7_AT91SAM7S64_IAR/main.c b/FreeRTOS/Demo/ARM7_AT91SAM7S64_IAR/main.c
index 1dbe4df..a05ebd4 100644
--- a/FreeRTOS/Demo/ARM7_AT91SAM7S64_IAR/main.c
+++ b/FreeRTOS/Demo/ARM7_AT91SAM7S64_IAR/main.c
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Demo/ARM7_AT91SAM7S64_IAR/serial/serial.c b/FreeRTOS/Demo/ARM7_AT91SAM7S64_IAR/serial/serial.c
index bb548d2..eb806ad 100644
--- a/FreeRTOS/Demo/ARM7_AT91SAM7S64_IAR/serial/serial.c
+++ b/FreeRTOS/Demo/ARM7_AT91SAM7S64_IAR/serial/serial.c
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Demo/ARM7_AT91SAM7X256_Eclipse/RTOSDemo/FreeRTOSConfig.h b/FreeRTOS/Demo/ARM7_AT91SAM7X256_Eclipse/RTOSDemo/FreeRTOSConfig.h
index 199ac5d..ac573b1 100644
--- a/FreeRTOS/Demo/ARM7_AT91SAM7X256_Eclipse/RTOSDemo/FreeRTOSConfig.h
+++ b/FreeRTOS/Demo/ARM7_AT91SAM7X256_Eclipse/RTOSDemo/FreeRTOSConfig.h
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Demo/ARM7_AT91SAM7X256_Eclipse/RTOSDemo/Makefile b/FreeRTOS/Demo/ARM7_AT91SAM7X256_Eclipse/RTOSDemo/Makefile
index b365472..2d7ac7d 100644
--- a/FreeRTOS/Demo/ARM7_AT91SAM7X256_Eclipse/RTOSDemo/Makefile
+++ b/FreeRTOS/Demo/ARM7_AT91SAM7X256_Eclipse/RTOSDemo/Makefile
@@ -1,5 +1,5 @@
 #/*

-#    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+#    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

 #	

 #

 #    ***************************************************************************

diff --git a/FreeRTOS/Demo/ARM7_AT91SAM7X256_Eclipse/RTOSDemo/ParTest/ParTest.c b/FreeRTOS/Demo/ARM7_AT91SAM7X256_Eclipse/RTOSDemo/ParTest/ParTest.c
index ba8acac..fa3c569 100644
--- a/FreeRTOS/Demo/ARM7_AT91SAM7X256_Eclipse/RTOSDemo/ParTest/ParTest.c
+++ b/FreeRTOS/Demo/ARM7_AT91SAM7X256_Eclipse/RTOSDemo/ParTest/ParTest.c
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Demo/ARM7_AT91SAM7X256_Eclipse/RTOSDemo/USB/USBSample.c b/FreeRTOS/Demo/ARM7_AT91SAM7X256_Eclipse/RTOSDemo/USB/USBSample.c
index bcc7cea..4d0caf5 100644
--- a/FreeRTOS/Demo/ARM7_AT91SAM7X256_Eclipse/RTOSDemo/USB/USBSample.c
+++ b/FreeRTOS/Demo/ARM7_AT91SAM7X256_Eclipse/RTOSDemo/USB/USBSample.c
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Demo/ARM7_AT91SAM7X256_Eclipse/RTOSDemo/USB/USBSample.h b/FreeRTOS/Demo/ARM7_AT91SAM7X256_Eclipse/RTOSDemo/USB/USBSample.h
index af9d5e2..fc4bcbd 100644
--- a/FreeRTOS/Demo/ARM7_AT91SAM7X256_Eclipse/RTOSDemo/USB/USBSample.h
+++ b/FreeRTOS/Demo/ARM7_AT91SAM7X256_Eclipse/RTOSDemo/USB/USBSample.h
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Demo/ARM7_AT91SAM7X256_Eclipse/RTOSDemo/USB/USB_ISR.c b/FreeRTOS/Demo/ARM7_AT91SAM7X256_Eclipse/RTOSDemo/USB/USB_ISR.c
index 180a2d1..f7ae70d 100644
--- a/FreeRTOS/Demo/ARM7_AT91SAM7X256_Eclipse/RTOSDemo/USB/USB_ISR.c
+++ b/FreeRTOS/Demo/ARM7_AT91SAM7X256_Eclipse/RTOSDemo/USB/USB_ISR.c
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Demo/ARM7_AT91SAM7X256_Eclipse/RTOSDemo/main.c b/FreeRTOS/Demo/ARM7_AT91SAM7X256_Eclipse/RTOSDemo/main.c
index 6414ca5..92ea150 100644
--- a/FreeRTOS/Demo/ARM7_AT91SAM7X256_Eclipse/RTOSDemo/main.c
+++ b/FreeRTOS/Demo/ARM7_AT91SAM7X256_Eclipse/RTOSDemo/main.c
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Demo/ARM7_AT91SAM7X256_Eclipse/RTOSDemo/webserver/EMAC_ISR.c b/FreeRTOS/Demo/ARM7_AT91SAM7X256_Eclipse/RTOSDemo/webserver/EMAC_ISR.c
index 4d0bd22..f73a3e6 100644
--- a/FreeRTOS/Demo/ARM7_AT91SAM7X256_Eclipse/RTOSDemo/webserver/EMAC_ISR.c
+++ b/FreeRTOS/Demo/ARM7_AT91SAM7X256_Eclipse/RTOSDemo/webserver/EMAC_ISR.c
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Demo/ARM7_AT91SAM7X256_Eclipse/RTOSDemo/webserver/SAM7_EMAC.c b/FreeRTOS/Demo/ARM7_AT91SAM7X256_Eclipse/RTOSDemo/webserver/SAM7_EMAC.c
index 8afc7bd..9e512bc 100644
--- a/FreeRTOS/Demo/ARM7_AT91SAM7X256_Eclipse/RTOSDemo/webserver/SAM7_EMAC.c
+++ b/FreeRTOS/Demo/ARM7_AT91SAM7X256_Eclipse/RTOSDemo/webserver/SAM7_EMAC.c
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Demo/ARM7_AT91SAM7X256_Eclipse/RTOSDemo/webserver/SAM7_EMAC.h b/FreeRTOS/Demo/ARM7_AT91SAM7X256_Eclipse/RTOSDemo/webserver/SAM7_EMAC.h
index 0bd8122..3313290 100644
--- a/FreeRTOS/Demo/ARM7_AT91SAM7X256_Eclipse/RTOSDemo/webserver/SAM7_EMAC.h
+++ b/FreeRTOS/Demo/ARM7_AT91SAM7X256_Eclipse/RTOSDemo/webserver/SAM7_EMAC.h
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Demo/ARM7_AT91SAM7X256_Eclipse/RTOSDemo/webserver/uIP_Task.h b/FreeRTOS/Demo/ARM7_AT91SAM7X256_Eclipse/RTOSDemo/webserver/uIP_Task.h
index 79165b8..a6546de 100644
--- a/FreeRTOS/Demo/ARM7_AT91SAM7X256_Eclipse/RTOSDemo/webserver/uIP_Task.h
+++ b/FreeRTOS/Demo/ARM7_AT91SAM7X256_Eclipse/RTOSDemo/webserver/uIP_Task.h
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Demo/ARM7_LPC2106_GCC/FreeRTOSConfig.h b/FreeRTOS/Demo/ARM7_LPC2106_GCC/FreeRTOSConfig.h
index ed92e18..b04da97 100644
--- a/FreeRTOS/Demo/ARM7_LPC2106_GCC/FreeRTOSConfig.h
+++ b/FreeRTOS/Demo/ARM7_LPC2106_GCC/FreeRTOSConfig.h
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Demo/ARM7_LPC2106_GCC/Makefile b/FreeRTOS/Demo/ARM7_LPC2106_GCC/Makefile
index 8d026ba..01c396f 100644
--- a/FreeRTOS/Demo/ARM7_LPC2106_GCC/Makefile
+++ b/FreeRTOS/Demo/ARM7_LPC2106_GCC/Makefile
@@ -1,5 +1,5 @@
 #/*

-#    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+#    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

 #	

 #

 #    ***************************************************************************

diff --git a/FreeRTOS/Demo/ARM7_LPC2106_GCC/ParTest/ParTest.c b/FreeRTOS/Demo/ARM7_LPC2106_GCC/ParTest/ParTest.c
index 4df6f02..2526af3 100644
--- a/FreeRTOS/Demo/ARM7_LPC2106_GCC/ParTest/ParTest.c
+++ b/FreeRTOS/Demo/ARM7_LPC2106_GCC/ParTest/ParTest.c
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Demo/ARM7_LPC2106_GCC/main.c b/FreeRTOS/Demo/ARM7_LPC2106_GCC/main.c
index 76bd09a..df4dcf2 100644
--- a/FreeRTOS/Demo/ARM7_LPC2106_GCC/main.c
+++ b/FreeRTOS/Demo/ARM7_LPC2106_GCC/main.c
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Demo/ARM7_LPC2106_GCC/serial/serial.c b/FreeRTOS/Demo/ARM7_LPC2106_GCC/serial/serial.c
index 9269988..aea1302 100644
--- a/FreeRTOS/Demo/ARM7_LPC2106_GCC/serial/serial.c
+++ b/FreeRTOS/Demo/ARM7_LPC2106_GCC/serial/serial.c
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Demo/ARM7_LPC2106_GCC/serial/serialISR.c b/FreeRTOS/Demo/ARM7_LPC2106_GCC/serial/serialISR.c
index 0e6a94d..08d9d1f 100644
--- a/FreeRTOS/Demo/ARM7_LPC2106_GCC/serial/serialISR.c
+++ b/FreeRTOS/Demo/ARM7_LPC2106_GCC/serial/serialISR.c
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Demo/ARM7_LPC2129_IAR/FreeRTOSConfig.h b/FreeRTOS/Demo/ARM7_LPC2129_IAR/FreeRTOSConfig.h
index 80bebb2..a8a55dd 100644
--- a/FreeRTOS/Demo/ARM7_LPC2129_IAR/FreeRTOSConfig.h
+++ b/FreeRTOS/Demo/ARM7_LPC2129_IAR/FreeRTOSConfig.h
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Demo/ARM7_LPC2129_IAR/ParTest/ParTest.c b/FreeRTOS/Demo/ARM7_LPC2129_IAR/ParTest/ParTest.c
index c593322..4742cc2 100644
--- a/FreeRTOS/Demo/ARM7_LPC2129_IAR/ParTest/ParTest.c
+++ b/FreeRTOS/Demo/ARM7_LPC2129_IAR/ParTest/ParTest.c
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Demo/ARM7_LPC2129_IAR/main.c b/FreeRTOS/Demo/ARM7_LPC2129_IAR/main.c
index 87bdf3e..96ed676 100644
--- a/FreeRTOS/Demo/ARM7_LPC2129_IAR/main.c
+++ b/FreeRTOS/Demo/ARM7_LPC2129_IAR/main.c
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Demo/ARM7_LPC2129_IAR/serial/serial.c b/FreeRTOS/Demo/ARM7_LPC2129_IAR/serial/serial.c
index 23a7d86..458b6b3 100644
--- a/FreeRTOS/Demo/ARM7_LPC2129_IAR/serial/serial.c
+++ b/FreeRTOS/Demo/ARM7_LPC2129_IAR/serial/serial.c
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Demo/ARM7_LPC2129_Keil_RVDS/FreeRTOSConfig.h b/FreeRTOS/Demo/ARM7_LPC2129_Keil_RVDS/FreeRTOSConfig.h
index 28e8e2d..e909d3b 100644
--- a/FreeRTOS/Demo/ARM7_LPC2129_Keil_RVDS/FreeRTOSConfig.h
+++ b/FreeRTOS/Demo/ARM7_LPC2129_Keil_RVDS/FreeRTOSConfig.h
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Demo/ARM7_LPC2129_Keil_RVDS/ParTest/ParTest.c b/FreeRTOS/Demo/ARM7_LPC2129_Keil_RVDS/ParTest/ParTest.c
index ab33216..4ba1d10 100644
--- a/FreeRTOS/Demo/ARM7_LPC2129_Keil_RVDS/ParTest/ParTest.c
+++ b/FreeRTOS/Demo/ARM7_LPC2129_Keil_RVDS/ParTest/ParTest.c
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Demo/ARM7_LPC2129_Keil_RVDS/main.c b/FreeRTOS/Demo/ARM7_LPC2129_Keil_RVDS/main.c
index 7644393..a92ede0 100644
--- a/FreeRTOS/Demo/ARM7_LPC2129_Keil_RVDS/main.c
+++ b/FreeRTOS/Demo/ARM7_LPC2129_Keil_RVDS/main.c
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Demo/ARM7_LPC2129_Keil_RVDS/serial/serial.c b/FreeRTOS/Demo/ARM7_LPC2129_Keil_RVDS/serial/serial.c
index 457c97c..8716822 100644
--- a/FreeRTOS/Demo/ARM7_LPC2129_Keil_RVDS/serial/serial.c
+++ b/FreeRTOS/Demo/ARM7_LPC2129_Keil_RVDS/serial/serial.c
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Demo/ARM7_LPC2129_Keil_RVDS/serial/serialISR.s b/FreeRTOS/Demo/ARM7_LPC2129_Keil_RVDS/serial/serialISR.s
index 8489180..ba84489 100644
--- a/FreeRTOS/Demo/ARM7_LPC2129_Keil_RVDS/serial/serialISR.s
+++ b/FreeRTOS/Demo/ARM7_LPC2129_Keil_RVDS/serial/serialISR.s
@@ -1,5 +1,5 @@
 ;/*

-;    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+;    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

 ;	

 ;

 ;    ***************************************************************************

diff --git a/FreeRTOS/Demo/ARM7_LPC2138_Rowley/FreeRTOSConfig.h b/FreeRTOS/Demo/ARM7_LPC2138_Rowley/FreeRTOSConfig.h
index 4543e16..c8260b2 100644
--- a/FreeRTOS/Demo/ARM7_LPC2138_Rowley/FreeRTOSConfig.h
+++ b/FreeRTOS/Demo/ARM7_LPC2138_Rowley/FreeRTOSConfig.h
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Demo/ARM7_LPC2138_Rowley/main.c b/FreeRTOS/Demo/ARM7_LPC2138_Rowley/main.c
index e7b43ff..297b5c3 100644
--- a/FreeRTOS/Demo/ARM7_LPC2138_Rowley/main.c
+++ b/FreeRTOS/Demo/ARM7_LPC2138_Rowley/main.c
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Demo/ARM7_LPC2138_Rowley/mainISR.c b/FreeRTOS/Demo/ARM7_LPC2138_Rowley/mainISR.c
index 2a3a1b8..f985486 100644
--- a/FreeRTOS/Demo/ARM7_LPC2138_Rowley/mainISR.c
+++ b/FreeRTOS/Demo/ARM7_LPC2138_Rowley/mainISR.c
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Demo/ARM7_LPC2368_Eclipse/RTOSDemo/FreeRTOSConfig.h b/FreeRTOS/Demo/ARM7_LPC2368_Eclipse/RTOSDemo/FreeRTOSConfig.h
index b4b1b3c..829b1ed 100644
--- a/FreeRTOS/Demo/ARM7_LPC2368_Eclipse/RTOSDemo/FreeRTOSConfig.h
+++ b/FreeRTOS/Demo/ARM7_LPC2368_Eclipse/RTOSDemo/FreeRTOSConfig.h
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Demo/ARM7_LPC2368_Eclipse/RTOSDemo/Makefile b/FreeRTOS/Demo/ARM7_LPC2368_Eclipse/RTOSDemo/Makefile
index 3f100e3..ae5f04b 100644
--- a/FreeRTOS/Demo/ARM7_LPC2368_Eclipse/RTOSDemo/Makefile
+++ b/FreeRTOS/Demo/ARM7_LPC2368_Eclipse/RTOSDemo/Makefile
@@ -1,5 +1,5 @@
 #/*

-#    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+#    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

 #	

 #

 #    ***************************************************************************

diff --git a/FreeRTOS/Demo/ARM7_LPC2368_Eclipse/RTOSDemo/ParTest/ParTest.c b/FreeRTOS/Demo/ARM7_LPC2368_Eclipse/RTOSDemo/ParTest/ParTest.c
index da4a251..bccef10 100644
--- a/FreeRTOS/Demo/ARM7_LPC2368_Eclipse/RTOSDemo/ParTest/ParTest.c
+++ b/FreeRTOS/Demo/ARM7_LPC2368_Eclipse/RTOSDemo/ParTest/ParTest.c
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Demo/ARM7_LPC2368_Eclipse/RTOSDemo/main.c b/FreeRTOS/Demo/ARM7_LPC2368_Eclipse/RTOSDemo/main.c
index 30d475b..d8c3d0a 100644
--- a/FreeRTOS/Demo/ARM7_LPC2368_Eclipse/RTOSDemo/main.c
+++ b/FreeRTOS/Demo/ARM7_LPC2368_Eclipse/RTOSDemo/main.c
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

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 2146045..b1638f6 100644
--- a/FreeRTOS/Demo/ARM7_LPC2368_Eclipse/RTOSDemo/webserver/uIP_Task.c
+++ b/FreeRTOS/Demo/ARM7_LPC2368_Eclipse/RTOSDemo/webserver/uIP_Task.c
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Demo/ARM7_LPC2368_Rowley/FreeRTOSConfig.h b/FreeRTOS/Demo/ARM7_LPC2368_Rowley/FreeRTOSConfig.h
index 5cbfb93..3d7da51 100644
--- a/FreeRTOS/Demo/ARM7_LPC2368_Rowley/FreeRTOSConfig.h
+++ b/FreeRTOS/Demo/ARM7_LPC2368_Rowley/FreeRTOSConfig.h
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Demo/ARM7_LPC2368_Rowley/ParTest/ParTest.c b/FreeRTOS/Demo/ARM7_LPC2368_Rowley/ParTest/ParTest.c
index da4a251..bccef10 100644
--- a/FreeRTOS/Demo/ARM7_LPC2368_Rowley/ParTest/ParTest.c
+++ b/FreeRTOS/Demo/ARM7_LPC2368_Rowley/ParTest/ParTest.c
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Demo/ARM7_LPC2368_Rowley/main.c b/FreeRTOS/Demo/ARM7_LPC2368_Rowley/main.c
index 7b2ee04..f6cf9f6 100644
--- a/FreeRTOS/Demo/ARM7_LPC2368_Rowley/main.c
+++ b/FreeRTOS/Demo/ARM7_LPC2368_Rowley/main.c
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Demo/ARM7_LPC2368_Rowley/webserver/uIP_Task.c b/FreeRTOS/Demo/ARM7_LPC2368_Rowley/webserver/uIP_Task.c
index 6d5f7e9..efbcd7a 100644
--- a/FreeRTOS/Demo/ARM7_LPC2368_Rowley/webserver/uIP_Task.c
+++ b/FreeRTOS/Demo/ARM7_LPC2368_Rowley/webserver/uIP_Task.c
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Demo/ARM7_STR71x_IAR/FreeRTOSConfig.h b/FreeRTOS/Demo/ARM7_STR71x_IAR/FreeRTOSConfig.h
index 6992e66..bee6635 100644
--- a/FreeRTOS/Demo/ARM7_STR71x_IAR/FreeRTOSConfig.h
+++ b/FreeRTOS/Demo/ARM7_STR71x_IAR/FreeRTOSConfig.h
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Demo/ARM7_STR71x_IAR/ParTest/ParTest.c b/FreeRTOS/Demo/ARM7_STR71x_IAR/ParTest/ParTest.c
index 169c9db..8d06c35 100644
--- a/FreeRTOS/Demo/ARM7_STR71x_IAR/ParTest/ParTest.c
+++ b/FreeRTOS/Demo/ARM7_STR71x_IAR/ParTest/ParTest.c
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Demo/ARM7_STR71x_IAR/main.c b/FreeRTOS/Demo/ARM7_STR71x_IAR/main.c
index 719daf8..551046a 100644
--- a/FreeRTOS/Demo/ARM7_STR71x_IAR/main.c
+++ b/FreeRTOS/Demo/ARM7_STR71x_IAR/main.c
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Demo/ARM7_STR71x_IAR/serial/serial.c b/FreeRTOS/Demo/ARM7_STR71x_IAR/serial/serial.c
index 02cba20..0927f62 100644
--- a/FreeRTOS/Demo/ARM7_STR71x_IAR/serial/serial.c
+++ b/FreeRTOS/Demo/ARM7_STR71x_IAR/serial/serial.c
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Demo/ARM7_STR75x_GCC/FreeRTOSConfig.h b/FreeRTOS/Demo/ARM7_STR75x_GCC/FreeRTOSConfig.h
index 1452883..5b5bdec 100644
--- a/FreeRTOS/Demo/ARM7_STR75x_GCC/FreeRTOSConfig.h
+++ b/FreeRTOS/Demo/ARM7_STR75x_GCC/FreeRTOSConfig.h
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Demo/ARM7_STR75x_GCC/ParTest/ParTest.c b/FreeRTOS/Demo/ARM7_STR75x_GCC/ParTest/ParTest.c
index d9fef69..104da00 100644
--- a/FreeRTOS/Demo/ARM7_STR75x_GCC/ParTest/ParTest.c
+++ b/FreeRTOS/Demo/ARM7_STR75x_GCC/ParTest/ParTest.c
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Demo/ARM7_STR75x_GCC/main.c b/FreeRTOS/Demo/ARM7_STR75x_GCC/main.c
index 15f55cc..7851274 100644
--- a/FreeRTOS/Demo/ARM7_STR75x_GCC/main.c
+++ b/FreeRTOS/Demo/ARM7_STR75x_GCC/main.c
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Demo/ARM7_STR75x_GCC/serial/serial.c b/FreeRTOS/Demo/ARM7_STR75x_GCC/serial/serial.c
index 5741dd5..3e297f4 100644
--- a/FreeRTOS/Demo/ARM7_STR75x_GCC/serial/serial.c
+++ b/FreeRTOS/Demo/ARM7_STR75x_GCC/serial/serial.c
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Demo/ARM7_STR75x_GCC/serial/serialISR.c b/FreeRTOS/Demo/ARM7_STR75x_GCC/serial/serialISR.c
index 64cfce3..ab04411 100644
--- a/FreeRTOS/Demo/ARM7_STR75x_GCC/serial/serialISR.c
+++ b/FreeRTOS/Demo/ARM7_STR75x_GCC/serial/serialISR.c
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Demo/ARM7_STR75x_IAR/FreeRTOSConfig.h b/FreeRTOS/Demo/ARM7_STR75x_IAR/FreeRTOSConfig.h
index 12f88ec..02dab01 100644
--- a/FreeRTOS/Demo/ARM7_STR75x_IAR/FreeRTOSConfig.h
+++ b/FreeRTOS/Demo/ARM7_STR75x_IAR/FreeRTOSConfig.h
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Demo/ARM7_STR75x_IAR/ParTest/ParTest.c b/FreeRTOS/Demo/ARM7_STR75x_IAR/ParTest/ParTest.c
index d9fef69..104da00 100644
--- a/FreeRTOS/Demo/ARM7_STR75x_IAR/ParTest/ParTest.c
+++ b/FreeRTOS/Demo/ARM7_STR75x_IAR/ParTest/ParTest.c
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Demo/ARM7_STR75x_IAR/main.c b/FreeRTOS/Demo/ARM7_STR75x_IAR/main.c
index d078bcf..b891f59 100644
--- a/FreeRTOS/Demo/ARM7_STR75x_IAR/main.c
+++ b/FreeRTOS/Demo/ARM7_STR75x_IAR/main.c
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Demo/ARM7_STR75x_IAR/serial/serial.c b/FreeRTOS/Demo/ARM7_STR75x_IAR/serial/serial.c
index f696b8a..2087f4c 100644
--- a/FreeRTOS/Demo/ARM7_STR75x_IAR/serial/serial.c
+++ b/FreeRTOS/Demo/ARM7_STR75x_IAR/serial/serial.c
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Demo/ARM9_AT91SAM9XE_IAR/FreeRTOSConfig.h b/FreeRTOS/Demo/ARM9_AT91SAM9XE_IAR/FreeRTOSConfig.h
index e09949a..802f39d 100644
--- a/FreeRTOS/Demo/ARM9_AT91SAM9XE_IAR/FreeRTOSConfig.h
+++ b/FreeRTOS/Demo/ARM9_AT91SAM9XE_IAR/FreeRTOSConfig.h
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Demo/ARM9_AT91SAM9XE_IAR/ParTest/ParTest.c b/FreeRTOS/Demo/ARM9_AT91SAM9XE_IAR/ParTest/ParTest.c
index 34029e9..20b7ca8 100644
--- a/FreeRTOS/Demo/ARM9_AT91SAM9XE_IAR/ParTest/ParTest.c
+++ b/FreeRTOS/Demo/ARM9_AT91SAM9XE_IAR/ParTest/ParTest.c
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Demo/ARM9_AT91SAM9XE_IAR/main.c b/FreeRTOS/Demo/ARM9_AT91SAM9XE_IAR/main.c
index f594f80..689e0bd 100644
--- a/FreeRTOS/Demo/ARM9_AT91SAM9XE_IAR/main.c
+++ b/FreeRTOS/Demo/ARM9_AT91SAM9XE_IAR/main.c
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Demo/ARM9_AT91SAM9XE_IAR/serial/serial.c b/FreeRTOS/Demo/ARM9_AT91SAM9XE_IAR/serial/serial.c
index b1c5179..23d7f2a 100644
--- a/FreeRTOS/Demo/ARM9_AT91SAM9XE_IAR/serial/serial.c
+++ b/FreeRTOS/Demo/ARM9_AT91SAM9XE_IAR/serial/serial.c
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Demo/ARM9_STR91X_IAR/FreeRTOSConfig.h b/FreeRTOS/Demo/ARM9_STR91X_IAR/FreeRTOSConfig.h
index 6cba417..e4a4c58 100644
--- a/FreeRTOS/Demo/ARM9_STR91X_IAR/FreeRTOSConfig.h
+++ b/FreeRTOS/Demo/ARM9_STR91X_IAR/FreeRTOSConfig.h
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Demo/ARM9_STR91X_IAR/ParTest/ParTest.c b/FreeRTOS/Demo/ARM9_STR91X_IAR/ParTest/ParTest.c
index 2a740da..0886ee3 100644
--- a/FreeRTOS/Demo/ARM9_STR91X_IAR/ParTest/ParTest.c
+++ b/FreeRTOS/Demo/ARM9_STR91X_IAR/ParTest/ParTest.c
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

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 2f02fb1..e8f382f 100644
--- a/FreeRTOS/Demo/ARM9_STR91X_IAR/lwip/include/lwIPWebServer/BasicWEB.h
+++ b/FreeRTOS/Demo/ARM9_STR91X_IAR/lwip/include/lwIPWebServer/BasicWEB.h
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Demo/ARM9_STR91X_IAR/lwip/lwipWebServer/BasicWEB.c b/FreeRTOS/Demo/ARM9_STR91X_IAR/lwip/lwipWebServer/BasicWEB.c
index fc97470..cb4b29a 100644
--- a/FreeRTOS/Demo/ARM9_STR91X_IAR/lwip/lwipWebServer/BasicWEB.c
+++ b/FreeRTOS/Demo/ARM9_STR91X_IAR/lwip/lwipWebServer/BasicWEB.c
@@ -1,6 +1,6 @@
 

 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Demo/ARM9_STR91X_IAR/main.c b/FreeRTOS/Demo/ARM9_STR91X_IAR/main.c
index 879a0ce..e3d72e8 100644
--- a/FreeRTOS/Demo/ARM9_STR91X_IAR/main.c
+++ b/FreeRTOS/Demo/ARM9_STR91X_IAR/main.c
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Demo/ARM9_STR91X_IAR/serial/serial.c b/FreeRTOS/Demo/ARM9_STR91X_IAR/serial/serial.c
index 7e36ce1..e75144b 100644
--- a/FreeRTOS/Demo/ARM9_STR91X_IAR/serial/serial.c
+++ b/FreeRTOS/Demo/ARM9_STR91X_IAR/serial/serial.c
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Demo/ARM9_STR91X_IAR/webserver/uIP_Task.c b/FreeRTOS/Demo/ARM9_STR91X_IAR/webserver/uIP_Task.c
index b0c9aa1..a046c4b 100644
--- a/FreeRTOS/Demo/ARM9_STR91X_IAR/webserver/uIP_Task.c
+++ b/FreeRTOS/Demo/ARM9_STR91X_IAR/webserver/uIP_Task.c
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Demo/AVR32_UC3/main.c b/FreeRTOS/Demo/AVR32_UC3/main.c
index 5658259..09fb21c 100644
--- a/FreeRTOS/Demo/AVR32_UC3/main.c
+++ b/FreeRTOS/Demo/AVR32_UC3/main.c
@@ -30,7 +30,7 @@
  *****************************************************************************/

 

 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Demo/AVR_ATMega323_IAR/FreeRTOSConfig.h b/FreeRTOS/Demo/AVR_ATMega323_IAR/FreeRTOSConfig.h
index cb7c76b..6c32083 100644
--- a/FreeRTOS/Demo/AVR_ATMega323_IAR/FreeRTOSConfig.h
+++ b/FreeRTOS/Demo/AVR_ATMega323_IAR/FreeRTOSConfig.h
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Demo/AVR_ATMega323_IAR/ParTest/ParTest.c b/FreeRTOS/Demo/AVR_ATMega323_IAR/ParTest/ParTest.c
index 4f61240..614f866 100644
--- a/FreeRTOS/Demo/AVR_ATMega323_IAR/ParTest/ParTest.c
+++ b/FreeRTOS/Demo/AVR_ATMega323_IAR/ParTest/ParTest.c
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Demo/AVR_ATMega323_IAR/main.c b/FreeRTOS/Demo/AVR_ATMega323_IAR/main.c
index 95164d1..0f86c8a 100644
--- a/FreeRTOS/Demo/AVR_ATMega323_IAR/main.c
+++ b/FreeRTOS/Demo/AVR_ATMega323_IAR/main.c
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Demo/AVR_ATMega323_IAR/regtest.c b/FreeRTOS/Demo/AVR_ATMega323_IAR/regtest.c
index b959c08..a65d8da 100644
--- a/FreeRTOS/Demo/AVR_ATMega323_IAR/regtest.c
+++ b/FreeRTOS/Demo/AVR_ATMega323_IAR/regtest.c
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Demo/AVR_ATMega323_IAR/regtest.h b/FreeRTOS/Demo/AVR_ATMega323_IAR/regtest.h
index 5974695..0e20b10 100644
--- a/FreeRTOS/Demo/AVR_ATMega323_IAR/regtest.h
+++ b/FreeRTOS/Demo/AVR_ATMega323_IAR/regtest.h
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Demo/AVR_ATMega323_IAR/serial/serial.c b/FreeRTOS/Demo/AVR_ATMega323_IAR/serial/serial.c
index 7194728..f806a11 100644
--- a/FreeRTOS/Demo/AVR_ATMega323_IAR/serial/serial.c
+++ b/FreeRTOS/Demo/AVR_ATMega323_IAR/serial/serial.c
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Demo/AVR_ATMega323_WinAVR/FreeRTOSConfig.h b/FreeRTOS/Demo/AVR_ATMega323_WinAVR/FreeRTOSConfig.h
index 8b30954..483e2d2 100644
--- a/FreeRTOS/Demo/AVR_ATMega323_WinAVR/FreeRTOSConfig.h
+++ b/FreeRTOS/Demo/AVR_ATMega323_WinAVR/FreeRTOSConfig.h
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Demo/AVR_ATMega323_WinAVR/ParTest/ParTest.c b/FreeRTOS/Demo/AVR_ATMega323_WinAVR/ParTest/ParTest.c
index 85b0c77..8a323a7 100644
--- a/FreeRTOS/Demo/AVR_ATMega323_WinAVR/ParTest/ParTest.c
+++ b/FreeRTOS/Demo/AVR_ATMega323_WinAVR/ParTest/ParTest.c
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Demo/AVR_ATMega323_WinAVR/main.c b/FreeRTOS/Demo/AVR_ATMega323_WinAVR/main.c
index cc897d9..8404617 100644
--- a/FreeRTOS/Demo/AVR_ATMega323_WinAVR/main.c
+++ b/FreeRTOS/Demo/AVR_ATMega323_WinAVR/main.c
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Demo/AVR_ATMega323_WinAVR/regtest.c b/FreeRTOS/Demo/AVR_ATMega323_WinAVR/regtest.c
index 1e523f2..3dc330c 100644
--- a/FreeRTOS/Demo/AVR_ATMega323_WinAVR/regtest.c
+++ b/FreeRTOS/Demo/AVR_ATMega323_WinAVR/regtest.c
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Demo/AVR_ATMega323_WinAVR/regtest.h b/FreeRTOS/Demo/AVR_ATMega323_WinAVR/regtest.h
index 5974695..0e20b10 100644
--- a/FreeRTOS/Demo/AVR_ATMega323_WinAVR/regtest.h
+++ b/FreeRTOS/Demo/AVR_ATMega323_WinAVR/regtest.h
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Demo/AVR_ATMega323_WinAVR/serial/serial.c b/FreeRTOS/Demo/AVR_ATMega323_WinAVR/serial/serial.c
index 045aec6..fb16314 100644
--- a/FreeRTOS/Demo/AVR_ATMega323_WinAVR/serial/serial.c
+++ b/FreeRTOS/Demo/AVR_ATMega323_WinAVR/serial/serial.c
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Demo/CORTEX_A2F200_IAR_and_Keil/FreeRTOSConfig.h b/FreeRTOS/Demo/CORTEX_A2F200_IAR_and_Keil/FreeRTOSConfig.h
index 5851b12..aede698 100644
--- a/FreeRTOS/Demo/CORTEX_A2F200_IAR_and_Keil/FreeRTOSConfig.h
+++ b/FreeRTOS/Demo/CORTEX_A2F200_IAR_and_Keil/FreeRTOSConfig.h
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Demo/CORTEX_A2F200_IAR_and_Keil/ParTest.c b/FreeRTOS/Demo/CORTEX_A2F200_IAR_and_Keil/ParTest.c
index 307bb7f..deb0422 100644
--- a/FreeRTOS/Demo/CORTEX_A2F200_IAR_and_Keil/ParTest.c
+++ b/FreeRTOS/Demo/CORTEX_A2F200_IAR_and_Keil/ParTest.c
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

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 5a27171..cc87672 100644
--- a/FreeRTOS/Demo/CORTEX_A2F200_IAR_and_Keil/main-blinky.c
+++ b/FreeRTOS/Demo/CORTEX_A2F200_IAR_and_Keil/main-blinky.c
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

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 9d9932c..baed51e 100644
--- a/FreeRTOS/Demo/CORTEX_A2F200_IAR_and_Keil/main-full.c
+++ b/FreeRTOS/Demo/CORTEX_A2F200_IAR_and_Keil/main-full.c
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

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 746b0ec..68495c7 100644
--- a/FreeRTOS/Demo/CORTEX_A2F200_IAR_and_Keil/uIP_Task.c
+++ b/FreeRTOS/Demo/CORTEX_A2F200_IAR_and_Keil/uIP_Task.c
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Demo/CORTEX_A2F200_SoftConsole/FreeRTOSConfig.h b/FreeRTOS/Demo/CORTEX_A2F200_SoftConsole/FreeRTOSConfig.h
index b125b53..2e9fdce 100644
--- a/FreeRTOS/Demo/CORTEX_A2F200_SoftConsole/FreeRTOSConfig.h
+++ b/FreeRTOS/Demo/CORTEX_A2F200_SoftConsole/FreeRTOSConfig.h
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Demo/CORTEX_A2F200_SoftConsole/ParTest.c b/FreeRTOS/Demo/CORTEX_A2F200_SoftConsole/ParTest.c
index 307bb7f..deb0422 100644
--- a/FreeRTOS/Demo/CORTEX_A2F200_SoftConsole/ParTest.c
+++ b/FreeRTOS/Demo/CORTEX_A2F200_SoftConsole/ParTest.c
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Demo/CORTEX_A2F200_SoftConsole/main-blinky.c b/FreeRTOS/Demo/CORTEX_A2F200_SoftConsole/main-blinky.c
index 3efe161..f715135 100644
--- a/FreeRTOS/Demo/CORTEX_A2F200_SoftConsole/main-blinky.c
+++ b/FreeRTOS/Demo/CORTEX_A2F200_SoftConsole/main-blinky.c
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Demo/CORTEX_A2F200_SoftConsole/main-full.c b/FreeRTOS/Demo/CORTEX_A2F200_SoftConsole/main-full.c
index b892151..395d290 100644
--- a/FreeRTOS/Demo/CORTEX_A2F200_SoftConsole/main-full.c
+++ b/FreeRTOS/Demo/CORTEX_A2F200_SoftConsole/main-full.c
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Demo/CORTEX_A2F200_SoftConsole/uIP_Task.c b/FreeRTOS/Demo/CORTEX_A2F200_SoftConsole/uIP_Task.c
index 8669680..ee3d8c7 100644
--- a/FreeRTOS/Demo/CORTEX_A2F200_SoftConsole/uIP_Task.c
+++ b/FreeRTOS/Demo/CORTEX_A2F200_SoftConsole/uIP_Task.c
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Demo/CORTEX_A5_SAMA5D3x_Xplained_IAR/CDCCommandConsole.c b/FreeRTOS/Demo/CORTEX_A5_SAMA5D3x_Xplained_IAR/CDCCommandConsole.c
index 90519fe..b0e826b 100644
--- a/FreeRTOS/Demo/CORTEX_A5_SAMA5D3x_Xplained_IAR/CDCCommandConsole.c
+++ b/FreeRTOS/Demo/CORTEX_A5_SAMA5D3x_Xplained_IAR/CDCCommandConsole.c
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Demo/CORTEX_A5_SAMA5D3x_Xplained_IAR/FreeRTOSConfig.h b/FreeRTOS/Demo/CORTEX_A5_SAMA5D3x_Xplained_IAR/FreeRTOSConfig.h
index e89d707..2714287 100644
--- a/FreeRTOS/Demo/CORTEX_A5_SAMA5D3x_Xplained_IAR/FreeRTOSConfig.h
+++ b/FreeRTOS/Demo/CORTEX_A5_SAMA5D3x_Xplained_IAR/FreeRTOSConfig.h
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

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 4932abd..b8ef114 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,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

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 e70d13f..e4163a3 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,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

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 528e6fd..a26068c 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,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

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 805ba1c..a2b61b9 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,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

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 a62fbd3..c111beb 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,5 +1,5 @@
 ;/*

-;    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+;    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

 ;

 ;    FEATURES AND PORTS ARE ADDED TO FREERTOS ALL THE TIME.  PLEASE VISIT

 ;    http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Demo/CORTEX_A5_SAMA5D3x_Xplained_IAR/LEDs.c b/FreeRTOS/Demo/CORTEX_A5_SAMA5D3x_Xplained_IAR/LEDs.c
index 0d512e7..4ac644d 100644
--- a/FreeRTOS/Demo/CORTEX_A5_SAMA5D3x_Xplained_IAR/LEDs.c
+++ b/FreeRTOS/Demo/CORTEX_A5_SAMA5D3x_Xplained_IAR/LEDs.c
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

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 0550e79..9033c45 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,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Demo/CORTEX_A5_SAMA5D3x_Xplained_IAR/main.c b/FreeRTOS/Demo/CORTEX_A5_SAMA5D3x_Xplained_IAR/main.c
index 82f0929..2adec2c 100644
--- a/FreeRTOS/Demo/CORTEX_A5_SAMA5D3x_Xplained_IAR/main.c
+++ b/FreeRTOS/Demo/CORTEX_A5_SAMA5D3x_Xplained_IAR/main.c
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

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 0550e79..9033c45 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,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Demo/CORTEX_A5_SAMA5D4x_EK_IAR/CDCCommandConsole.c b/FreeRTOS/Demo/CORTEX_A5_SAMA5D4x_EK_IAR/CDCCommandConsole.c
index 7271fd1..bcf71d0 100644
--- a/FreeRTOS/Demo/CORTEX_A5_SAMA5D4x_EK_IAR/CDCCommandConsole.c
+++ b/FreeRTOS/Demo/CORTEX_A5_SAMA5D4x_EK_IAR/CDCCommandConsole.c
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Demo/CORTEX_A5_SAMA5D4x_EK_IAR/FreeRTOSConfig.h b/FreeRTOS/Demo/CORTEX_A5_SAMA5D4x_EK_IAR/FreeRTOSConfig.h
index cd51788..3a18916 100644
--- a/FreeRTOS/Demo/CORTEX_A5_SAMA5D4x_EK_IAR/FreeRTOSConfig.h
+++ b/FreeRTOS/Demo/CORTEX_A5_SAMA5D4x_EK_IAR/FreeRTOSConfig.h
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

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 6e7aa62..7714a18 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,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

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 f973a20..4ccd661 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,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

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 528e6fd..a26068c 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,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

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 9986ef1..6893ebf 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,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

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 0867f94..45ddc9f 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,5 +1,5 @@
 ;/*

-;    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+;    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

 ;

 ;    FEATURES AND PORTS ARE ADDED TO FREERTOS ALL THE TIME.  PLEASE VISIT

 ;    http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Demo/CORTEX_A5_SAMA5D4x_EK_IAR/LEDs.c b/FreeRTOS/Demo/CORTEX_A5_SAMA5D4x_EK_IAR/LEDs.c
index 0d512e7..4ac644d 100644
--- a/FreeRTOS/Demo/CORTEX_A5_SAMA5D4x_EK_IAR/LEDs.c
+++ b/FreeRTOS/Demo/CORTEX_A5_SAMA5D4x_EK_IAR/LEDs.c
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Demo/CORTEX_A5_SAMA5D4x_EK_IAR/main.c b/FreeRTOS/Demo/CORTEX_A5_SAMA5D4x_EK_IAR/main.c
index 2e1ad51..a3431ee 100644
--- a/FreeRTOS/Demo/CORTEX_A5_SAMA5D4x_EK_IAR/main.c
+++ b/FreeRTOS/Demo/CORTEX_A5_SAMA5D4x_EK_IAR/main.c
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

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 96a6ee9..f41bb82 100644
--- a/FreeRTOS/Demo/CORTEX_A9_Cyclone_V_SoC_DK/FreeRTOSConfig.h
+++ b/FreeRTOS/Demo/CORTEX_A9_Cyclone_V_SoC_DK/FreeRTOSConfig.h
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

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 d8e9ab0..d924535 100644
--- a/FreeRTOS/Demo/CORTEX_A9_Cyclone_V_SoC_DK/LEDs.c
+++ b/FreeRTOS/Demo/CORTEX_A9_Cyclone_V_SoC_DK/LEDs.c
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

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 601f353..ab9060c 100644
--- a/FreeRTOS/Demo/CORTEX_A9_Cyclone_V_SoC_DK/main.c
+++ b/FreeRTOS/Demo/CORTEX_A9_Cyclone_V_SoC_DK/main.c
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

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 064a170..09b27e6 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,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

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 1b6c285..70f36c28 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,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

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 3c8c852..6a01987 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,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

 

     FEATURES AND PORTS ARE ADDED TO FREERTOS ALL THE TIME.  PLEASE VISIT

     http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

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 424e0f6..61497c7 100644
--- a/FreeRTOS/Demo/CORTEX_A9_Cyclone_V_SoC_DK/serial.c
+++ b/FreeRTOS/Demo/CORTEX_A9_Cyclone_V_SoC_DK/serial.c
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Demo/CORTEX_A9_RZ_R7S72100_IAR_DS-5/Source/Blinky-Demo/main_blinky.c b/FreeRTOS/Demo/CORTEX_A9_RZ_R7S72100_IAR_DS-5/Source/Blinky-Demo/main_blinky.c
index f61a158..6ac50c1 100644
--- a/FreeRTOS/Demo/CORTEX_A9_RZ_R7S72100_IAR_DS-5/Source/Blinky-Demo/main_blinky.c
+++ b/FreeRTOS/Demo/CORTEX_A9_RZ_R7S72100_IAR_DS-5/Source/Blinky-Demo/main_blinky.c
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Demo/CORTEX_A9_RZ_R7S72100_IAR_DS-5/Source/FreeRTOSConfig.h b/FreeRTOS/Demo/CORTEX_A9_RZ_R7S72100_IAR_DS-5/Source/FreeRTOSConfig.h
index cadfb88..ce4c6d1 100644
--- a/FreeRTOS/Demo/CORTEX_A9_RZ_R7S72100_IAR_DS-5/Source/FreeRTOSConfig.h
+++ b/FreeRTOS/Demo/CORTEX_A9_RZ_R7S72100_IAR_DS-5/Source/FreeRTOSConfig.h
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Demo/CORTEX_A9_RZ_R7S72100_IAR_DS-5/Source/FreeRTOS_tick_config.c b/FreeRTOS/Demo/CORTEX_A9_RZ_R7S72100_IAR_DS-5/Source/FreeRTOS_tick_config.c
index 97f9e44..26a5a7b 100644
--- a/FreeRTOS/Demo/CORTEX_A9_RZ_R7S72100_IAR_DS-5/Source/FreeRTOS_tick_config.c
+++ b/FreeRTOS/Demo/CORTEX_A9_RZ_R7S72100_IAR_DS-5/Source/FreeRTOS_tick_config.c
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Demo/CORTEX_A9_RZ_R7S72100_IAR_DS-5/Source/Full-Demo/File-releated-CLI-commands.c b/FreeRTOS/Demo/CORTEX_A9_RZ_R7S72100_IAR_DS-5/Source/Full-Demo/File-releated-CLI-commands.c
index f461888..a02cb1b 100644
--- a/FreeRTOS/Demo/CORTEX_A9_RZ_R7S72100_IAR_DS-5/Source/Full-Demo/File-releated-CLI-commands.c
+++ b/FreeRTOS/Demo/CORTEX_A9_RZ_R7S72100_IAR_DS-5/Source/Full-Demo/File-releated-CLI-commands.c
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Demo/CORTEX_A9_RZ_R7S72100_IAR_DS-5/Source/Full-Demo/File-system-demo.c b/FreeRTOS/Demo/CORTEX_A9_RZ_R7S72100_IAR_DS-5/Source/Full-Demo/File-system-demo.c
index 049babd..83ae8ab 100644
--- a/FreeRTOS/Demo/CORTEX_A9_RZ_R7S72100_IAR_DS-5/Source/Full-Demo/File-system-demo.c
+++ b/FreeRTOS/Demo/CORTEX_A9_RZ_R7S72100_IAR_DS-5/Source/Full-Demo/File-system-demo.c
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Demo/CORTEX_A9_RZ_R7S72100_IAR_DS-5/Source/Full-Demo/Sample-CLI-commands.c b/FreeRTOS/Demo/CORTEX_A9_RZ_R7S72100_IAR_DS-5/Source/Full-Demo/Sample-CLI-commands.c
index 65b994e..c51f66e 100644
--- a/FreeRTOS/Demo/CORTEX_A9_RZ_R7S72100_IAR_DS-5/Source/Full-Demo/Sample-CLI-commands.c
+++ b/FreeRTOS/Demo/CORTEX_A9_RZ_R7S72100_IAR_DS-5/Source/Full-Demo/Sample-CLI-commands.c
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Demo/CORTEX_A9_RZ_R7S72100_IAR_DS-5/Source/Full-Demo/UARTCommandConsole.c b/FreeRTOS/Demo/CORTEX_A9_RZ_R7S72100_IAR_DS-5/Source/Full-Demo/UARTCommandConsole.c
index 519065c..6752d4c 100644
--- a/FreeRTOS/Demo/CORTEX_A9_RZ_R7S72100_IAR_DS-5/Source/Full-Demo/UARTCommandConsole.c
+++ b/FreeRTOS/Demo/CORTEX_A9_RZ_R7S72100_IAR_DS-5/Source/Full-Demo/UARTCommandConsole.c
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Demo/CORTEX_A9_RZ_R7S72100_IAR_DS-5/Source/Full-Demo/UARTCommandConsole.h b/FreeRTOS/Demo/CORTEX_A9_RZ_R7S72100_IAR_DS-5/Source/Full-Demo/UARTCommandConsole.h
index 061aa2e..049ec00 100644
--- a/FreeRTOS/Demo/CORTEX_A9_RZ_R7S72100_IAR_DS-5/Source/Full-Demo/UARTCommandConsole.h
+++ b/FreeRTOS/Demo/CORTEX_A9_RZ_R7S72100_IAR_DS-5/Source/Full-Demo/UARTCommandConsole.h
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Demo/CORTEX_A9_RZ_R7S72100_IAR_DS-5/Source/Full-Demo/main_full.c b/FreeRTOS/Demo/CORTEX_A9_RZ_R7S72100_IAR_DS-5/Source/Full-Demo/main_full.c
index ee3b7f3..d08b6fd 100644
--- a/FreeRTOS/Demo/CORTEX_A9_RZ_R7S72100_IAR_DS-5/Source/Full-Demo/main_full.c
+++ b/FreeRTOS/Demo/CORTEX_A9_RZ_R7S72100_IAR_DS-5/Source/Full-Demo/main_full.c
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Demo/CORTEX_A9_RZ_R7S72100_IAR_DS-5/Source/Full-Demo/reg_test.s b/FreeRTOS/Demo/CORTEX_A9_RZ_R7S72100_IAR_DS-5/Source/Full-Demo/reg_test.s
index 842a5d3..c9e269f 100644
--- a/FreeRTOS/Demo/CORTEX_A9_RZ_R7S72100_IAR_DS-5/Source/Full-Demo/reg_test.s
+++ b/FreeRTOS/Demo/CORTEX_A9_RZ_R7S72100_IAR_DS-5/Source/Full-Demo/reg_test.s
@@ -1,5 +1,5 @@
 ;/*

-;    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+;    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

 ;

 ;    FEATURES AND PORTS ARE ADDED TO FREERTOS ALL THE TIME.  PLEASE VISIT

 ;    http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Demo/CORTEX_A9_RZ_R7S72100_IAR_DS-5/Source/Full-Demo/serial.c b/FreeRTOS/Demo/CORTEX_A9_RZ_R7S72100_IAR_DS-5/Source/Full-Demo/serial.c
index 7b2e8a1..58a5926 100644
--- a/FreeRTOS/Demo/CORTEX_A9_RZ_R7S72100_IAR_DS-5/Source/Full-Demo/serial.c
+++ b/FreeRTOS/Demo/CORTEX_A9_RZ_R7S72100_IAR_DS-5/Source/Full-Demo/serial.c
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Demo/CORTEX_A9_RZ_R7S72100_IAR_DS-5/Source/LEDs.c b/FreeRTOS/Demo/CORTEX_A9_RZ_R7S72100_IAR_DS-5/Source/LEDs.c
index f11961d..9ae8474 100644
--- a/FreeRTOS/Demo/CORTEX_A9_RZ_R7S72100_IAR_DS-5/Source/LEDs.c
+++ b/FreeRTOS/Demo/CORTEX_A9_RZ_R7S72100_IAR_DS-5/Source/LEDs.c
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Demo/CORTEX_A9_RZ_R7S72100_IAR_DS-5/Source/main.c b/FreeRTOS/Demo/CORTEX_A9_RZ_R7S72100_IAR_DS-5/Source/main.c
index 57ae18c..17af01b 100644
--- a/FreeRTOS/Demo/CORTEX_A9_RZ_R7S72100_IAR_DS-5/Source/main.c
+++ b/FreeRTOS/Demo/CORTEX_A9_RZ_R7S72100_IAR_DS-5/Source/main.c
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

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 0fd61ad..ee65672 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,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

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 176c67c..743218a 100644
--- a/FreeRTOS/Demo/CORTEX_A9_Zynq_ZC702/RTOSDemo/src/FreeRTOSConfig.h
+++ b/FreeRTOS/Demo/CORTEX_A9_Zynq_ZC702/RTOSDemo/src/FreeRTOSConfig.h
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

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 c90e66c..1d21c46 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,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

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 aac3519..d03392f 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,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

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 77de772..fcf9f8c 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,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

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 d51a1dc..b00c9c7 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,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

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 3c8c852..6a01987 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,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

 

     FEATURES AND PORTS ARE ADDED TO FREERTOS ALL THE TIME.  PLEASE VISIT

     http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

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 80cc0d1..a3da709 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,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

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 392786d..48c7fdd 100644
--- a/FreeRTOS/Demo/CORTEX_A9_Zynq_ZC702/RTOSDemo/src/ParTest.c
+++ b/FreeRTOS/Demo/CORTEX_A9_Zynq_ZC702/RTOSDemo/src/ParTest.c
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

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 f77b2fe..0848dd7 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,54 +1,70 @@
 /*

-    FreeRTOS V7.0.2 - Copyright (C) 2011 Real Time Engineers Ltd.

+    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    All rights reserved

 

-

-    ***************************************************************************

-     *                                                                       *

-     *    FreeRTOS tutorial books are available in pdf and paperback.        *

-     *    Complete, revised, and edited pdf reference manuals are also       *

-     *    available.                                                         *

-     *                                                                       *

-     *    Purchasing FreeRTOS documentation will not only help you, by       *

-     *    ensuring you get running as quickly as possible and with an        *

-     *    in-depth knowledge of how to use FreeRTOS, it will also help       *

-     *    the FreeRTOS project to continue with its mission of providing     *

-     *    professional grade, cross platform, de facto standard solutions    *

-     *    for microcontrollers - completely free of charge!                  *

-     *                                                                       *

-     *    >>> See http://www.FreeRTOS.org/Documentation for details. <<<     *

-     *                                                                       *

-     *    Thank you for using FreeRTOS, and thank you for your support!      *

-     *                                                                       *

-    ***************************************************************************

-

+    VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

 

     This file is part of the FreeRTOS distribution.

 

     FreeRTOS is free software; you can redistribute it and/or modify it under

     the terms of the GNU General Public License (version 2) as published by the

-    Free Software Foundation AND MODIFIED BY the FreeRTOS exception.

-    >>>NOTE<<< The modification to the GPL is included to allow you to

-    distribute a combined work that includes FreeRTOS without being obliged to

-    provide the source code for proprietary components outside of the FreeRTOS

-    kernel.  FreeRTOS is distributed in the hope that it will be useful, but

-    WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY

-    or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License for

-    more details. You should have received a copy of the GNU General Public

-    License and the FreeRTOS license exception along with FreeRTOS; if not it

-    can be viewed here: http://www.freertos.org/a00114.html and also obtained

-    by writing to Richard Barry, contact details for whom are available on the

-    FreeRTOS WEB site.

+    Free Software Foundation >>!AND MODIFIED BY!<< the FreeRTOS exception.

+

+    ***************************************************************************

+    >>!   NOTE: The modification to the GPL is included to allow you to     !<<

+    >>!   distribute a combined work that includes FreeRTOS without being   !<<

+    >>!   obliged to provide the source code for proprietary components     !<<

+    >>!   outside of the FreeRTOS kernel.                                   !<<

+    ***************************************************************************

+

+    FreeRTOS is distributed in the hope that it will be useful, but WITHOUT ANY

+    WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS

+    FOR A PARTICULAR PURPOSE.  Full license text is available on the following

+    link: http://www.freertos.org/a00114.html

+

+    ***************************************************************************

+     *                                                                       *

+     *    FreeRTOS provides completely free yet professionally developed,    *

+     *    robust, strictly quality controlled, supported, and cross          *

+     *    platform software that is more than just the market leader, it     *

+     *    is the industry's de facto standard.                               *

+     *                                                                       *

+     *    Help yourself get started quickly while simultaneously helping     *

+     *    to support the FreeRTOS project by purchasing a FreeRTOS           *

+     *    tutorial book, reference manual, or both:                          *

+     *    http://www.FreeRTOS.org/Documentation                              *

+     *                                                                       *

+    ***************************************************************************

+

+    http://www.FreeRTOS.org/FAQHelp.html - Having a problem?  Start by reading

+    the FAQ page "My application does not run, what could be wrong?".  Have you

+    defined configASSERT()?

+

+    http://www.FreeRTOS.org/support - In return for receiving this top quality

+    embedded software for free we request you assist our global community by

+    participating in the support forum.

+

+    http://www.FreeRTOS.org/training - Investing in training allows your team to

+    be as productive as possible as early as possible.  Now you can receive

+    FreeRTOS training directly from Richard Barry, CEO of Real Time Engineers

+    Ltd, and the world's leading authority on the world's leading RTOS.

+

+    http://www.FreeRTOS.org/plus - A selection of FreeRTOS ecosystem products,

+    including FreeRTOS+Trace - an indispensable productivity tool, a DOS

+    compatible FAT file system, and our tiny thread aware UDP/IP stack.

+

+    http://www.FreeRTOS.org/labs - Where new FreeRTOS products go to incubate.

+    Come and try FreeRTOS+TCP, our new open source TCP/IP stack for FreeRTOS.

+

+    http://www.OpenRTOS.com - Real Time Engineers ltd. license FreeRTOS to High

+    Integrity Systems ltd. to sell under the OpenRTOS brand.  Low cost OpenRTOS

+    licenses offer ticketed support, indemnification and commercial middleware.

+

+    http://www.SafeRTOS.com - High Integrity Systems also provide a safety

+    engineered and independently SIL3 certified version for use in safety and

+    mission critical applications that require provable dependability.

 

     1 tab == 4 spaces!

-

-    http://www.FreeRTOS.org - Documentation, latest information, license and

-    contact details.

-

-    http://www.SafeRTOS.com - A version that is certified for use in safety

-    critical systems.

-

-    http://www.OpenRTOS.com - Commercial support, development, porting,

-    licensing and training services.

 */

 

 /* Standard includes. */

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 8613402..460cc79 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,54 +1,70 @@
 /*

-    FreeRTOS V7.0.2 - Copyright (C) 2011 Real Time Engineers Ltd.

-	

+    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    All rights reserved

 

-    ***************************************************************************

-     *                                                                       *

-     *    FreeRTOS tutorial books are available in pdf and paperback.        *

-     *    Complete, revised, and edited pdf reference manuals are also       *

-     *    available.                                                         *

-     *                                                                       *

-     *    Purchasing FreeRTOS documentation will not only help you, by       *

-     *    ensuring you get running as quickly as possible and with an        *

-     *    in-depth knowledge of how to use FreeRTOS, it will also help       *

-     *    the FreeRTOS project to continue with its mission of providing     *

-     *    professional grade, cross platform, de facto standard solutions    *

-     *    for microcontrollers - completely free of charge!                  *

-     *                                                                       *

-     *    >>> See http://www.FreeRTOS.org/Documentation for details. <<<     *

-     *                                                                       *

-     *    Thank you for using FreeRTOS, and thank you for your support!      *

-     *                                                                       *

-    ***************************************************************************

-

+    VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

 

     This file is part of the FreeRTOS distribution.

 

     FreeRTOS is free software; you can redistribute it and/or modify it under

     the terms of the GNU General Public License (version 2) as published by the

-    Free Software Foundation AND MODIFIED BY the FreeRTOS exception.

-    >>>NOTE<<< The modification to the GPL is included to allow you to

-    distribute a combined work that includes FreeRTOS without being obliged to

-    provide the source code for proprietary components outside of the FreeRTOS

-    kernel.  FreeRTOS is distributed in the hope that it will be useful, but

-    WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY

-    or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License for

-    more details. You should have received a copy of the GNU General Public

-    License and the FreeRTOS license exception along with FreeRTOS; if not it

-    can be viewed here: http://www.freertos.org/a00114.html and also obtained

-    by writing to Richard Barry, contact details for whom are available on the

-    FreeRTOS WEB site.

+    Free Software Foundation >>!AND MODIFIED BY!<< the FreeRTOS exception.

+

+    ***************************************************************************

+    >>!   NOTE: The modification to the GPL is included to allow you to     !<<

+    >>!   distribute a combined work that includes FreeRTOS without being   !<<

+    >>!   obliged to provide the source code for proprietary components     !<<

+    >>!   outside of the FreeRTOS kernel.                                   !<<

+    ***************************************************************************

+

+    FreeRTOS is distributed in the hope that it will be useful, but WITHOUT ANY

+    WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS

+    FOR A PARTICULAR PURPOSE.  Full license text is available on the following

+    link: http://www.freertos.org/a00114.html

+

+    ***************************************************************************

+     *                                                                       *

+     *    FreeRTOS provides completely free yet professionally developed,    *

+     *    robust, strictly quality controlled, supported, and cross          *

+     *    platform software that is more than just the market leader, it     *

+     *    is the industry's de facto standard.                               *

+     *                                                                       *

+     *    Help yourself get started quickly while simultaneously helping     *

+     *    to support the FreeRTOS project by purchasing a FreeRTOS           *

+     *    tutorial book, reference manual, or both:                          *

+     *    http://www.FreeRTOS.org/Documentation                              *

+     *                                                                       *

+    ***************************************************************************

+

+    http://www.FreeRTOS.org/FAQHelp.html - Having a problem?  Start by reading

+    the FAQ page "My application does not run, what could be wrong?".  Have you

+    defined configASSERT()?

+

+    http://www.FreeRTOS.org/support - In return for receiving this top quality

+    embedded software for free we request you assist our global community by

+    participating in the support forum.

+

+    http://www.FreeRTOS.org/training - Investing in training allows your team to

+    be as productive as possible as early as possible.  Now you can receive

+    FreeRTOS training directly from Richard Barry, CEO of Real Time Engineers

+    Ltd, and the world's leading authority on the world's leading RTOS.

+

+    http://www.FreeRTOS.org/plus - A selection of FreeRTOS ecosystem products,

+    including FreeRTOS+Trace - an indispensable productivity tool, a DOS

+    compatible FAT file system, and our tiny thread aware UDP/IP stack.

+

+    http://www.FreeRTOS.org/labs - Where new FreeRTOS products go to incubate.

+    Come and try FreeRTOS+TCP, our new open source TCP/IP stack for FreeRTOS.

+

+    http://www.OpenRTOS.com - Real Time Engineers ltd. license FreeRTOS to High

+    Integrity Systems ltd. to sell under the OpenRTOS brand.  Low cost OpenRTOS

+    licenses offer ticketed support, indemnification and commercial middleware.

+

+    http://www.SafeRTOS.com - High Integrity Systems also provide a safety

+    engineered and independently SIL3 certified version for use in safety and

+    mission critical applications that require provable dependability.

 

     1 tab == 4 spaces!

-

-    http://www.FreeRTOS.org - Documentation, latest information, license and

-    contact details.

-

-    http://www.SafeRTOS.com - A version that is certified for use in safety

-    critical systems.

-

-    http://www.OpenRTOS.com - Commercial support, development, porting,

-    licensing and training services.

 */

 

 /* Standard includes. */

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 cf6fd02..7b54fe7 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,62 +1,78 @@
 /*

-    FreeRTOS V7.0.1 - Copyright (C) 2011 Real Time Engineers Ltd.

-	

+    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    All rights reserved

 

-    ***************************************************************************

-     *                                                                       *

-     *    FreeRTOS tutorial books are available in pdf and paperback.        *

-     *    Complete, revised, and edited pdf reference manuals are also       *

-     *    available.                                                         *

-     *                                                                       *

-     *    Purchasing FreeRTOS documentation will not only help you, by       *

-     *    ensuring you get running as quickly as possible and with an        *

-     *    in-depth knowledge of how to use FreeRTOS, it will also help       *

-     *    the FreeRTOS project to continue with its mission of providing     *

-     *    professional grade, cross platform, de facto standard solutions    *

-     *    for microcontrollers - completely free of charge!                  *

-     *                                                                       *

-     *    >>> See http://www.FreeRTOS.org/Documentation for details. <<<     *

-     *                                                                       *

-     *    Thank you for using FreeRTOS, and thank you for your support!      *

-     *                                                                       *

-    ***************************************************************************

-

+    VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

 

     This file is part of the FreeRTOS distribution.

 

     FreeRTOS is free software; you can redistribute it and/or modify it under

     the terms of the GNU General Public License (version 2) as published by the

-    Free Software Foundation AND MODIFIED BY the FreeRTOS exception.

-    >>>NOTE<<< The modification to the GPL is included to allow you to

-    distribute a combined work that includes FreeRTOS without being obliged to

-    provide the source code for proprietary components outside of the FreeRTOS

-    kernel.  FreeRTOS is distributed in the hope that it will be useful, but

-    WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY

-    or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License for

-    more details. You should have received a copy of the GNU General Public

-    License and the FreeRTOS license exception along with FreeRTOS; if not it

-    can be viewed here: http://www.freertos.org/a00114.html and also obtained

-    by writing to Richard Barry, contact details for whom are available on the

-    FreeRTOS WEB site.

+    Free Software Foundation >>!AND MODIFIED BY!<< the FreeRTOS exception.

+

+    ***************************************************************************

+    >>!   NOTE: The modification to the GPL is included to allow you to     !<<

+    >>!   distribute a combined work that includes FreeRTOS without being   !<<

+    >>!   obliged to provide the source code for proprietary components     !<<

+    >>!   outside of the FreeRTOS kernel.                                   !<<

+    ***************************************************************************

+

+    FreeRTOS is distributed in the hope that it will be useful, but WITHOUT ANY

+    WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS

+    FOR A PARTICULAR PURPOSE.  Full license text is available on the following

+    link: http://www.freertos.org/a00114.html

+

+    ***************************************************************************

+     *                                                                       *

+     *    FreeRTOS provides completely free yet professionally developed,    *

+     *    robust, strictly quality controlled, supported, and cross          *

+     *    platform software that is more than just the market leader, it     *

+     *    is the industry's de facto standard.                               *

+     *                                                                       *

+     *    Help yourself get started quickly while simultaneously helping     *

+     *    to support the FreeRTOS project by purchasing a FreeRTOS           *

+     *    tutorial book, reference manual, or both:                          *

+     *    http://www.FreeRTOS.org/Documentation                              *

+     *                                                                       *

+    ***************************************************************************

+

+    http://www.FreeRTOS.org/FAQHelp.html - Having a problem?  Start by reading

+    the FAQ page "My application does not run, what could be wrong?".  Have you

+    defined configASSERT()?

+

+    http://www.FreeRTOS.org/support - In return for receiving this top quality

+    embedded software for free we request you assist our global community by

+    participating in the support forum.

+

+    http://www.FreeRTOS.org/training - Investing in training allows your team to

+    be as productive as possible as early as possible.  Now you can receive

+    FreeRTOS training directly from Richard Barry, CEO of Real Time Engineers

+    Ltd, and the world's leading authority on the world's leading RTOS.

+

+    http://www.FreeRTOS.org/plus - A selection of FreeRTOS ecosystem products,

+    including FreeRTOS+Trace - an indispensable productivity tool, a DOS

+    compatible FAT file system, and our tiny thread aware UDP/IP stack.

+

+    http://www.FreeRTOS.org/labs - Where new FreeRTOS products go to incubate.

+    Come and try FreeRTOS+TCP, our new open source TCP/IP stack for FreeRTOS.

+

+    http://www.OpenRTOS.com - Real Time Engineers ltd. license FreeRTOS to High

+    Integrity Systems ltd. to sell under the OpenRTOS brand.  Low cost OpenRTOS

+    licenses offer ticketed support, indemnification and commercial middleware.

+

+    http://www.SafeRTOS.com - High Integrity Systems also provide a safety

+    engineered and independently SIL3 certified version for use in safety and

+    mission critical applications that require provable dependability.

 

     1 tab == 4 spaces!

+*/

+#ifndef LWIP_APPS_H

+#define LWIP_APPS_H

 

-    http://www.FreeRTOS.org - Documentation, latest information, license and

-    contact details.

+/* 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 );

 

-    http://www.SafeRTOS.com - A version that is certified for use in safety

-    critical systems.

+#endif /* LWIP_APPS_H */

 

-    http://www.OpenRTOS.com - Commercial support, development, porting,

-    licensing and training services.

-*/
-#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/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 4f33666..154271e 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,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Demo/CORTEX_A9_Zynq_ZC702/RTOSDemo/src/lwipopts.h b/FreeRTOS/Demo/CORTEX_A9_Zynq_ZC702/RTOSDemo/src/lwipopts.h
index 552c538..82f31f8 100644
--- a/FreeRTOS/Demo/CORTEX_A9_Zynq_ZC702/RTOSDemo/src/lwipopts.h
+++ b/FreeRTOS/Demo/CORTEX_A9_Zynq_ZC702/RTOSDemo/src/lwipopts.h
@@ -198,7 +198,7 @@
 
 /* TCP sender buffer space (pbufs). This must be at least = 2 *
    TCP_SND_BUF/TCP_MSS for things to work. */
-#define TCP_SND_QUEUELEN		( ( 16 * TCP_SND_BUF )/ TCP_MSS )
+#define TCP_SND_QUEUELEN		( ( 16 * 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
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 b696240..274b5ad 100644
--- a/FreeRTOS/Demo/CORTEX_A9_Zynq_ZC702/RTOSDemo/src/main.c
+++ b/FreeRTOS/Demo/CORTEX_A9_Zynq_ZC702/RTOSDemo/src/main.c
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Demo/CORTEX_AT91SAM3U256_IAR/FreeRTOSConfig.h b/FreeRTOS/Demo/CORTEX_AT91SAM3U256_IAR/FreeRTOSConfig.h
index 855b9dc..9b7c149 100644
--- a/FreeRTOS/Demo/CORTEX_AT91SAM3U256_IAR/FreeRTOSConfig.h
+++ b/FreeRTOS/Demo/CORTEX_AT91SAM3U256_IAR/FreeRTOSConfig.h
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Demo/CORTEX_AT91SAM3U256_IAR/ParTest/ParTest.c b/FreeRTOS/Demo/CORTEX_AT91SAM3U256_IAR/ParTest/ParTest.c
index 8f7bb23..4984ccf 100644
--- a/FreeRTOS/Demo/CORTEX_AT91SAM3U256_IAR/ParTest/ParTest.c
+++ b/FreeRTOS/Demo/CORTEX_AT91SAM3U256_IAR/ParTest/ParTest.c
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Demo/CORTEX_AT91SAM3U256_IAR/lcd_message.h b/FreeRTOS/Demo/CORTEX_AT91SAM3U256_IAR/lcd_message.h
index 50efec4..096f3bc 100644
--- a/FreeRTOS/Demo/CORTEX_AT91SAM3U256_IAR/lcd_message.h
+++ b/FreeRTOS/Demo/CORTEX_AT91SAM3U256_IAR/lcd_message.h
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Demo/CORTEX_AT91SAM3U256_IAR/main.c b/FreeRTOS/Demo/CORTEX_AT91SAM3U256_IAR/main.c
index 30a7ec6..f4f70bf 100644
--- a/FreeRTOS/Demo/CORTEX_AT91SAM3U256_IAR/main.c
+++ b/FreeRTOS/Demo/CORTEX_AT91SAM3U256_IAR/main.c
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Demo/CORTEX_AT91SAM3U256_IAR/serial/serial.c b/FreeRTOS/Demo/CORTEX_AT91SAM3U256_IAR/serial/serial.c
index 3333110..299ab87 100644
--- a/FreeRTOS/Demo/CORTEX_AT91SAM3U256_IAR/serial/serial.c
+++ b/FreeRTOS/Demo/CORTEX_AT91SAM3U256_IAR/serial/serial.c
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

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 57efe09..bceb282 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,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

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 09f399b..dbea24a 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,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

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 17f5985..752cc2d 100644
--- a/FreeRTOS/Demo/CORTEX_ATSAM3S-EK2_Atmel_Studio/src/FreeRTOSConfig.h
+++ b/FreeRTOS/Demo/CORTEX_ATSAM3S-EK2_Atmel_Studio/src/FreeRTOSConfig.h
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

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 04bcb79..70f4cb6 100644
--- a/FreeRTOS/Demo/CORTEX_ATSAM3S-EK2_Atmel_Studio/src/ParTest.c
+++ b/FreeRTOS/Demo/CORTEX_ATSAM3S-EK2_Atmel_Studio/src/ParTest.c
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

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 f7813a2..cb08b00 100644
--- a/FreeRTOS/Demo/CORTEX_ATSAM3S-EK2_Atmel_Studio/src/main.c
+++ b/FreeRTOS/Demo/CORTEX_ATSAM3S-EK2_Atmel_Studio/src/main.c
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

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 4510467..97996d3 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,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

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 1491a43..72e0d4c 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,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

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 248c505..f37f4b2 100644
--- a/FreeRTOS/Demo/CORTEX_ATSAM3S-EK2_Atmel_Studio/src/serial.c
+++ b/FreeRTOS/Demo/CORTEX_ATSAM3S-EK2_Atmel_Studio/src/serial.c
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

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 57efe09..bceb282 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,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

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 09f399b..dbea24a 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,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Demo/CORTEX_ATSAM3X_Atmel_Studio/src/FreeRTOSConfig.h b/FreeRTOS/Demo/CORTEX_ATSAM3X_Atmel_Studio/src/FreeRTOSConfig.h
index 17f5985..752cc2d 100644
--- a/FreeRTOS/Demo/CORTEX_ATSAM3X_Atmel_Studio/src/FreeRTOSConfig.h
+++ b/FreeRTOS/Demo/CORTEX_ATSAM3X_Atmel_Studio/src/FreeRTOSConfig.h
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Demo/CORTEX_ATSAM3X_Atmel_Studio/src/ParTest.c b/FreeRTOS/Demo/CORTEX_ATSAM3X_Atmel_Studio/src/ParTest.c
index 04bcb79..70f4cb6 100644
--- a/FreeRTOS/Demo/CORTEX_ATSAM3X_Atmel_Studio/src/ParTest.c
+++ b/FreeRTOS/Demo/CORTEX_ATSAM3X_Atmel_Studio/src/ParTest.c
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Demo/CORTEX_ATSAM3X_Atmel_Studio/src/main.c b/FreeRTOS/Demo/CORTEX_ATSAM3X_Atmel_Studio/src/main.c
index f7813a2..cb08b00 100644
--- a/FreeRTOS/Demo/CORTEX_ATSAM3X_Atmel_Studio/src/main.c
+++ b/FreeRTOS/Demo/CORTEX_ATSAM3X_Atmel_Studio/src/main.c
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

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 4510467..97996d3 100644
--- a/FreeRTOS/Demo/CORTEX_ATSAM3X_Atmel_Studio/src/main_blinky.c
+++ b/FreeRTOS/Demo/CORTEX_ATSAM3X_Atmel_Studio/src/main_blinky.c
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

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 1491a43..72e0d4c 100644
--- a/FreeRTOS/Demo/CORTEX_ATSAM3X_Atmel_Studio/src/main_full.c
+++ b/FreeRTOS/Demo/CORTEX_ATSAM3X_Atmel_Studio/src/main_full.c
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Demo/CORTEX_ATSAM3X_Atmel_Studio/src/serial.c b/FreeRTOS/Demo/CORTEX_ATSAM3X_Atmel_Studio/src/serial.c
index beed1c4..15e5aa9 100644
--- a/FreeRTOS/Demo/CORTEX_ATSAM3X_Atmel_Studio/src/serial.c
+++ b/FreeRTOS/Demo/CORTEX_ATSAM3X_Atmel_Studio/src/serial.c
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

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 bf53f83..e581714 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,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

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 f99c13d..312fccd 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,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

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 708330d..7646690 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,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

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 68b065d..4635fdb 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,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

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 bce4a56..25f397a 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,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

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 93f0d7a..c4391b3 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,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

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 a947bb6..c78a8c2 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,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

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 bf53f83..e581714 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,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

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 f99c13d..312fccd 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,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

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 708330d..7646690 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,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

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 68b065d..4635fdb 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,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

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 bce4a56..25f397a 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,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

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 93f0d7a..c4391b3 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,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

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 a947bb6..c78a8c2 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,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

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 bf53f83..e581714 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,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

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 f99c13d..312fccd 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,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

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 708330d..7646690 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,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

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 68b065d..4635fdb 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,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

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 bce4a56..25f397a 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,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

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 93f0d7a..c4391b3 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,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

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 a947bb6..c78a8c2 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,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Demo/CORTEX_EFMG890F128_IAR/FreeRTOSConfig.h b/FreeRTOS/Demo/CORTEX_EFMG890F128_IAR/FreeRTOSConfig.h
index c5fbb59..2a59e99 100644
--- a/FreeRTOS/Demo/CORTEX_EFMG890F128_IAR/FreeRTOSConfig.h
+++ b/FreeRTOS/Demo/CORTEX_EFMG890F128_IAR/FreeRTOSConfig.h
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Demo/CORTEX_EFMG890F128_IAR/ParTest.c b/FreeRTOS/Demo/CORTEX_EFMG890F128_IAR/ParTest.c
index e3345ac..5bc4072 100644
--- a/FreeRTOS/Demo/CORTEX_EFMG890F128_IAR/ParTest.c
+++ b/FreeRTOS/Demo/CORTEX_EFMG890F128_IAR/ParTest.c
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Demo/CORTEX_EFMG890F128_IAR/lcdtest.c b/FreeRTOS/Demo/CORTEX_EFMG890F128_IAR/lcdtest.c
index abfe43c..fe0dc42 100644
--- a/FreeRTOS/Demo/CORTEX_EFMG890F128_IAR/lcdtest.c
+++ b/FreeRTOS/Demo/CORTEX_EFMG890F128_IAR/lcdtest.c
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Demo/CORTEX_EFMG890F128_IAR/ledtest.c b/FreeRTOS/Demo/CORTEX_EFMG890F128_IAR/ledtest.c
index ef385a2..9b3761b 100644
--- a/FreeRTOS/Demo/CORTEX_EFMG890F128_IAR/ledtest.c
+++ b/FreeRTOS/Demo/CORTEX_EFMG890F128_IAR/ledtest.c
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Demo/CORTEX_EFMG890F128_IAR/ledtest.h b/FreeRTOS/Demo/CORTEX_EFMG890F128_IAR/ledtest.h
index f82ea67..efa8ac7 100644
--- a/FreeRTOS/Demo/CORTEX_EFMG890F128_IAR/ledtest.h
+++ b/FreeRTOS/Demo/CORTEX_EFMG890F128_IAR/ledtest.h
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Demo/CORTEX_EFMG890F128_IAR/main.c b/FreeRTOS/Demo/CORTEX_EFMG890F128_IAR/main.c
index 503b97e..6188aff 100644
--- a/FreeRTOS/Demo/CORTEX_EFMG890F128_IAR/main.c
+++ b/FreeRTOS/Demo/CORTEX_EFMG890F128_IAR/main.c
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Demo/CORTEX_Kinetis_K60_Tower_IAR/FreeRTOSConfig.h b/FreeRTOS/Demo/CORTEX_Kinetis_K60_Tower_IAR/FreeRTOSConfig.h
index 6e366fe..8e64055 100644
--- a/FreeRTOS/Demo/CORTEX_Kinetis_K60_Tower_IAR/FreeRTOSConfig.h
+++ b/FreeRTOS/Demo/CORTEX_Kinetis_K60_Tower_IAR/FreeRTOSConfig.h
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Demo/CORTEX_Kinetis_K60_Tower_IAR/ParTest.c b/FreeRTOS/Demo/CORTEX_Kinetis_K60_Tower_IAR/ParTest.c
index 3b362a8..ddfdba0 100644
--- a/FreeRTOS/Demo/CORTEX_Kinetis_K60_Tower_IAR/ParTest.c
+++ b/FreeRTOS/Demo/CORTEX_Kinetis_K60_Tower_IAR/ParTest.c
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

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 7e865a8..3629ddc 100644
--- a/FreeRTOS/Demo/CORTEX_Kinetis_K60_Tower_IAR/main-full.c
+++ b/FreeRTOS/Demo/CORTEX_Kinetis_K60_Tower_IAR/main-full.c
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

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 1bc4185..87fbdbf 100644
--- a/FreeRTOS/Demo/CORTEX_Kinetis_K60_Tower_IAR/main_blinky.c
+++ b/FreeRTOS/Demo/CORTEX_Kinetis_K60_Tower_IAR/main_blinky.c
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

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 c842769..df10496 100644
--- a/FreeRTOS/Demo/CORTEX_Kinetis_K60_Tower_IAR/uIP_Task.c
+++ b/FreeRTOS/Demo/CORTEX_Kinetis_K60_Tower_IAR/uIP_Task.c
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

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 479587c..2e71835 100644
--- a/FreeRTOS/Demo/CORTEX_Kinetis_K60_Tower_IAR/webserver/EMAC.c
+++ b/FreeRTOS/Demo/CORTEX_Kinetis_K60_Tower_IAR/webserver/EMAC.c
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

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 e2b5234..55e0b10 100644
--- a/FreeRTOS/Demo/CORTEX_Kinetis_K60_Tower_IAR/webserver/EMAC.h
+++ b/FreeRTOS/Demo/CORTEX_Kinetis_K60_Tower_IAR/webserver/EMAC.h
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Demo/CORTEX_LM3S102_GCC/Demo1/FreeRTOSConfig.h b/FreeRTOS/Demo/CORTEX_LM3S102_GCC/Demo1/FreeRTOSConfig.h
index 5981043..c1c92eb 100644
--- a/FreeRTOS/Demo/CORTEX_LM3S102_GCC/Demo1/FreeRTOSConfig.h
+++ b/FreeRTOS/Demo/CORTEX_LM3S102_GCC/Demo1/FreeRTOSConfig.h
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Demo/CORTEX_LM3S102_GCC/Demo1/main.c b/FreeRTOS/Demo/CORTEX_LM3S102_GCC/Demo1/main.c
index 4c94843..af1e4d2 100644
--- a/FreeRTOS/Demo/CORTEX_LM3S102_GCC/Demo1/main.c
+++ b/FreeRTOS/Demo/CORTEX_LM3S102_GCC/Demo1/main.c
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Demo/CORTEX_LM3S102_GCC/Demo2/FreeRTOSConfig.h b/FreeRTOS/Demo/CORTEX_LM3S102_GCC/Demo2/FreeRTOSConfig.h
index 5d21c1d..15fef47 100644
--- a/FreeRTOS/Demo/CORTEX_LM3S102_GCC/Demo2/FreeRTOSConfig.h
+++ b/FreeRTOS/Demo/CORTEX_LM3S102_GCC/Demo2/FreeRTOSConfig.h
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Demo/CORTEX_LM3S102_GCC/Demo2/main.c b/FreeRTOS/Demo/CORTEX_LM3S102_GCC/Demo2/main.c
index a0c70c7..317d97d 100644
--- a/FreeRTOS/Demo/CORTEX_LM3S102_GCC/Demo2/main.c
+++ b/FreeRTOS/Demo/CORTEX_LM3S102_GCC/Demo2/main.c
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Demo/CORTEX_LM3S102_GCC/FreeRTOSConfig.h b/FreeRTOS/Demo/CORTEX_LM3S102_GCC/FreeRTOSConfig.h
index 7ad79c6..5e27c32 100644
--- a/FreeRTOS/Demo/CORTEX_LM3S102_GCC/FreeRTOSConfig.h
+++ b/FreeRTOS/Demo/CORTEX_LM3S102_GCC/FreeRTOSConfig.h
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Demo/CORTEX_LM3S102_GCC/ParTest/ParTest.c b/FreeRTOS/Demo/CORTEX_LM3S102_GCC/ParTest/ParTest.c
index bf120da..cecd57c 100644
--- a/FreeRTOS/Demo/CORTEX_LM3S102_GCC/ParTest/ParTest.c
+++ b/FreeRTOS/Demo/CORTEX_LM3S102_GCC/ParTest/ParTest.c
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Demo/CORTEX_LM3S102_GCC/main.c b/FreeRTOS/Demo/CORTEX_LM3S102_GCC/main.c
index 4c94843..af1e4d2 100644
--- a/FreeRTOS/Demo/CORTEX_LM3S102_GCC/main.c
+++ b/FreeRTOS/Demo/CORTEX_LM3S102_GCC/main.c
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Demo/CORTEX_LM3S102_Rowley/Demo1/FreeRTOSConfig.h b/FreeRTOS/Demo/CORTEX_LM3S102_Rowley/Demo1/FreeRTOSConfig.h
index 7ad79c6..5e27c32 100644
--- a/FreeRTOS/Demo/CORTEX_LM3S102_Rowley/Demo1/FreeRTOSConfig.h
+++ b/FreeRTOS/Demo/CORTEX_LM3S102_Rowley/Demo1/FreeRTOSConfig.h
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Demo/CORTEX_LM3S102_Rowley/Demo1/ParTest.c b/FreeRTOS/Demo/CORTEX_LM3S102_Rowley/Demo1/ParTest.c
index bf120da..cecd57c 100644
--- a/FreeRTOS/Demo/CORTEX_LM3S102_Rowley/Demo1/ParTest.c
+++ b/FreeRTOS/Demo/CORTEX_LM3S102_Rowley/Demo1/ParTest.c
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Demo/CORTEX_LM3S102_Rowley/Demo1/main.c b/FreeRTOS/Demo/CORTEX_LM3S102_Rowley/Demo1/main.c
index 4fd7c36..2d7ac88 100644
--- a/FreeRTOS/Demo/CORTEX_LM3S102_Rowley/Demo1/main.c
+++ b/FreeRTOS/Demo/CORTEX_LM3S102_Rowley/Demo1/main.c
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Demo/CORTEX_LM3S102_Rowley/Demo2/FreeRTOSConfig.h b/FreeRTOS/Demo/CORTEX_LM3S102_Rowley/Demo2/FreeRTOSConfig.h
index 8f728b3..edd8a45 100644
--- a/FreeRTOS/Demo/CORTEX_LM3S102_Rowley/Demo2/FreeRTOSConfig.h
+++ b/FreeRTOS/Demo/CORTEX_LM3S102_Rowley/Demo2/FreeRTOSConfig.h
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Demo/CORTEX_LM3S102_Rowley/Demo2/ParTest.c b/FreeRTOS/Demo/CORTEX_LM3S102_Rowley/Demo2/ParTest.c
index bf120da..cecd57c 100644
--- a/FreeRTOS/Demo/CORTEX_LM3S102_Rowley/Demo2/ParTest.c
+++ b/FreeRTOS/Demo/CORTEX_LM3S102_Rowley/Demo2/ParTest.c
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Demo/CORTEX_LM3S102_Rowley/Demo2/main.c b/FreeRTOS/Demo/CORTEX_LM3S102_Rowley/Demo2/main.c
index cadcd66..f11f761 100644
--- a/FreeRTOS/Demo/CORTEX_LM3S102_Rowley/Demo2/main.c
+++ b/FreeRTOS/Demo/CORTEX_LM3S102_Rowley/Demo2/main.c
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Demo/CORTEX_LM3S102_Rowley/Demo3/FreeRTOSConfig.h b/FreeRTOS/Demo/CORTEX_LM3S102_Rowley/Demo3/FreeRTOSConfig.h
index a86c5ee..56c42eb 100644
--- a/FreeRTOS/Demo/CORTEX_LM3S102_Rowley/Demo3/FreeRTOSConfig.h
+++ b/FreeRTOS/Demo/CORTEX_LM3S102_Rowley/Demo3/FreeRTOSConfig.h
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Demo/CORTEX_LM3S102_Rowley/Demo3/ParTest.c b/FreeRTOS/Demo/CORTEX_LM3S102_Rowley/Demo3/ParTest.c
index 6fa2b98..12aab04 100644
--- a/FreeRTOS/Demo/CORTEX_LM3S102_Rowley/Demo3/ParTest.c
+++ b/FreeRTOS/Demo/CORTEX_LM3S102_Rowley/Demo3/ParTest.c
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Demo/CORTEX_LM3S102_Rowley/Demo3/main.c b/FreeRTOS/Demo/CORTEX_LM3S102_Rowley/Demo3/main.c
index 9179def..ba5c557 100644
--- a/FreeRTOS/Demo/CORTEX_LM3S102_Rowley/Demo3/main.c
+++ b/FreeRTOS/Demo/CORTEX_LM3S102_Rowley/Demo3/main.c
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Demo/CORTEX_LM3S316_IAR/FreeRTOSConfig.h b/FreeRTOS/Demo/CORTEX_LM3S316_IAR/FreeRTOSConfig.h
index 54c25ef..25fc7e7 100644
--- a/FreeRTOS/Demo/CORTEX_LM3S316_IAR/FreeRTOSConfig.h
+++ b/FreeRTOS/Demo/CORTEX_LM3S316_IAR/FreeRTOSConfig.h
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Demo/CORTEX_LM3S316_IAR/ParTest/ParTest.c b/FreeRTOS/Demo/CORTEX_LM3S316_IAR/ParTest/ParTest.c
index bf120da..cecd57c 100644
--- a/FreeRTOS/Demo/CORTEX_LM3S316_IAR/ParTest/ParTest.c
+++ b/FreeRTOS/Demo/CORTEX_LM3S316_IAR/ParTest/ParTest.c
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Demo/CORTEX_LM3S316_IAR/commstest.c b/FreeRTOS/Demo/CORTEX_LM3S316_IAR/commstest.c
index f1a001d..e20622d 100644
--- a/FreeRTOS/Demo/CORTEX_LM3S316_IAR/commstest.c
+++ b/FreeRTOS/Demo/CORTEX_LM3S316_IAR/commstest.c
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Demo/CORTEX_LM3S316_IAR/commstest.h b/FreeRTOS/Demo/CORTEX_LM3S316_IAR/commstest.h
index 6b4b3e0..3b6ccd4 100644
--- a/FreeRTOS/Demo/CORTEX_LM3S316_IAR/commstest.h
+++ b/FreeRTOS/Demo/CORTEX_LM3S316_IAR/commstest.h
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Demo/CORTEX_LM3S316_IAR/main.c b/FreeRTOS/Demo/CORTEX_LM3S316_IAR/main.c
index 166f7db..0a44cc9 100644
--- a/FreeRTOS/Demo/CORTEX_LM3S316_IAR/main.c
+++ b/FreeRTOS/Demo/CORTEX_LM3S316_IAR/main.c
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Demo/CORTEX_LM3S811_GCC/FreeRTOSConfig.h b/FreeRTOS/Demo/CORTEX_LM3S811_GCC/FreeRTOSConfig.h
index 979c5b5..120f1b2 100644
--- a/FreeRTOS/Demo/CORTEX_LM3S811_GCC/FreeRTOSConfig.h
+++ b/FreeRTOS/Demo/CORTEX_LM3S811_GCC/FreeRTOSConfig.h
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Demo/CORTEX_LM3S811_GCC/main.c b/FreeRTOS/Demo/CORTEX_LM3S811_GCC/main.c
index bba59a6..f28d185 100644
--- a/FreeRTOS/Demo/CORTEX_LM3S811_GCC/main.c
+++ b/FreeRTOS/Demo/CORTEX_LM3S811_GCC/main.c
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Demo/CORTEX_LM3S811_IAR/FreeRTOSConfig.h b/FreeRTOS/Demo/CORTEX_LM3S811_IAR/FreeRTOSConfig.h
index c16753e..1efef2c 100644
--- a/FreeRTOS/Demo/CORTEX_LM3S811_IAR/FreeRTOSConfig.h
+++ b/FreeRTOS/Demo/CORTEX_LM3S811_IAR/FreeRTOSConfig.h
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Demo/CORTEX_LM3S811_IAR/main.c b/FreeRTOS/Demo/CORTEX_LM3S811_IAR/main.c
index 71b5ff9..ba4ab75 100644
--- a/FreeRTOS/Demo/CORTEX_LM3S811_IAR/main.c
+++ b/FreeRTOS/Demo/CORTEX_LM3S811_IAR/main.c
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Demo/CORTEX_LM3S811_KEIL/FreeRTOSConfig.h b/FreeRTOS/Demo/CORTEX_LM3S811_KEIL/FreeRTOSConfig.h
index 0320f97..98170f4 100644
--- a/FreeRTOS/Demo/CORTEX_LM3S811_KEIL/FreeRTOSConfig.h
+++ b/FreeRTOS/Demo/CORTEX_LM3S811_KEIL/FreeRTOSConfig.h
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Demo/CORTEX_LM3S811_KEIL/heap/heap_1.c b/FreeRTOS/Demo/CORTEX_LM3S811_KEIL/heap/heap_1.c
index 15654dc..5f57d53 100644
--- a/FreeRTOS/Demo/CORTEX_LM3S811_KEIL/heap/heap_1.c
+++ b/FreeRTOS/Demo/CORTEX_LM3S811_KEIL/heap/heap_1.c
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Demo/CORTEX_LM3S811_KEIL/main.c b/FreeRTOS/Demo/CORTEX_LM3S811_KEIL/main.c
index 6440e8f..0c4c0ff 100644
--- a/FreeRTOS/Demo/CORTEX_LM3S811_KEIL/main.c
+++ b/FreeRTOS/Demo/CORTEX_LM3S811_KEIL/main.c
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Demo/CORTEX_LM3Sxxxx_Eclipse/RTOSDemo/FreeRTOSConfig.h b/FreeRTOS/Demo/CORTEX_LM3Sxxxx_Eclipse/RTOSDemo/FreeRTOSConfig.h
index f4a2ad3..19608c4 100644
--- a/FreeRTOS/Demo/CORTEX_LM3Sxxxx_Eclipse/RTOSDemo/FreeRTOSConfig.h
+++ b/FreeRTOS/Demo/CORTEX_LM3Sxxxx_Eclipse/RTOSDemo/FreeRTOSConfig.h
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Demo/CORTEX_LM3Sxxxx_Eclipse/RTOSDemo/IntQueueTimer.c b/FreeRTOS/Demo/CORTEX_LM3Sxxxx_Eclipse/RTOSDemo/IntQueueTimer.c
index 41d387a..8a474dc 100644
--- a/FreeRTOS/Demo/CORTEX_LM3Sxxxx_Eclipse/RTOSDemo/IntQueueTimer.c
+++ b/FreeRTOS/Demo/CORTEX_LM3Sxxxx_Eclipse/RTOSDemo/IntQueueTimer.c
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Demo/CORTEX_LM3Sxxxx_Eclipse/RTOSDemo/IntQueueTimer.h b/FreeRTOS/Demo/CORTEX_LM3Sxxxx_Eclipse/RTOSDemo/IntQueueTimer.h
index 77de772..fcf9f8c 100644
--- a/FreeRTOS/Demo/CORTEX_LM3Sxxxx_Eclipse/RTOSDemo/IntQueueTimer.h
+++ b/FreeRTOS/Demo/CORTEX_LM3Sxxxx_Eclipse/RTOSDemo/IntQueueTimer.h
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Demo/CORTEX_LM3Sxxxx_Eclipse/RTOSDemo/Makefile b/FreeRTOS/Demo/CORTEX_LM3Sxxxx_Eclipse/RTOSDemo/Makefile
index 33fe667..46ca41e 100644
--- a/FreeRTOS/Demo/CORTEX_LM3Sxxxx_Eclipse/RTOSDemo/Makefile
+++ b/FreeRTOS/Demo/CORTEX_LM3Sxxxx_Eclipse/RTOSDemo/Makefile
@@ -1,5 +1,5 @@
 #/*

-#    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+#    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

 #	

 #

 #    ***************************************************************************

diff --git a/FreeRTOS/Demo/CORTEX_LM3Sxxxx_Eclipse/RTOSDemo/ParTest/ParTest.c b/FreeRTOS/Demo/CORTEX_LM3Sxxxx_Eclipse/RTOSDemo/ParTest/ParTest.c
index fa9ee28..cb6f999 100644
--- a/FreeRTOS/Demo/CORTEX_LM3Sxxxx_Eclipse/RTOSDemo/ParTest/ParTest.c
+++ b/FreeRTOS/Demo/CORTEX_LM3Sxxxx_Eclipse/RTOSDemo/ParTest/ParTest.c
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Demo/CORTEX_LM3Sxxxx_Eclipse/RTOSDemo/main.c b/FreeRTOS/Demo/CORTEX_LM3Sxxxx_Eclipse/RTOSDemo/main.c
index 8a70143..27895b8 100644
--- a/FreeRTOS/Demo/CORTEX_LM3Sxxxx_Eclipse/RTOSDemo/main.c
+++ b/FreeRTOS/Demo/CORTEX_LM3Sxxxx_Eclipse/RTOSDemo/main.c
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Demo/CORTEX_LM3Sxxxx_Eclipse/RTOSDemo/timertest.c b/FreeRTOS/Demo/CORTEX_LM3Sxxxx_Eclipse/RTOSDemo/timertest.c
index 2a9c159..6aa994d 100644
--- a/FreeRTOS/Demo/CORTEX_LM3Sxxxx_Eclipse/RTOSDemo/timertest.c
+++ b/FreeRTOS/Demo/CORTEX_LM3Sxxxx_Eclipse/RTOSDemo/timertest.c
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Demo/CORTEX_LM3Sxxxx_Eclipse/RTOSDemo/webserver/emac.c b/FreeRTOS/Demo/CORTEX_LM3Sxxxx_Eclipse/RTOSDemo/webserver/emac.c
index 7a99faf..ec52e50 100644
--- a/FreeRTOS/Demo/CORTEX_LM3Sxxxx_Eclipse/RTOSDemo/webserver/emac.c
+++ b/FreeRTOS/Demo/CORTEX_LM3Sxxxx_Eclipse/RTOSDemo/webserver/emac.c
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Demo/CORTEX_LM3Sxxxx_Eclipse/RTOSDemo/webserver/uIP_Task.c b/FreeRTOS/Demo/CORTEX_LM3Sxxxx_Eclipse/RTOSDemo/webserver/uIP_Task.c
index 29be8c1..27758cb 100644
--- a/FreeRTOS/Demo/CORTEX_LM3Sxxxx_Eclipse/RTOSDemo/webserver/uIP_Task.c
+++ b/FreeRTOS/Demo/CORTEX_LM3Sxxxx_Eclipse/RTOSDemo/webserver/uIP_Task.c
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Demo/CORTEX_LM3Sxxxx_IAR_Keil/FreeRTOSConfig.h b/FreeRTOS/Demo/CORTEX_LM3Sxxxx_IAR_Keil/FreeRTOSConfig.h
index a1b4a32..b1b35a4 100644
--- a/FreeRTOS/Demo/CORTEX_LM3Sxxxx_IAR_Keil/FreeRTOSConfig.h
+++ b/FreeRTOS/Demo/CORTEX_LM3Sxxxx_IAR_Keil/FreeRTOSConfig.h
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Demo/CORTEX_LM3Sxxxx_IAR_Keil/IntQueueTimer.c b/FreeRTOS/Demo/CORTEX_LM3Sxxxx_IAR_Keil/IntQueueTimer.c
index 41d387a..8a474dc 100644
--- a/FreeRTOS/Demo/CORTEX_LM3Sxxxx_IAR_Keil/IntQueueTimer.c
+++ b/FreeRTOS/Demo/CORTEX_LM3Sxxxx_IAR_Keil/IntQueueTimer.c
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Demo/CORTEX_LM3Sxxxx_IAR_Keil/IntQueueTimer.h b/FreeRTOS/Demo/CORTEX_LM3Sxxxx_IAR_Keil/IntQueueTimer.h
index 77de772..fcf9f8c 100644
--- a/FreeRTOS/Demo/CORTEX_LM3Sxxxx_IAR_Keil/IntQueueTimer.h
+++ b/FreeRTOS/Demo/CORTEX_LM3Sxxxx_IAR_Keil/IntQueueTimer.h
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Demo/CORTEX_LM3Sxxxx_IAR_Keil/ParTest/ParTest.c b/FreeRTOS/Demo/CORTEX_LM3Sxxxx_IAR_Keil/ParTest/ParTest.c
index fa9ee28..cb6f999 100644
--- a/FreeRTOS/Demo/CORTEX_LM3Sxxxx_IAR_Keil/ParTest/ParTest.c
+++ b/FreeRTOS/Demo/CORTEX_LM3Sxxxx_IAR_Keil/ParTest/ParTest.c
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Demo/CORTEX_LM3Sxxxx_IAR_Keil/main.c b/FreeRTOS/Demo/CORTEX_LM3Sxxxx_IAR_Keil/main.c
index 83c6af9..c46dfa3 100644
--- a/FreeRTOS/Demo/CORTEX_LM3Sxxxx_IAR_Keil/main.c
+++ b/FreeRTOS/Demo/CORTEX_LM3Sxxxx_IAR_Keil/main.c
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Demo/CORTEX_LM3Sxxxx_IAR_Keil/timertest.c b/FreeRTOS/Demo/CORTEX_LM3Sxxxx_IAR_Keil/timertest.c
index f9234af..0a6b30a 100644
--- a/FreeRTOS/Demo/CORTEX_LM3Sxxxx_IAR_Keil/timertest.c
+++ b/FreeRTOS/Demo/CORTEX_LM3Sxxxx_IAR_Keil/timertest.c
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Demo/CORTEX_LM3Sxxxx_IAR_Keil/webserver/emac.c b/FreeRTOS/Demo/CORTEX_LM3Sxxxx_IAR_Keil/webserver/emac.c
index 153979d..40af02e 100644
--- a/FreeRTOS/Demo/CORTEX_LM3Sxxxx_IAR_Keil/webserver/emac.c
+++ b/FreeRTOS/Demo/CORTEX_LM3Sxxxx_IAR_Keil/webserver/emac.c
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

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 85845a6..eca8018 100644
--- a/FreeRTOS/Demo/CORTEX_LM3Sxxxx_IAR_Keil/webserver/uIP_Task.c
+++ b/FreeRTOS/Demo/CORTEX_LM3Sxxxx_IAR_Keil/webserver/uIP_Task.c
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Demo/CORTEX_LM3Sxxxx_Rowley/FreeRTOSConfig.h b/FreeRTOS/Demo/CORTEX_LM3Sxxxx_Rowley/FreeRTOSConfig.h
index e43568b..7137aaa 100644
--- a/FreeRTOS/Demo/CORTEX_LM3Sxxxx_Rowley/FreeRTOSConfig.h
+++ b/FreeRTOS/Demo/CORTEX_LM3Sxxxx_Rowley/FreeRTOSConfig.h
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Demo/CORTEX_LM3Sxxxx_Rowley/IntQueueTimer.c b/FreeRTOS/Demo/CORTEX_LM3Sxxxx_Rowley/IntQueueTimer.c
index 41d387a..8a474dc 100644
--- a/FreeRTOS/Demo/CORTEX_LM3Sxxxx_Rowley/IntQueueTimer.c
+++ b/FreeRTOS/Demo/CORTEX_LM3Sxxxx_Rowley/IntQueueTimer.c
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Demo/CORTEX_LM3Sxxxx_Rowley/IntQueueTimer.h b/FreeRTOS/Demo/CORTEX_LM3Sxxxx_Rowley/IntQueueTimer.h
index 77de772..fcf9f8c 100644
--- a/FreeRTOS/Demo/CORTEX_LM3Sxxxx_Rowley/IntQueueTimer.h
+++ b/FreeRTOS/Demo/CORTEX_LM3Sxxxx_Rowley/IntQueueTimer.h
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Demo/CORTEX_LM3Sxxxx_Rowley/ParTest/ParTest.c b/FreeRTOS/Demo/CORTEX_LM3Sxxxx_Rowley/ParTest/ParTest.c
index fa9ee28..cb6f999 100644
--- a/FreeRTOS/Demo/CORTEX_LM3Sxxxx_Rowley/ParTest/ParTest.c
+++ b/FreeRTOS/Demo/CORTEX_LM3Sxxxx_Rowley/ParTest/ParTest.c
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Demo/CORTEX_LM3Sxxxx_Rowley/main.c b/FreeRTOS/Demo/CORTEX_LM3Sxxxx_Rowley/main.c
index 62c646f..65e273e 100644
--- a/FreeRTOS/Demo/CORTEX_LM3Sxxxx_Rowley/main.c
+++ b/FreeRTOS/Demo/CORTEX_LM3Sxxxx_Rowley/main.c
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Demo/CORTEX_LM3Sxxxx_Rowley/timertest.c b/FreeRTOS/Demo/CORTEX_LM3Sxxxx_Rowley/timertest.c
index 2a9c159..6aa994d 100644
--- a/FreeRTOS/Demo/CORTEX_LM3Sxxxx_Rowley/timertest.c
+++ b/FreeRTOS/Demo/CORTEX_LM3Sxxxx_Rowley/timertest.c
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Demo/CORTEX_LM3Sxxxx_Rowley/webserver/emac.c b/FreeRTOS/Demo/CORTEX_LM3Sxxxx_Rowley/webserver/emac.c
index 726d415..0b4247e 100644
--- a/FreeRTOS/Demo/CORTEX_LM3Sxxxx_Rowley/webserver/emac.c
+++ b/FreeRTOS/Demo/CORTEX_LM3Sxxxx_Rowley/webserver/emac.c
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Demo/CORTEX_LM3Sxxxx_Rowley/webserver/uIP_Task.c b/FreeRTOS/Demo/CORTEX_LM3Sxxxx_Rowley/webserver/uIP_Task.c
index 328a24f..852526a 100644
--- a/FreeRTOS/Demo/CORTEX_LM3Sxxxx_Rowley/webserver/uIP_Task.c
+++ b/FreeRTOS/Demo/CORTEX_LM3Sxxxx_Rowley/webserver/uIP_Task.c
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Demo/CORTEX_LPC1768_GCC_RedSuite/src/FreeRTOSConfig.h b/FreeRTOS/Demo/CORTEX_LPC1768_GCC_RedSuite/src/FreeRTOSConfig.h
index 1c94c91..e05f0e3 100644
--- a/FreeRTOS/Demo/CORTEX_LPC1768_GCC_RedSuite/src/FreeRTOSConfig.h
+++ b/FreeRTOS/Demo/CORTEX_LPC1768_GCC_RedSuite/src/FreeRTOSConfig.h
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Demo/CORTEX_LPC1768_GCC_RedSuite/src/ParTest.c b/FreeRTOS/Demo/CORTEX_LPC1768_GCC_RedSuite/src/ParTest.c
index b6cca3f..8651cc5 100644
--- a/FreeRTOS/Demo/CORTEX_LPC1768_GCC_RedSuite/src/ParTest.c
+++ b/FreeRTOS/Demo/CORTEX_LPC1768_GCC_RedSuite/src/ParTest.c
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Demo/CORTEX_LPC1768_GCC_RedSuite/src/main.c b/FreeRTOS/Demo/CORTEX_LPC1768_GCC_RedSuite/src/main.c
index 96628da..9612376 100644
--- a/FreeRTOS/Demo/CORTEX_LPC1768_GCC_RedSuite/src/main.c
+++ b/FreeRTOS/Demo/CORTEX_LPC1768_GCC_RedSuite/src/main.c
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

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 ae93793..723120d 100644
--- a/FreeRTOS/Demo/CORTEX_LPC1768_GCC_RedSuite/src/webserver/emac.c
+++ b/FreeRTOS/Demo/CORTEX_LPC1768_GCC_RedSuite/src/webserver/emac.c
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

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 d432808..441cf15 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,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Demo/CORTEX_LPC1768_GCC_Rowley/FreeRTOSConfig.h b/FreeRTOS/Demo/CORTEX_LPC1768_GCC_Rowley/FreeRTOSConfig.h
index ddb21b2..6ad8ba8 100644
--- a/FreeRTOS/Demo/CORTEX_LPC1768_GCC_Rowley/FreeRTOSConfig.h
+++ b/FreeRTOS/Demo/CORTEX_LPC1768_GCC_Rowley/FreeRTOSConfig.h
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Demo/CORTEX_LPC1768_GCC_Rowley/LED.h b/FreeRTOS/Demo/CORTEX_LPC1768_GCC_Rowley/LED.h
index 90b856d..507f1cc 100644
--- a/FreeRTOS/Demo/CORTEX_LPC1768_GCC_Rowley/LED.h
+++ b/FreeRTOS/Demo/CORTEX_LPC1768_GCC_Rowley/LED.h
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Demo/CORTEX_LPC1768_GCC_Rowley/ParTest.c b/FreeRTOS/Demo/CORTEX_LPC1768_GCC_Rowley/ParTest.c
index 7f5fb66..a55224c 100644
--- a/FreeRTOS/Demo/CORTEX_LPC1768_GCC_Rowley/ParTest.c
+++ b/FreeRTOS/Demo/CORTEX_LPC1768_GCC_Rowley/ParTest.c
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Demo/CORTEX_LPC1768_GCC_Rowley/main.c b/FreeRTOS/Demo/CORTEX_LPC1768_GCC_Rowley/main.c
index 894ff5f..56d9522 100644
--- a/FreeRTOS/Demo/CORTEX_LPC1768_GCC_Rowley/main.c
+++ b/FreeRTOS/Demo/CORTEX_LPC1768_GCC_Rowley/main.c
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Demo/CORTEX_LPC1768_GCC_Rowley/webserver/emac.c b/FreeRTOS/Demo/CORTEX_LPC1768_GCC_Rowley/webserver/emac.c
index ff88197..9a171ed 100644
--- a/FreeRTOS/Demo/CORTEX_LPC1768_GCC_Rowley/webserver/emac.c
+++ b/FreeRTOS/Demo/CORTEX_LPC1768_GCC_Rowley/webserver/emac.c
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

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 4f924f8..96a9693 100644
--- a/FreeRTOS/Demo/CORTEX_LPC1768_GCC_Rowley/webserver/uIP_Task.c
+++ b/FreeRTOS/Demo/CORTEX_LPC1768_GCC_Rowley/webserver/uIP_Task.c
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Demo/CORTEX_LPC1768_IAR/FreeRTOSConfig.h b/FreeRTOS/Demo/CORTEX_LPC1768_IAR/FreeRTOSConfig.h
index eace709..bf3ecd2 100644
--- a/FreeRTOS/Demo/CORTEX_LPC1768_IAR/FreeRTOSConfig.h
+++ b/FreeRTOS/Demo/CORTEX_LPC1768_IAR/FreeRTOSConfig.h
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Demo/CORTEX_LPC1768_IAR/LED.h b/FreeRTOS/Demo/CORTEX_LPC1768_IAR/LED.h
index 90b856d..507f1cc 100644
--- a/FreeRTOS/Demo/CORTEX_LPC1768_IAR/LED.h
+++ b/FreeRTOS/Demo/CORTEX_LPC1768_IAR/LED.h
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Demo/CORTEX_LPC1768_IAR/ParTest.c b/FreeRTOS/Demo/CORTEX_LPC1768_IAR/ParTest.c
index dc0b1b4..9d3bece 100644
--- a/FreeRTOS/Demo/CORTEX_LPC1768_IAR/ParTest.c
+++ b/FreeRTOS/Demo/CORTEX_LPC1768_IAR/ParTest.c
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Demo/CORTEX_LPC1768_IAR/main.c b/FreeRTOS/Demo/CORTEX_LPC1768_IAR/main.c
index 3a0868d..60a6c9e 100644
--- a/FreeRTOS/Demo/CORTEX_LPC1768_IAR/main.c
+++ b/FreeRTOS/Demo/CORTEX_LPC1768_IAR/main.c
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Demo/CORTEX_LPC1768_IAR/webserver/emac.c b/FreeRTOS/Demo/CORTEX_LPC1768_IAR/webserver/emac.c
index a138c83..c8c41b0 100644
--- a/FreeRTOS/Demo/CORTEX_LPC1768_IAR/webserver/emac.c
+++ b/FreeRTOS/Demo/CORTEX_LPC1768_IAR/webserver/emac.c
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Demo/CORTEX_LPC1768_IAR/webserver/uIP_Task.c b/FreeRTOS/Demo/CORTEX_LPC1768_IAR/webserver/uIP_Task.c
index 4f924f8..96a9693 100644
--- a/FreeRTOS/Demo/CORTEX_LPC1768_IAR/webserver/uIP_Task.c
+++ b/FreeRTOS/Demo/CORTEX_LPC1768_IAR/webserver/uIP_Task.c
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

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 b6e2ed1..c1f5569 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,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

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 ac7738e..9299f5e 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,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

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 35959f4..aaaa483 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,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

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 710f89e..ec34ed6 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,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

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 e99c96a..aeda7f0 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,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

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 6e20c09..58dd62c 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,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

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 9d349ba..a31602a 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,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

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 0ba53c4..3dcac51 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,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

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 52c37e4..ee9bc62 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,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

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 bfcee96..1b3ae51 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,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

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 6ac9b01..f4ff96f 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,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

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 979c819..713928e 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,5 +1,5 @@
 ;/*

-;    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+;    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

 ;

 ;    VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

 ;

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 73473f9..cbfc7ee 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,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

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 b96e60a..3eef29e 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,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

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 c5ceca6..7f5b035 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,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

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 95de3d8..593547d 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,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

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 bf12920..fc66b55 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,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

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 8f8305c..216203e 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,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

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 7dc63cb..db468bd 100644
--- a/FreeRTOS/Demo/CORTEX_M0_LPC1114_LPCXpresso/RTOSDemo/Source/FreeRTOSConfig.h
+++ b/FreeRTOS/Demo/CORTEX_M0_LPC1114_LPCXpresso/RTOSDemo/Source/FreeRTOSConfig.h
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

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 b319b9c..a1219fa 100644
--- a/FreeRTOS/Demo/CORTEX_M0_LPC1114_LPCXpresso/RTOSDemo/Source/IntQueueTimer.c
+++ b/FreeRTOS/Demo/CORTEX_M0_LPC1114_LPCXpresso/RTOSDemo/Source/IntQueueTimer.c
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

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 77de772..fcf9f8c 100644
--- a/FreeRTOS/Demo/CORTEX_M0_LPC1114_LPCXpresso/RTOSDemo/Source/IntQueueTimer.h
+++ b/FreeRTOS/Demo/CORTEX_M0_LPC1114_LPCXpresso/RTOSDemo/Source/IntQueueTimer.h
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

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 259904c..33e8785 100644
--- a/FreeRTOS/Demo/CORTEX_M0_LPC1114_LPCXpresso/RTOSDemo/Source/RegTest.c
+++ b/FreeRTOS/Demo/CORTEX_M0_LPC1114_LPCXpresso/RTOSDemo/Source/RegTest.c
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

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 d3cfd53..48022cf 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,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

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 64e9cea..852df55 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,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

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 369e40e..381957f 100644
--- a/FreeRTOS/Demo/CORTEX_M0_LPC1114_LPCXpresso/RTOSDemo/Source/main.c
+++ b/FreeRTOS/Demo/CORTEX_M0_LPC1114_LPCXpresso/RTOSDemo/Source/main.c
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Demo/CORTEX_M0_STM32F0518_IAR/FreeRTOSConfig.h b/FreeRTOS/Demo/CORTEX_M0_STM32F0518_IAR/FreeRTOSConfig.h
index 0955f02..3130d10 100644
--- a/FreeRTOS/Demo/CORTEX_M0_STM32F0518_IAR/FreeRTOSConfig.h
+++ b/FreeRTOS/Demo/CORTEX_M0_STM32F0518_IAR/FreeRTOSConfig.h
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Demo/CORTEX_M0_STM32F0518_IAR/ParTest.c b/FreeRTOS/Demo/CORTEX_M0_STM32F0518_IAR/ParTest.c
index 3f68738..097774a 100644
--- a/FreeRTOS/Demo/CORTEX_M0_STM32F0518_IAR/ParTest.c
+++ b/FreeRTOS/Demo/CORTEX_M0_STM32F0518_IAR/ParTest.c
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Demo/CORTEX_M0_STM32F0518_IAR/RegTest.s b/FreeRTOS/Demo/CORTEX_M0_STM32F0518_IAR/RegTest.s
index 12721d5..e074aee 100644
--- a/FreeRTOS/Demo/CORTEX_M0_STM32F0518_IAR/RegTest.s
+++ b/FreeRTOS/Demo/CORTEX_M0_STM32F0518_IAR/RegTest.s
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Demo/CORTEX_M0_STM32F0518_IAR/main-blinky.c b/FreeRTOS/Demo/CORTEX_M0_STM32F0518_IAR/main-blinky.c
index bb03936..3ab8a89 100644
--- a/FreeRTOS/Demo/CORTEX_M0_STM32F0518_IAR/main-blinky.c
+++ b/FreeRTOS/Demo/CORTEX_M0_STM32F0518_IAR/main-blinky.c
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Demo/CORTEX_M0_STM32F0518_IAR/main-full.c b/FreeRTOS/Demo/CORTEX_M0_STM32F0518_IAR/main-full.c
index 93b7fb2..f0d2800 100644
--- a/FreeRTOS/Demo/CORTEX_M0_STM32F0518_IAR/main-full.c
+++ b/FreeRTOS/Demo/CORTEX_M0_STM32F0518_IAR/main-full.c
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Demo/CORTEX_M0_STM32F0518_IAR/main.c b/FreeRTOS/Demo/CORTEX_M0_STM32F0518_IAR/main.c
index 0c0a648..3db3afc 100644
--- a/FreeRTOS/Demo/CORTEX_M0_STM32F0518_IAR/main.c
+++ b/FreeRTOS/Demo/CORTEX_M0_STM32F0518_IAR/main.c
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Demo/CORTEX_M4F_ATSAM4E_Atmel_Studio/src/IntQueueTimer.c b/FreeRTOS/Demo/CORTEX_M4F_ATSAM4E_Atmel_Studio/src/IntQueueTimer.c
index fe11335..83ef3ab 100644
--- a/FreeRTOS/Demo/CORTEX_M4F_ATSAM4E_Atmel_Studio/src/IntQueueTimer.c
+++ b/FreeRTOS/Demo/CORTEX_M4F_ATSAM4E_Atmel_Studio/src/IntQueueTimer.c
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Demo/CORTEX_M4F_ATSAM4E_Atmel_Studio/src/IntQueueTimer.h b/FreeRTOS/Demo/CORTEX_M4F_ATSAM4E_Atmel_Studio/src/IntQueueTimer.h
index 528e6fd..a26068c 100644
--- a/FreeRTOS/Demo/CORTEX_M4F_ATSAM4E_Atmel_Studio/src/IntQueueTimer.h
+++ b/FreeRTOS/Demo/CORTEX_M4F_ATSAM4E_Atmel_Studio/src/IntQueueTimer.h
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Demo/CORTEX_M4F_ATSAM4E_Atmel_Studio/src/ParTest.c b/FreeRTOS/Demo/CORTEX_M4F_ATSAM4E_Atmel_Studio/src/ParTest.c
index 5e32aab..f7314f8 100644
--- a/FreeRTOS/Demo/CORTEX_M4F_ATSAM4E_Atmel_Studio/src/ParTest.c
+++ b/FreeRTOS/Demo/CORTEX_M4F_ATSAM4E_Atmel_Studio/src/ParTest.c
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Demo/CORTEX_M4F_ATSAM4E_Atmel_Studio/src/RunTimeStatsTimer.c b/FreeRTOS/Demo/CORTEX_M4F_ATSAM4E_Atmel_Studio/src/RunTimeStatsTimer.c
index c8f141d..3d29d54 100644
--- a/FreeRTOS/Demo/CORTEX_M4F_ATSAM4E_Atmel_Studio/src/RunTimeStatsTimer.c
+++ b/FreeRTOS/Demo/CORTEX_M4F_ATSAM4E_Atmel_Studio/src/RunTimeStatsTimer.c
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Demo/CORTEX_M4F_ATSAM4E_Atmel_Studio/src/config/FreeRTOSConfig.h b/FreeRTOS/Demo/CORTEX_M4F_ATSAM4E_Atmel_Studio/src/config/FreeRTOSConfig.h
index b5d7372..140769c 100644
--- a/FreeRTOS/Demo/CORTEX_M4F_ATSAM4E_Atmel_Studio/src/config/FreeRTOSConfig.h
+++ b/FreeRTOS/Demo/CORTEX_M4F_ATSAM4E_Atmel_Studio/src/config/FreeRTOSConfig.h
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Demo/CORTEX_M4F_ATSAM4E_Atmel_Studio/src/main.c b/FreeRTOS/Demo/CORTEX_M4F_ATSAM4E_Atmel_Studio/src/main.c
index 18dee54..6d8215b 100644
--- a/FreeRTOS/Demo/CORTEX_M4F_ATSAM4E_Atmel_Studio/src/main.c
+++ b/FreeRTOS/Demo/CORTEX_M4F_ATSAM4E_Atmel_Studio/src/main.c
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Demo/CORTEX_M4F_ATSAM4E_Atmel_Studio/src/main_blinky.c b/FreeRTOS/Demo/CORTEX_M4F_ATSAM4E_Atmel_Studio/src/main_blinky.c
index f74ec27..c2692f4 100644
--- a/FreeRTOS/Demo/CORTEX_M4F_ATSAM4E_Atmel_Studio/src/main_blinky.c
+++ b/FreeRTOS/Demo/CORTEX_M4F_ATSAM4E_Atmel_Studio/src/main_blinky.c
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Demo/CORTEX_M4F_ATSAM4E_Atmel_Studio/src/main_full.c b/FreeRTOS/Demo/CORTEX_M4F_ATSAM4E_Atmel_Studio/src/main_full.c
index 059270c..1a0c074 100644
--- a/FreeRTOS/Demo/CORTEX_M4F_ATSAM4E_Atmel_Studio/src/main_full.c
+++ b/FreeRTOS/Demo/CORTEX_M4F_ATSAM4E_Atmel_Studio/src/main_full.c
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

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 7c880eb..b7e2b47 100644
--- a/FreeRTOS/Demo/CORTEX_M4F_Infineon_XMC4000_GCC_Dave/FreeRTOSConfig.h
+++ b/FreeRTOS/Demo/CORTEX_M4F_Infineon_XMC4000_GCC_Dave/FreeRTOSConfig.h
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

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 a1c1304..38e5ee4 100644
--- a/FreeRTOS/Demo/CORTEX_M4F_Infineon_XMC4000_GCC_Dave/main.c
+++ b/FreeRTOS/Demo/CORTEX_M4F_Infineon_XMC4000_GCC_Dave/main.c
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

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 f421b86..5ccbc99 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,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

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 1717c7a..1c65e86 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,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Demo/CORTEX_M4F_Infineon_XMC4000_IAR/FreeRTOSConfig.h b/FreeRTOS/Demo/CORTEX_M4F_Infineon_XMC4000_IAR/FreeRTOSConfig.h
index 3c2601b..2cb3872 100644
--- a/FreeRTOS/Demo/CORTEX_M4F_Infineon_XMC4000_IAR/FreeRTOSConfig.h
+++ b/FreeRTOS/Demo/CORTEX_M4F_Infineon_XMC4000_IAR/FreeRTOSConfig.h
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Demo/CORTEX_M4F_Infineon_XMC4000_IAR/RegTest.s b/FreeRTOS/Demo/CORTEX_M4F_Infineon_XMC4000_IAR/RegTest.s
index f848a45..8ec2984 100644
--- a/FreeRTOS/Demo/CORTEX_M4F_Infineon_XMC4000_IAR/RegTest.s
+++ b/FreeRTOS/Demo/CORTEX_M4F_Infineon_XMC4000_IAR/RegTest.s
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Demo/CORTEX_M4F_Infineon_XMC4000_IAR/main.c b/FreeRTOS/Demo/CORTEX_M4F_Infineon_XMC4000_IAR/main.c
index 17c2d71..75eb8cf 100644
--- a/FreeRTOS/Demo/CORTEX_M4F_Infineon_XMC4000_IAR/main.c
+++ b/FreeRTOS/Demo/CORTEX_M4F_Infineon_XMC4000_IAR/main.c
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

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 f421b86..5ccbc99 100644
--- a/FreeRTOS/Demo/CORTEX_M4F_Infineon_XMC4000_IAR/main_blinky.c
+++ b/FreeRTOS/Demo/CORTEX_M4F_Infineon_XMC4000_IAR/main_blinky.c
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

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 7bcf5a7..06eaf2f 100644
--- a/FreeRTOS/Demo/CORTEX_M4F_Infineon_XMC4000_IAR/main_full.c
+++ b/FreeRTOS/Demo/CORTEX_M4F_Infineon_XMC4000_IAR/main_full.c
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Demo/CORTEX_M4F_Infineon_XMC4000_Keil/FreeRTOSConfig.h b/FreeRTOS/Demo/CORTEX_M4F_Infineon_XMC4000_Keil/FreeRTOSConfig.h
index 12e2f54..4e76f61 100644
--- a/FreeRTOS/Demo/CORTEX_M4F_Infineon_XMC4000_Keil/FreeRTOSConfig.h
+++ b/FreeRTOS/Demo/CORTEX_M4F_Infineon_XMC4000_Keil/FreeRTOSConfig.h
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Demo/CORTEX_M4F_Infineon_XMC4000_Keil/RegTest.c b/FreeRTOS/Demo/CORTEX_M4F_Infineon_XMC4000_Keil/RegTest.c
index e677591..9ca17fb 100644
--- a/FreeRTOS/Demo/CORTEX_M4F_Infineon_XMC4000_Keil/RegTest.c
+++ b/FreeRTOS/Demo/CORTEX_M4F_Infineon_XMC4000_Keil/RegTest.c
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Demo/CORTEX_M4F_Infineon_XMC4000_Keil/main.c b/FreeRTOS/Demo/CORTEX_M4F_Infineon_XMC4000_Keil/main.c
index ccd9f14..7655dcb 100644
--- a/FreeRTOS/Demo/CORTEX_M4F_Infineon_XMC4000_Keil/main.c
+++ b/FreeRTOS/Demo/CORTEX_M4F_Infineon_XMC4000_Keil/main.c
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

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 f421b86..5ccbc99 100644
--- a/FreeRTOS/Demo/CORTEX_M4F_Infineon_XMC4000_Keil/main_blinky.c
+++ b/FreeRTOS/Demo/CORTEX_M4F_Infineon_XMC4000_Keil/main_blinky.c
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

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 4b0ffbe..46c823c 100644
--- a/FreeRTOS/Demo/CORTEX_M4F_Infineon_XMC4000_Keil/main_full.c
+++ b/FreeRTOS/Demo/CORTEX_M4F_Infineon_XMC4000_Keil/main_full.c
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Demo/CORTEX_M4F_Infineon_XMC4000_Tasking/FreeRTOSConfig.h b/FreeRTOS/Demo/CORTEX_M4F_Infineon_XMC4000_Tasking/FreeRTOSConfig.h
index 8124f44..3b8a324 100644
--- a/FreeRTOS/Demo/CORTEX_M4F_Infineon_XMC4000_Tasking/FreeRTOSConfig.h
+++ b/FreeRTOS/Demo/CORTEX_M4F_Infineon_XMC4000_Tasking/FreeRTOSConfig.h
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Demo/CORTEX_M4F_Infineon_XMC4000_Tasking/main.c b/FreeRTOS/Demo/CORTEX_M4F_Infineon_XMC4000_Tasking/main.c
index 2ef832f..63d3b19 100644
--- a/FreeRTOS/Demo/CORTEX_M4F_Infineon_XMC4000_Tasking/main.c
+++ b/FreeRTOS/Demo/CORTEX_M4F_Infineon_XMC4000_Tasking/main.c
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

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 37775d3..1bb0097 100644
--- a/FreeRTOS/Demo/CORTEX_M4F_Infineon_XMC4000_Tasking/main_blinky.c
+++ b/FreeRTOS/Demo/CORTEX_M4F_Infineon_XMC4000_Tasking/main_blinky.c
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

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 464c197..56e98ba 100644
--- a/FreeRTOS/Demo/CORTEX_M4F_Infineon_XMC4000_Tasking/main_full.c
+++ b/FreeRTOS/Demo/CORTEX_M4F_Infineon_XMC4000_Tasking/main_full.c
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

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 a8e9dcb..4ad8e98 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,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

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 089111e..8718cee 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,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

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 c9dae69..3418609 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,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

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 04e4057..97611aa 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,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

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 7b20413..961ba5d 100644
--- a/FreeRTOS/Demo/CORTEX_M4F_M0_LPC43xx_Keil/M4/FreeRTOSConfig.h
+++ b/FreeRTOS/Demo/CORTEX_M4F_M0_LPC43xx_Keil/M4/FreeRTOSConfig.h
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

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 30090aa..99ba046 100644
--- a/FreeRTOS/Demo/CORTEX_M4F_M0_LPC43xx_Keil/M4/ParTest.c
+++ b/FreeRTOS/Demo/CORTEX_M4F_M0_LPC43xx_Keil/M4/ParTest.c
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

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 1abe1f5..a0fbd79 100644
--- a/FreeRTOS/Demo/CORTEX_M4F_M0_LPC43xx_Keil/M4/RegTest.c
+++ b/FreeRTOS/Demo/CORTEX_M4F_M0_LPC43xx_Keil/M4/RegTest.c
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

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 ad14bfb..c621650 100644
--- a/FreeRTOS/Demo/CORTEX_M4F_M0_LPC43xx_Keil/M4/main.c
+++ b/FreeRTOS/Demo/CORTEX_M4F_M0_LPC43xx_Keil/M4/main.c
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

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 4dc996d..5d01845 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,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

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 528e6fd..a26068c 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,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

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 0b6cd78..395355a 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,5 +1,5 @@
 ;/*

-;    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+;    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

 ;    All rights reserved

 ;

 ;    VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

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 b90eacf..2b41206 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,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

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 00e16e8..6f7433d 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,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

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 4bbd762..16a17b1 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,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

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 edf4d36..4a05d10 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,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

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 9dd99f3..7b76a74 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,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

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 dd1f035..3280309 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,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

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 926cc6f..f28621d 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,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Demo/CORTEX_M4F_STM32F407ZG-SK/FreeRTOSConfig.h b/FreeRTOS/Demo/CORTEX_M4F_STM32F407ZG-SK/FreeRTOSConfig.h
index a85224b..fba25c9 100644
--- a/FreeRTOS/Demo/CORTEX_M4F_STM32F407ZG-SK/FreeRTOSConfig.h
+++ b/FreeRTOS/Demo/CORTEX_M4F_STM32F407ZG-SK/FreeRTOSConfig.h
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Demo/CORTEX_M4F_STM32F407ZG-SK/ParTest.c b/FreeRTOS/Demo/CORTEX_M4F_STM32F407ZG-SK/ParTest.c
index 8021a8c..29dfbeb 100644
--- a/FreeRTOS/Demo/CORTEX_M4F_STM32F407ZG-SK/ParTest.c
+++ b/FreeRTOS/Demo/CORTEX_M4F_STM32F407ZG-SK/ParTest.c
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Demo/CORTEX_M4F_STM32F407ZG-SK/RegTest.s b/FreeRTOS/Demo/CORTEX_M4F_STM32F407ZG-SK/RegTest.s
index 78b3dbd..d864596 100644
--- a/FreeRTOS/Demo/CORTEX_M4F_STM32F407ZG-SK/RegTest.s
+++ b/FreeRTOS/Demo/CORTEX_M4F_STM32F407ZG-SK/RegTest.s
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Demo/CORTEX_M4F_STM32F407ZG-SK/main.c b/FreeRTOS/Demo/CORTEX_M4F_STM32F407ZG-SK/main.c
index 33509e2..5d673ff 100644
--- a/FreeRTOS/Demo/CORTEX_M4F_STM32F407ZG-SK/main.c
+++ b/FreeRTOS/Demo/CORTEX_M4F_STM32F407ZG-SK/main.c
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

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 c1f41a9..0496215 100644
--- a/FreeRTOS/Demo/CORTEX_M4_ATSAM4L_Atmel_Studio/src/ParTest.c
+++ b/FreeRTOS/Demo/CORTEX_M4_ATSAM4L_Atmel_Studio/src/ParTest.c
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

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 a5a2cb4..bbb885c 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,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

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 87fa3f1..904e282 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,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

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 98ed393..7e3630e 100644
--- a/FreeRTOS/Demo/CORTEX_M4_ATSAM4L_Atmel_Studio/src/main.c
+++ b/FreeRTOS/Demo/CORTEX_M4_ATSAM4L_Atmel_Studio/src/main.c
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

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 d7b9d7b..aa3a34f 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,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

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 290fc99..ae96afc 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,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

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 57efe09..bceb282 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,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

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 09f399b..dbea24a 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,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

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 5eee8fa..f165549 100644
--- a/FreeRTOS/Demo/CORTEX_M4_ATSAM4S_Atmel_Studio/src/FreeRTOSConfig.h
+++ b/FreeRTOS/Demo/CORTEX_M4_ATSAM4S_Atmel_Studio/src/FreeRTOSConfig.h
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

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 c856a8c..9a9226d 100644
--- a/FreeRTOS/Demo/CORTEX_M4_ATSAM4S_Atmel_Studio/src/IntQueueTimer.c
+++ b/FreeRTOS/Demo/CORTEX_M4_ATSAM4S_Atmel_Studio/src/IntQueueTimer.c
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

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 528e6fd..a26068c 100644
--- a/FreeRTOS/Demo/CORTEX_M4_ATSAM4S_Atmel_Studio/src/IntQueueTimer.h
+++ b/FreeRTOS/Demo/CORTEX_M4_ATSAM4S_Atmel_Studio/src/IntQueueTimer.h
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

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 0b6b80f..85677e9 100644
--- a/FreeRTOS/Demo/CORTEX_M4_ATSAM4S_Atmel_Studio/src/ParTest.c
+++ b/FreeRTOS/Demo/CORTEX_M4_ATSAM4S_Atmel_Studio/src/ParTest.c
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

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 1d1ff2a..9d76ee1 100644
--- a/FreeRTOS/Demo/CORTEX_M4_ATSAM4S_Atmel_Studio/src/main.c
+++ b/FreeRTOS/Demo/CORTEX_M4_ATSAM4S_Atmel_Studio/src/main.c
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

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 4510467..97996d3 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,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

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 0adfbb2..4c82c39 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,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

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 51113e4..202b144 100644
--- a/FreeRTOS/Demo/CORTEX_M4_ATSAM4S_Atmel_Studio/src/serial.c
+++ b/FreeRTOS/Demo/CORTEX_M4_ATSAM4S_Atmel_Studio/src/serial.c
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

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 b2d55da..73a5904 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,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Demo/CORTEX_M7_SAMV71_Xplained_AtmelStudio/FreeRTOSConfig.h b/FreeRTOS/Demo/CORTEX_M7_SAMV71_Xplained_AtmelStudio/FreeRTOSConfig.h
index 4856825..c398eb0 100644
--- a/FreeRTOS/Demo/CORTEX_M7_SAMV71_Xplained_AtmelStudio/FreeRTOSConfig.h
+++ b/FreeRTOS/Demo/CORTEX_M7_SAMV71_Xplained_AtmelStudio/FreeRTOSConfig.h
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

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 92d02d9..2e2b3d5 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,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

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 528e6fd..a26068c 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,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

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 63df4be..35be236 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,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

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 eef1ca3..d8aded7 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,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Demo/CORTEX_M7_SAMV71_Xplained_AtmelStudio/main.c b/FreeRTOS/Demo/CORTEX_M7_SAMV71_Xplained_AtmelStudio/main.c
index 6ccbcc7..7d3d647 100644
--- a/FreeRTOS/Demo/CORTEX_M7_SAMV71_Xplained_AtmelStudio/main.c
+++ b/FreeRTOS/Demo/CORTEX_M7_SAMV71_Xplained_AtmelStudio/main.c
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

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 b2d55da..73a5904 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,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

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 4856825..c398eb0 100644
--- a/FreeRTOS/Demo/CORTEX_M7_SAMV71_Xplained_IAR_Keil/FreeRTOSConfig.h
+++ b/FreeRTOS/Demo/CORTEX_M7_SAMV71_Xplained_IAR_Keil/FreeRTOSConfig.h
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

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 92d02d9..2e2b3d5 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,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

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 528e6fd..a26068c 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,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

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 3a2bbfa..fe60963 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,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

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 eef1ca3..d8aded7 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,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

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 168f1d9..061817b 100644
--- a/FreeRTOS/Demo/CORTEX_M7_SAMV71_Xplained_IAR_Keil/main.c
+++ b/FreeRTOS/Demo/CORTEX_M7_SAMV71_Xplained_IAR_Keil/main.c
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

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 9c59478..f9348e6 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,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

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 924eb17..225d674 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,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

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 5364860..1208731 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,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

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 528e6fd..a26068c 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,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

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 3a2bbfa..fe60963 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,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

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 1aaec1f..f10bcfc 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,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

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 25481cb..32f4187 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,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Demo/CORTEX_MB9A310_IAR_Keil/FreeRTOSConfig.h b/FreeRTOS/Demo/CORTEX_MB9A310_IAR_Keil/FreeRTOSConfig.h
index 7520bce..2794b5b 100644
--- a/FreeRTOS/Demo/CORTEX_MB9A310_IAR_Keil/FreeRTOSConfig.h
+++ b/FreeRTOS/Demo/CORTEX_MB9A310_IAR_Keil/FreeRTOSConfig.h
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Demo/CORTEX_MB9A310_IAR_Keil/ParTest.c b/FreeRTOS/Demo/CORTEX_MB9A310_IAR_Keil/ParTest.c
index c09c5c6..dbf04e5 100644
--- a/FreeRTOS/Demo/CORTEX_MB9A310_IAR_Keil/ParTest.c
+++ b/FreeRTOS/Demo/CORTEX_MB9A310_IAR_Keil/ParTest.c
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Demo/CORTEX_MB9A310_IAR_Keil/main-full.c b/FreeRTOS/Demo/CORTEX_MB9A310_IAR_Keil/main-full.c
index fb8220f..7ecd3a5 100644
--- a/FreeRTOS/Demo/CORTEX_MB9A310_IAR_Keil/main-full.c
+++ b/FreeRTOS/Demo/CORTEX_MB9A310_IAR_Keil/main-full.c
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Demo/CORTEX_MB9A310_IAR_Keil/main_blinky.c b/FreeRTOS/Demo/CORTEX_MB9A310_IAR_Keil/main_blinky.c
index 9f331a3..60094d2 100644
--- a/FreeRTOS/Demo/CORTEX_MB9A310_IAR_Keil/main_blinky.c
+++ b/FreeRTOS/Demo/CORTEX_MB9A310_IAR_Keil/main_blinky.c
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Demo/CORTEX_MB9A310_IAR_Keil/serial.c b/FreeRTOS/Demo/CORTEX_MB9A310_IAR_Keil/serial.c
index 8f8b7f3..23919de 100644
--- a/FreeRTOS/Demo/CORTEX_MB9A310_IAR_Keil/serial.c
+++ b/FreeRTOS/Demo/CORTEX_MB9A310_IAR_Keil/serial.c
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Demo/CORTEX_MB9B500_IAR_Keil/FreeRTOSConfig.h b/FreeRTOS/Demo/CORTEX_MB9B500_IAR_Keil/FreeRTOSConfig.h
index 27d9d7f..087ef8d 100644
--- a/FreeRTOS/Demo/CORTEX_MB9B500_IAR_Keil/FreeRTOSConfig.h
+++ b/FreeRTOS/Demo/CORTEX_MB9B500_IAR_Keil/FreeRTOSConfig.h
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Demo/CORTEX_MB9B500_IAR_Keil/ParTest.c b/FreeRTOS/Demo/CORTEX_MB9B500_IAR_Keil/ParTest.c
index b50b638..95e8b03 100644
--- a/FreeRTOS/Demo/CORTEX_MB9B500_IAR_Keil/ParTest.c
+++ b/FreeRTOS/Demo/CORTEX_MB9B500_IAR_Keil/ParTest.c
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Demo/CORTEX_MB9B500_IAR_Keil/main-full.c b/FreeRTOS/Demo/CORTEX_MB9B500_IAR_Keil/main-full.c
index 9ebf821..10c2359 100644
--- a/FreeRTOS/Demo/CORTEX_MB9B500_IAR_Keil/main-full.c
+++ b/FreeRTOS/Demo/CORTEX_MB9B500_IAR_Keil/main-full.c
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Demo/CORTEX_MB9B500_IAR_Keil/main_blinky.c b/FreeRTOS/Demo/CORTEX_MB9B500_IAR_Keil/main_blinky.c
index 7976ff1..e272617 100644
--- a/FreeRTOS/Demo/CORTEX_MB9B500_IAR_Keil/main_blinky.c
+++ b/FreeRTOS/Demo/CORTEX_MB9B500_IAR_Keil/main_blinky.c
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Demo/CORTEX_MB9B500_IAR_Keil/serial.c b/FreeRTOS/Demo/CORTEX_MB9B500_IAR_Keil/serial.c
index c3e7025..d9cc054 100644
--- a/FreeRTOS/Demo/CORTEX_MB9B500_IAR_Keil/serial.c
+++ b/FreeRTOS/Demo/CORTEX_MB9B500_IAR_Keil/serial.c
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Demo/CORTEX_MPU_LM3Sxxxx_Rowley/FreeRTOSConfig.h b/FreeRTOS/Demo/CORTEX_MPU_LM3Sxxxx_Rowley/FreeRTOSConfig.h
index d6f9902..05d6add 100644
--- a/FreeRTOS/Demo/CORTEX_MPU_LM3Sxxxx_Rowley/FreeRTOSConfig.h
+++ b/FreeRTOS/Demo/CORTEX_MPU_LM3Sxxxx_Rowley/FreeRTOSConfig.h
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Demo/CORTEX_MPU_LM3Sxxxx_Rowley/application_defined_privileged_functions.h b/FreeRTOS/Demo/CORTEX_MPU_LM3Sxxxx_Rowley/application_defined_privileged_functions.h
index d8459a8..1d02f50 100644
--- a/FreeRTOS/Demo/CORTEX_MPU_LM3Sxxxx_Rowley/application_defined_privileged_functions.h
+++ b/FreeRTOS/Demo/CORTEX_MPU_LM3Sxxxx_Rowley/application_defined_privileged_functions.h
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Demo/CORTEX_MPU_LM3Sxxxx_Rowley/main.c b/FreeRTOS/Demo/CORTEX_MPU_LM3Sxxxx_Rowley/main.c
index 5d8ee8a..070b43a 100644
--- a/FreeRTOS/Demo/CORTEX_MPU_LM3Sxxxx_Rowley/main.c
+++ b/FreeRTOS/Demo/CORTEX_MPU_LM3Sxxxx_Rowley/main.c
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Demo/CORTEX_MPU_LPC1768_GCC_RedSuite/src/FreeRTOSConfig.h b/FreeRTOS/Demo/CORTEX_MPU_LPC1768_GCC_RedSuite/src/FreeRTOSConfig.h
index dd2ea9f..883618c 100644
--- a/FreeRTOS/Demo/CORTEX_MPU_LPC1768_GCC_RedSuite/src/FreeRTOSConfig.h
+++ b/FreeRTOS/Demo/CORTEX_MPU_LPC1768_GCC_RedSuite/src/FreeRTOSConfig.h
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Demo/CORTEX_MPU_LPC1768_GCC_RedSuite/src/main.c b/FreeRTOS/Demo/CORTEX_MPU_LPC1768_GCC_RedSuite/src/main.c
index 53695f3..5537082 100644
--- a/FreeRTOS/Demo/CORTEX_MPU_LPC1768_GCC_RedSuite/src/main.c
+++ b/FreeRTOS/Demo/CORTEX_MPU_LPC1768_GCC_RedSuite/src/main.c
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Demo/CORTEX_R4_RM48_TMS570_CCS5/FreeRTOSConfig.h b/FreeRTOS/Demo/CORTEX_R4_RM48_TMS570_CCS5/FreeRTOSConfig.h
index fe6a7a4..569153a 100644
--- a/FreeRTOS/Demo/CORTEX_R4_RM48_TMS570_CCS5/FreeRTOSConfig.h
+++ b/FreeRTOS/Demo/CORTEX_R4_RM48_TMS570_CCS5/FreeRTOSConfig.h
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

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 1db2ba2..fe10d19 100644
--- a/FreeRTOS/Demo/CORTEX_R4_RM48_TMS570_CCS5/Library/het.c
+++ b/FreeRTOS/Demo/CORTEX_R4_RM48_TMS570_CCS5/Library/het.c
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

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 b944fa4..574b168 100644
--- a/FreeRTOS/Demo/CORTEX_R4_RM48_TMS570_CCS5/Library/het.h
+++ b/FreeRTOS/Demo/CORTEX_R4_RM48_TMS570_CCS5/Library/het.h
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Demo/CORTEX_R4_RM48_TMS570_CCS5/ParTest.c b/FreeRTOS/Demo/CORTEX_R4_RM48_TMS570_CCS5/ParTest.c
index 83e42e0..06f0156 100644
--- a/FreeRTOS/Demo/CORTEX_R4_RM48_TMS570_CCS5/ParTest.c
+++ b/FreeRTOS/Demo/CORTEX_R4_RM48_TMS570_CCS5/ParTest.c
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

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 1f7ed7f..73da4e8 100644
--- a/FreeRTOS/Demo/CORTEX_R4_RM48_TMS570_CCS5/flop_hercules.c
+++ b/FreeRTOS/Demo/CORTEX_R4_RM48_TMS570_CCS5/flop_hercules.c
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

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 71fabde..aaeefdc 100644
--- a/FreeRTOS/Demo/CORTEX_R4_RM48_TMS570_CCS5/flop_hercules.h
+++ b/FreeRTOS/Demo/CORTEX_R4_RM48_TMS570_CCS5/flop_hercules.h
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Demo/CORTEX_R4_RM48_TMS570_CCS5/main.c b/FreeRTOS/Demo/CORTEX_R4_RM48_TMS570_CCS5/main.c
index 3e69bee..2602699 100644
--- a/FreeRTOS/Demo/CORTEX_R4_RM48_TMS570_CCS5/main.c
+++ b/FreeRTOS/Demo/CORTEX_R4_RM48_TMS570_CCS5/main.c
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

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 5c7cfdc..47a56d8 100644
--- a/FreeRTOS/Demo/CORTEX_R4_RM48_TMS570_CCS5/main_blinky.c
+++ b/FreeRTOS/Demo/CORTEX_R4_RM48_TMS570_CCS5/main_blinky.c
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

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 420282f..2a0eef0 100644
--- a/FreeRTOS/Demo/CORTEX_R4_RM48_TMS570_CCS5/main_full.c
+++ b/FreeRTOS/Demo/CORTEX_R4_RM48_TMS570_CCS5/main_full.c
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

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 b76c60b..1346810 100644
--- a/FreeRTOS/Demo/CORTEX_R4_RM48_TMS570_CCS5/reg_test.asm
+++ b/FreeRTOS/Demo/CORTEX_R4_RM48_TMS570_CCS5/reg_test.asm
@@ -1,5 +1,5 @@
 ;/*

-;    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+;    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

 ;

 ;

 ;    ***************************************************************************

diff --git a/FreeRTOS/Demo/CORTEX_R4_RM48_TMS570_CCS5/serial.c b/FreeRTOS/Demo/CORTEX_R4_RM48_TMS570_CCS5/serial.c
index 0b286d0..0b9813c 100644
--- a/FreeRTOS/Demo/CORTEX_R4_RM48_TMS570_CCS5/serial.c
+++ b/FreeRTOS/Demo/CORTEX_R4_RM48_TMS570_CCS5/serial.c
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

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 c0706d8..db8f7b4 100644
--- a/FreeRTOS/Demo/CORTEX_STM32F100_Atollic/Simple_Demo_Source/FreeRTOSConfig.h
+++ b/FreeRTOS/Demo/CORTEX_STM32F100_Atollic/Simple_Demo_Source/FreeRTOSConfig.h
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

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 af9a7e3..aa96a02 100644
--- a/FreeRTOS/Demo/CORTEX_STM32F100_Atollic/Simple_Demo_Source/main.c
+++ b/FreeRTOS/Demo/CORTEX_STM32F100_Atollic/Simple_Demo_Source/main.c
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

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 52ab3de..d4f70fe 100644
--- a/FreeRTOS/Demo/CORTEX_STM32F103_GCC_Rowley/Drivers/STM32_USART.c
+++ b/FreeRTOS/Demo/CORTEX_STM32F103_GCC_Rowley/Drivers/STM32_USART.c
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

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 78a1ff8..7fd3de2 100644
--- a/FreeRTOS/Demo/CORTEX_STM32F103_GCC_Rowley/Drivers/STM32_USART.h
+++ b/FreeRTOS/Demo/CORTEX_STM32F103_GCC_Rowley/Drivers/STM32_USART.h
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Demo/CORTEX_STM32F103_GCC_Rowley/FreeRTOSConfig.h b/FreeRTOS/Demo/CORTEX_STM32F103_GCC_Rowley/FreeRTOSConfig.h
index b3bb75f..84c9664 100644
--- a/FreeRTOS/Demo/CORTEX_STM32F103_GCC_Rowley/FreeRTOSConfig.h
+++ b/FreeRTOS/Demo/CORTEX_STM32F103_GCC_Rowley/FreeRTOSConfig.h
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

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 3deb0d4..97a3824 100644
--- a/FreeRTOS/Demo/CORTEX_STM32F103_GCC_Rowley/ParTest/ParTest_MCBSTM32.c
+++ b/FreeRTOS/Demo/CORTEX_STM32F103_GCC_Rowley/ParTest/ParTest_MCBSTM32.c
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

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 08d3f1b..46d6189 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,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Demo/CORTEX_STM32F103_GCC_Rowley/main.c b/FreeRTOS/Demo/CORTEX_STM32F103_GCC_Rowley/main.c
index 49f58f3..44f5114 100644
--- a/FreeRTOS/Demo/CORTEX_STM32F103_GCC_Rowley/main.c
+++ b/FreeRTOS/Demo/CORTEX_STM32F103_GCC_Rowley/main.c
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Demo/CORTEX_STM32F103_IAR/FreeRTOSConfig.h b/FreeRTOS/Demo/CORTEX_STM32F103_IAR/FreeRTOSConfig.h
index d5c7b19..44019fe 100644
--- a/FreeRTOS/Demo/CORTEX_STM32F103_IAR/FreeRTOSConfig.h
+++ b/FreeRTOS/Demo/CORTEX_STM32F103_IAR/FreeRTOSConfig.h
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Demo/CORTEX_STM32F103_IAR/ParTest/ParTest.c b/FreeRTOS/Demo/CORTEX_STM32F103_IAR/ParTest/ParTest.c
index 08d3f1b..46d6189 100644
--- a/FreeRTOS/Demo/CORTEX_STM32F103_IAR/ParTest/ParTest.c
+++ b/FreeRTOS/Demo/CORTEX_STM32F103_IAR/ParTest/ParTest.c
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Demo/CORTEX_STM32F103_IAR/main.c b/FreeRTOS/Demo/CORTEX_STM32F103_IAR/main.c
index 0fa27fe..66fd35f 100644
--- a/FreeRTOS/Demo/CORTEX_STM32F103_IAR/main.c
+++ b/FreeRTOS/Demo/CORTEX_STM32F103_IAR/main.c
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Demo/CORTEX_STM32F103_IAR/serial/serial.c b/FreeRTOS/Demo/CORTEX_STM32F103_IAR/serial/serial.c
index a6a3c04..a6213f5 100644
--- a/FreeRTOS/Demo/CORTEX_STM32F103_IAR/serial/serial.c
+++ b/FreeRTOS/Demo/CORTEX_STM32F103_IAR/serial/serial.c
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Demo/CORTEX_STM32F103_IAR/timertest.c b/FreeRTOS/Demo/CORTEX_STM32F103_IAR/timertest.c
index c3e4b3e..5397e5e 100644
--- a/FreeRTOS/Demo/CORTEX_STM32F103_IAR/timertest.c
+++ b/FreeRTOS/Demo/CORTEX_STM32F103_IAR/timertest.c
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Demo/CORTEX_STM32F103_Keil/FreeRTOSConfig.h b/FreeRTOS/Demo/CORTEX_STM32F103_Keil/FreeRTOSConfig.h
index d5c7b19..44019fe 100644
--- a/FreeRTOS/Demo/CORTEX_STM32F103_Keil/FreeRTOSConfig.h
+++ b/FreeRTOS/Demo/CORTEX_STM32F103_Keil/FreeRTOSConfig.h
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Demo/CORTEX_STM32F103_Keil/ParTest/ParTest.c b/FreeRTOS/Demo/CORTEX_STM32F103_Keil/ParTest/ParTest.c
index 08d3f1b..46d6189 100644
--- a/FreeRTOS/Demo/CORTEX_STM32F103_Keil/ParTest/ParTest.c
+++ b/FreeRTOS/Demo/CORTEX_STM32F103_Keil/ParTest/ParTest.c
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Demo/CORTEX_STM32F103_Keil/main.c b/FreeRTOS/Demo/CORTEX_STM32F103_Keil/main.c
index 0fa27fe..66fd35f 100644
--- a/FreeRTOS/Demo/CORTEX_STM32F103_Keil/main.c
+++ b/FreeRTOS/Demo/CORTEX_STM32F103_Keil/main.c
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Demo/CORTEX_STM32F103_Keil/serial/serial.c b/FreeRTOS/Demo/CORTEX_STM32F103_Keil/serial/serial.c
index a6a3c04..a6213f5 100644
--- a/FreeRTOS/Demo/CORTEX_STM32F103_Keil/serial/serial.c
+++ b/FreeRTOS/Demo/CORTEX_STM32F103_Keil/serial/serial.c
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Demo/CORTEX_STM32F103_Keil/timertest.c b/FreeRTOS/Demo/CORTEX_STM32F103_Keil/timertest.c
index c3e4b3e..5397e5e 100644
--- a/FreeRTOS/Demo/CORTEX_STM32F103_Keil/timertest.c
+++ b/FreeRTOS/Demo/CORTEX_STM32F103_Keil/timertest.c
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Demo/CORTEX_STM32F103_Primer_GCC/FreeRTOSConfig.h b/FreeRTOS/Demo/CORTEX_STM32F103_Primer_GCC/FreeRTOSConfig.h
index 8004c41..6a39f92 100644
--- a/FreeRTOS/Demo/CORTEX_STM32F103_Primer_GCC/FreeRTOSConfig.h
+++ b/FreeRTOS/Demo/CORTEX_STM32F103_Primer_GCC/FreeRTOSConfig.h
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Demo/CORTEX_STM32F103_Primer_GCC/ParTest/ParTest.c b/FreeRTOS/Demo/CORTEX_STM32F103_Primer_GCC/ParTest/ParTest.c
index 9efef21..7d0ebba 100644
--- a/FreeRTOS/Demo/CORTEX_STM32F103_Primer_GCC/ParTest/ParTest.c
+++ b/FreeRTOS/Demo/CORTEX_STM32F103_Primer_GCC/ParTest/ParTest.c
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Demo/CORTEX_STM32F103_Primer_GCC/bitmap.h b/FreeRTOS/Demo/CORTEX_STM32F103_Primer_GCC/bitmap.h
index 441c2ef..12bedd9 100644
--- a/FreeRTOS/Demo/CORTEX_STM32F103_Primer_GCC/bitmap.h
+++ b/FreeRTOS/Demo/CORTEX_STM32F103_Primer_GCC/bitmap.h
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Demo/CORTEX_STM32F103_Primer_GCC/main.c b/FreeRTOS/Demo/CORTEX_STM32F103_Primer_GCC/main.c
index 973bde3..e1bb3dd 100644
--- a/FreeRTOS/Demo/CORTEX_STM32F103_Primer_GCC/main.c
+++ b/FreeRTOS/Demo/CORTEX_STM32F103_Primer_GCC/main.c
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Demo/CORTEX_STM32F103_Primer_GCC/timertest.c b/FreeRTOS/Demo/CORTEX_STM32F103_Primer_GCC/timertest.c
index c3e4b3e..5397e5e 100644
--- a/FreeRTOS/Demo/CORTEX_STM32F103_Primer_GCC/timertest.c
+++ b/FreeRTOS/Demo/CORTEX_STM32F103_Primer_GCC/timertest.c
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Demo/CORTEX_STM32F107_GCC_Rowley/FreeRTOSConfig.h b/FreeRTOS/Demo/CORTEX_STM32F107_GCC_Rowley/FreeRTOSConfig.h
index e3d63b0..9d33a44 100644
--- a/FreeRTOS/Demo/CORTEX_STM32F107_GCC_Rowley/FreeRTOSConfig.h
+++ b/FreeRTOS/Demo/CORTEX_STM32F107_GCC_Rowley/FreeRTOSConfig.h
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Demo/CORTEX_STM32F107_GCC_Rowley/ParTest/ParTest.c b/FreeRTOS/Demo/CORTEX_STM32F107_GCC_Rowley/ParTest/ParTest.c
index 0ecf9a0..9bc7026 100644
--- a/FreeRTOS/Demo/CORTEX_STM32F107_GCC_Rowley/ParTest/ParTest.c
+++ b/FreeRTOS/Demo/CORTEX_STM32F107_GCC_Rowley/ParTest/ParTest.c
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Demo/CORTEX_STM32F107_GCC_Rowley/main.c b/FreeRTOS/Demo/CORTEX_STM32F107_GCC_Rowley/main.c
index eadd066..7e67f67 100644
--- a/FreeRTOS/Demo/CORTEX_STM32F107_GCC_Rowley/main.c
+++ b/FreeRTOS/Demo/CORTEX_STM32F107_GCC_Rowley/main.c
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Demo/CORTEX_STM32F107_GCC_Rowley/timertest.c b/FreeRTOS/Demo/CORTEX_STM32F107_GCC_Rowley/timertest.c
index 794061a..327af03 100644
--- a/FreeRTOS/Demo/CORTEX_STM32F107_GCC_Rowley/timertest.c
+++ b/FreeRTOS/Demo/CORTEX_STM32F107_GCC_Rowley/timertest.c
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Demo/CORTEX_STM32F107_GCC_Rowley/webserver/emac.c b/FreeRTOS/Demo/CORTEX_STM32F107_GCC_Rowley/webserver/emac.c
index 650d1a0..479cc1b 100644
--- a/FreeRTOS/Demo/CORTEX_STM32F107_GCC_Rowley/webserver/emac.c
+++ b/FreeRTOS/Demo/CORTEX_STM32F107_GCC_Rowley/webserver/emac.c
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Demo/CORTEX_STM32F107_GCC_Rowley/webserver/emac.h b/FreeRTOS/Demo/CORTEX_STM32F107_GCC_Rowley/webserver/emac.h
index 02a0aff..19a0351 100644
--- a/FreeRTOS/Demo/CORTEX_STM32F107_GCC_Rowley/webserver/emac.h
+++ b/FreeRTOS/Demo/CORTEX_STM32F107_GCC_Rowley/webserver/emac.h
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

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 489b919..bf8bf52 100644
--- a/FreeRTOS/Demo/CORTEX_STM32F107_GCC_Rowley/webserver/uIP_Task.c
+++ b/FreeRTOS/Demo/CORTEX_STM32F107_GCC_Rowley/webserver/uIP_Task.c
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

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 761021c..4e1c319 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,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Demo/CORTEX_STM32L152_Discovery_IAR/include/FreeRTOSConfig.h b/FreeRTOS/Demo/CORTEX_STM32L152_Discovery_IAR/include/FreeRTOSConfig.h
index a91a227..393746c 100644
--- a/FreeRTOS/Demo/CORTEX_STM32L152_Discovery_IAR/include/FreeRTOSConfig.h
+++ b/FreeRTOS/Demo/CORTEX_STM32L152_Discovery_IAR/include/FreeRTOSConfig.h
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Demo/CORTEX_STM32L152_Discovery_IAR/main.c b/FreeRTOS/Demo/CORTEX_STM32L152_Discovery_IAR/main.c
index 8d1620d..5709ccd 100644
--- a/FreeRTOS/Demo/CORTEX_STM32L152_Discovery_IAR/main.c
+++ b/FreeRTOS/Demo/CORTEX_STM32L152_Discovery_IAR/main.c
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Demo/CORTEX_STM32L152_Discovery_IAR/main_full.c b/FreeRTOS/Demo/CORTEX_STM32L152_Discovery_IAR/main_full.c
index a351251..172f724 100644
--- a/FreeRTOS/Demo/CORTEX_STM32L152_Discovery_IAR/main_full.c
+++ b/FreeRTOS/Demo/CORTEX_STM32L152_Discovery_IAR/main_full.c
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

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 81dd57b..cbbf179 100644
--- a/FreeRTOS/Demo/CORTEX_STM32L152_Discovery_IAR/main_low_power.c
+++ b/FreeRTOS/Demo/CORTEX_STM32L152_Discovery_IAR/main_low_power.c
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Demo/CORTEX_STM32L152_IAR/FreeRTOSConfig.h b/FreeRTOS/Demo/CORTEX_STM32L152_IAR/FreeRTOSConfig.h
index c51cad5..46ca133e 100644
--- a/FreeRTOS/Demo/CORTEX_STM32L152_IAR/FreeRTOSConfig.h
+++ b/FreeRTOS/Demo/CORTEX_STM32L152_IAR/FreeRTOSConfig.h
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Demo/CORTEX_STM32L152_IAR/ParTest.c b/FreeRTOS/Demo/CORTEX_STM32L152_IAR/ParTest.c
index c5ec20b..8a354b9 100644
--- a/FreeRTOS/Demo/CORTEX_STM32L152_IAR/ParTest.c
+++ b/FreeRTOS/Demo/CORTEX_STM32L152_IAR/ParTest.c
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Demo/CORTEX_STM32L152_IAR/main.c b/FreeRTOS/Demo/CORTEX_STM32L152_IAR/main.c
index 47ea46e..a8c31a0 100644
--- a/FreeRTOS/Demo/CORTEX_STM32L152_IAR/main.c
+++ b/FreeRTOS/Demo/CORTEX_STM32L152_IAR/main.c
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Demo/CORTEX_STM32L152_IAR/serial.c b/FreeRTOS/Demo/CORTEX_STM32L152_IAR/serial.c
index 16e4241..09a17c0 100644
--- a/FreeRTOS/Demo/CORTEX_STM32L152_IAR/serial.c
+++ b/FreeRTOS/Demo/CORTEX_STM32L152_IAR/serial.c
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Demo/CORTEX_SmartFusion2_M2S050_SoftConsole/RTOSDemo/Blinky-Demo/main_blinky.c b/FreeRTOS/Demo/CORTEX_SmartFusion2_M2S050_SoftConsole/RTOSDemo/Blinky-Demo/main_blinky.c
index 3503c93..8fa3935 100644
--- a/FreeRTOS/Demo/CORTEX_SmartFusion2_M2S050_SoftConsole/RTOSDemo/Blinky-Demo/main_blinky.c
+++ b/FreeRTOS/Demo/CORTEX_SmartFusion2_M2S050_SoftConsole/RTOSDemo/Blinky-Demo/main_blinky.c
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Demo/CORTEX_SmartFusion2_M2S050_SoftConsole/RTOSDemo/FreeRTOSConfig.h b/FreeRTOS/Demo/CORTEX_SmartFusion2_M2S050_SoftConsole/RTOSDemo/FreeRTOSConfig.h
index ea13217..62d71b8 100644
--- a/FreeRTOS/Demo/CORTEX_SmartFusion2_M2S050_SoftConsole/RTOSDemo/FreeRTOSConfig.h
+++ b/FreeRTOS/Demo/CORTEX_SmartFusion2_M2S050_SoftConsole/RTOSDemo/FreeRTOSConfig.h
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Demo/CORTEX_SmartFusion2_M2S050_SoftConsole/RTOSDemo/Full-Demo/File-releated-CLI-commands.c b/FreeRTOS/Demo/CORTEX_SmartFusion2_M2S050_SoftConsole/RTOSDemo/Full-Demo/File-releated-CLI-commands.c
index 7d52867..658709c 100644
--- a/FreeRTOS/Demo/CORTEX_SmartFusion2_M2S050_SoftConsole/RTOSDemo/Full-Demo/File-releated-CLI-commands.c
+++ b/FreeRTOS/Demo/CORTEX_SmartFusion2_M2S050_SoftConsole/RTOSDemo/Full-Demo/File-releated-CLI-commands.c
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Demo/CORTEX_SmartFusion2_M2S050_SoftConsole/RTOSDemo/Full-Demo/File-system-demo.c b/FreeRTOS/Demo/CORTEX_SmartFusion2_M2S050_SoftConsole/RTOSDemo/Full-Demo/File-system-demo.c
index 4321430..83f680e 100644
--- a/FreeRTOS/Demo/CORTEX_SmartFusion2_M2S050_SoftConsole/RTOSDemo/Full-Demo/File-system-demo.c
+++ b/FreeRTOS/Demo/CORTEX_SmartFusion2_M2S050_SoftConsole/RTOSDemo/Full-Demo/File-system-demo.c
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Demo/CORTEX_SmartFusion2_M2S050_SoftConsole/RTOSDemo/Full-Demo/Sample-CLI-commands.c b/FreeRTOS/Demo/CORTEX_SmartFusion2_M2S050_SoftConsole/RTOSDemo/Full-Demo/Sample-CLI-commands.c
index a57505b..2df4623 100644
--- a/FreeRTOS/Demo/CORTEX_SmartFusion2_M2S050_SoftConsole/RTOSDemo/Full-Demo/Sample-CLI-commands.c
+++ b/FreeRTOS/Demo/CORTEX_SmartFusion2_M2S050_SoftConsole/RTOSDemo/Full-Demo/Sample-CLI-commands.c
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Demo/CORTEX_SmartFusion2_M2S050_SoftConsole/RTOSDemo/Full-Demo/UARTCommandConsole.c b/FreeRTOS/Demo/CORTEX_SmartFusion2_M2S050_SoftConsole/RTOSDemo/Full-Demo/UARTCommandConsole.c
index ac80734..7848c9b 100644
--- a/FreeRTOS/Demo/CORTEX_SmartFusion2_M2S050_SoftConsole/RTOSDemo/Full-Demo/UARTCommandConsole.c
+++ b/FreeRTOS/Demo/CORTEX_SmartFusion2_M2S050_SoftConsole/RTOSDemo/Full-Demo/UARTCommandConsole.c
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Demo/CORTEX_SmartFusion2_M2S050_SoftConsole/RTOSDemo/Full-Demo/UARTCommandConsole.h b/FreeRTOS/Demo/CORTEX_SmartFusion2_M2S050_SoftConsole/RTOSDemo/Full-Demo/UARTCommandConsole.h
index 710f89e..ec34ed6 100644
--- a/FreeRTOS/Demo/CORTEX_SmartFusion2_M2S050_SoftConsole/RTOSDemo/Full-Demo/UARTCommandConsole.h
+++ b/FreeRTOS/Demo/CORTEX_SmartFusion2_M2S050_SoftConsole/RTOSDemo/Full-Demo/UARTCommandConsole.h
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Demo/CORTEX_SmartFusion2_M2S050_SoftConsole/RTOSDemo/Full-Demo/main_full.c b/FreeRTOS/Demo/CORTEX_SmartFusion2_M2S050_SoftConsole/RTOSDemo/Full-Demo/main_full.c
index cebbe42..b190cc3 100644
--- a/FreeRTOS/Demo/CORTEX_SmartFusion2_M2S050_SoftConsole/RTOSDemo/Full-Demo/main_full.c
+++ b/FreeRTOS/Demo/CORTEX_SmartFusion2_M2S050_SoftConsole/RTOSDemo/Full-Demo/main_full.c
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Demo/CORTEX_SmartFusion2_M2S050_SoftConsole/RTOSDemo/ParTest.c b/FreeRTOS/Demo/CORTEX_SmartFusion2_M2S050_SoftConsole/RTOSDemo/ParTest.c
index f13d00f..fdf6570 100644
--- a/FreeRTOS/Demo/CORTEX_SmartFusion2_M2S050_SoftConsole/RTOSDemo/ParTest.c
+++ b/FreeRTOS/Demo/CORTEX_SmartFusion2_M2S050_SoftConsole/RTOSDemo/ParTest.c
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Demo/CORTEX_SmartFusion2_M2S050_SoftConsole/RTOSDemo/RunTimeStatsTimer.c b/FreeRTOS/Demo/CORTEX_SmartFusion2_M2S050_SoftConsole/RTOSDemo/RunTimeStatsTimer.c
index 8e87beb..fd8a7f0 100644
--- a/FreeRTOS/Demo/CORTEX_SmartFusion2_M2S050_SoftConsole/RTOSDemo/RunTimeStatsTimer.c
+++ b/FreeRTOS/Demo/CORTEX_SmartFusion2_M2S050_SoftConsole/RTOSDemo/RunTimeStatsTimer.c
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Demo/CORTEX_SmartFusion2_M2S050_SoftConsole/RTOSDemo/main.c b/FreeRTOS/Demo/CORTEX_SmartFusion2_M2S050_SoftConsole/RTOSDemo/main.c
index e5f7cbc..1310a7b 100644
--- a/FreeRTOS/Demo/CORTEX_SmartFusion2_M2S050_SoftConsole/RTOSDemo/main.c
+++ b/FreeRTOS/Demo/CORTEX_SmartFusion2_M2S050_SoftConsole/RTOSDemo/main.c
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Demo/CORTUS_APS3_GCC/Demo/7seg.c b/FreeRTOS/Demo/CORTUS_APS3_GCC/Demo/7seg.c
index 3ab34e4..9319f0c 100644
--- a/FreeRTOS/Demo/CORTUS_APS3_GCC/Demo/7seg.c
+++ b/FreeRTOS/Demo/CORTUS_APS3_GCC/Demo/7seg.c
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Demo/CORTUS_APS3_GCC/Demo/7seg.h b/FreeRTOS/Demo/CORTUS_APS3_GCC/Demo/7seg.h
index a64679f..ba4543e 100644
--- a/FreeRTOS/Demo/CORTUS_APS3_GCC/Demo/7seg.h
+++ b/FreeRTOS/Demo/CORTUS_APS3_GCC/Demo/7seg.h
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Demo/CORTUS_APS3_GCC/Demo/FreeRTOSConfig.h b/FreeRTOS/Demo/CORTUS_APS3_GCC/Demo/FreeRTOSConfig.h
index fa51899..004689c 100644
--- a/FreeRTOS/Demo/CORTUS_APS3_GCC/Demo/FreeRTOSConfig.h
+++ b/FreeRTOS/Demo/CORTUS_APS3_GCC/Demo/FreeRTOSConfig.h
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Demo/CORTUS_APS3_GCC/Demo/ParTest.c b/FreeRTOS/Demo/CORTUS_APS3_GCC/Demo/ParTest.c
index cbbd470..423a1df 100644
--- a/FreeRTOS/Demo/CORTUS_APS3_GCC/Demo/ParTest.c
+++ b/FreeRTOS/Demo/CORTUS_APS3_GCC/Demo/ParTest.c
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Demo/CORTUS_APS3_GCC/Demo/RegTest.c b/FreeRTOS/Demo/CORTUS_APS3_GCC/Demo/RegTest.c
index b036c3e..1b924ce 100644
--- a/FreeRTOS/Demo/CORTUS_APS3_GCC/Demo/RegTest.c
+++ b/FreeRTOS/Demo/CORTUS_APS3_GCC/Demo/RegTest.c
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Demo/CORTUS_APS3_GCC/Demo/RegTest.h b/FreeRTOS/Demo/CORTUS_APS3_GCC/Demo/RegTest.h
index 5974695..0e20b10 100644
--- a/FreeRTOS/Demo/CORTUS_APS3_GCC/Demo/RegTest.h
+++ b/FreeRTOS/Demo/CORTUS_APS3_GCC/Demo/RegTest.h
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Demo/CORTUS_APS3_GCC/Demo/demoGpio.h b/FreeRTOS/Demo/CORTUS_APS3_GCC/Demo/demoGpio.h
index 165eed6..26e181c 100644
--- a/FreeRTOS/Demo/CORTUS_APS3_GCC/Demo/demoGpio.h
+++ b/FreeRTOS/Demo/CORTUS_APS3_GCC/Demo/demoGpio.h
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Demo/CORTUS_APS3_GCC/Demo/main.c b/FreeRTOS/Demo/CORTUS_APS3_GCC/Demo/main.c
index b576293..463f5b9 100644
--- a/FreeRTOS/Demo/CORTUS_APS3_GCC/Demo/main.c
+++ b/FreeRTOS/Demo/CORTUS_APS3_GCC/Demo/main.c
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Demo/CORTUS_APS3_GCC/Demo/serial.c b/FreeRTOS/Demo/CORTUS_APS3_GCC/Demo/serial.c
index 288ddca..195825a 100644
--- a/FreeRTOS/Demo/CORTUS_APS3_GCC/Demo/serial.c
+++ b/FreeRTOS/Demo/CORTUS_APS3_GCC/Demo/serial.c
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Demo/ColdFire_MCF51CN128_CodeWarrior/Sources/FreeRTOSConfig.h b/FreeRTOS/Demo/ColdFire_MCF51CN128_CodeWarrior/Sources/FreeRTOSConfig.h
index ced48dd..f180f6e 100644
--- a/FreeRTOS/Demo/ColdFire_MCF51CN128_CodeWarrior/Sources/FreeRTOSConfig.h
+++ b/FreeRTOS/Demo/ColdFire_MCF51CN128_CodeWarrior/Sources/FreeRTOSConfig.h
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Demo/ColdFire_MCF51CN128_CodeWarrior/Sources/ParTest/ParTest.c b/FreeRTOS/Demo/ColdFire_MCF51CN128_CodeWarrior/Sources/ParTest/ParTest.c
index e9db9a2..b82dae8 100644
--- a/FreeRTOS/Demo/ColdFire_MCF51CN128_CodeWarrior/Sources/ParTest/ParTest.c
+++ b/FreeRTOS/Demo/ColdFire_MCF51CN128_CodeWarrior/Sources/ParTest/ParTest.c
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

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 0f9768f..3f0e9d1 100644
--- a/FreeRTOS/Demo/ColdFire_MCF51CN128_CodeWarrior/Sources/httpd/uIP_Task.c
+++ b/FreeRTOS/Demo/ColdFire_MCF51CN128_CodeWarrior/Sources/httpd/uIP_Task.c
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Demo/ColdFire_MCF51CN128_CodeWarrior/Sources/main.c b/FreeRTOS/Demo/ColdFire_MCF51CN128_CodeWarrior/Sources/main.c
index 858884b..44cbbd8 100644
--- a/FreeRTOS/Demo/ColdFire_MCF51CN128_CodeWarrior/Sources/main.c
+++ b/FreeRTOS/Demo/ColdFire_MCF51CN128_CodeWarrior/Sources/main.c
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Demo/ColdFire_MCF52221_CodeWarrior/sources/FreeRTOSConfig.h b/FreeRTOS/Demo/ColdFire_MCF52221_CodeWarrior/sources/FreeRTOSConfig.h
index 6d639d6..21922b6 100644
--- a/FreeRTOS/Demo/ColdFire_MCF52221_CodeWarrior/sources/FreeRTOSConfig.h
+++ b/FreeRTOS/Demo/ColdFire_MCF52221_CodeWarrior/sources/FreeRTOSConfig.h
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

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 85cf223..b5302e6 100644
--- a/FreeRTOS/Demo/ColdFire_MCF52221_CodeWarrior/sources/FreeRTOS_Tick_Setup.c
+++ b/FreeRTOS/Demo/ColdFire_MCF52221_CodeWarrior/sources/FreeRTOS_Tick_Setup.c
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Demo/ColdFire_MCF52221_CodeWarrior/sources/ParTest/ParTest.c b/FreeRTOS/Demo/ColdFire_MCF52221_CodeWarrior/sources/ParTest/ParTest.c
index 15b29c5..243b7bc 100644
--- a/FreeRTOS/Demo/ColdFire_MCF52221_CodeWarrior/sources/ParTest/ParTest.c
+++ b/FreeRTOS/Demo/ColdFire_MCF52221_CodeWarrior/sources/ParTest/ParTest.c
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Demo/ColdFire_MCF52221_CodeWarrior/sources/main.c b/FreeRTOS/Demo/ColdFire_MCF52221_CodeWarrior/sources/main.c
index 96aee6d..86cc426 100644
--- a/FreeRTOS/Demo/ColdFire_MCF52221_CodeWarrior/sources/main.c
+++ b/FreeRTOS/Demo/ColdFire_MCF52221_CodeWarrior/sources/main.c
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Demo/ColdFire_MCF52221_CodeWarrior/sources/serial/serial.c b/FreeRTOS/Demo/ColdFire_MCF52221_CodeWarrior/sources/serial/serial.c
index a1f143d..a03684a 100644
--- a/FreeRTOS/Demo/ColdFire_MCF52221_CodeWarrior/sources/serial/serial.c
+++ b/FreeRTOS/Demo/ColdFire_MCF52221_CodeWarrior/sources/serial/serial.c
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Demo/ColdFire_MCF52259_CodeWarrior/FreeRTOSConfig.h b/FreeRTOS/Demo/ColdFire_MCF52259_CodeWarrior/FreeRTOSConfig.h
index 3835100..2aa7079 100644
--- a/FreeRTOS/Demo/ColdFire_MCF52259_CodeWarrior/FreeRTOSConfig.h
+++ b/FreeRTOS/Demo/ColdFire_MCF52259_CodeWarrior/FreeRTOSConfig.h
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Demo/ColdFire_MCF52259_CodeWarrior/FreeRTOS_Tick_Setup.c b/FreeRTOS/Demo/ColdFire_MCF52259_CodeWarrior/FreeRTOS_Tick_Setup.c
index f01e532..aec5b74 100644
--- a/FreeRTOS/Demo/ColdFire_MCF52259_CodeWarrior/FreeRTOS_Tick_Setup.c
+++ b/FreeRTOS/Demo/ColdFire_MCF52259_CodeWarrior/FreeRTOS_Tick_Setup.c
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Demo/ColdFire_MCF52259_CodeWarrior/HTTPDemo.c b/FreeRTOS/Demo/ColdFire_MCF52259_CodeWarrior/HTTPDemo.c
index 73223c5..fef74be 100644
--- a/FreeRTOS/Demo/ColdFire_MCF52259_CodeWarrior/HTTPDemo.c
+++ b/FreeRTOS/Demo/ColdFire_MCF52259_CodeWarrior/HTTPDemo.c
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Demo/ColdFire_MCF52259_CodeWarrior/HTTPDemo.h b/FreeRTOS/Demo/ColdFire_MCF52259_CodeWarrior/HTTPDemo.h
index ca630ec..e1c9ee5 100644
--- a/FreeRTOS/Demo/ColdFire_MCF52259_CodeWarrior/HTTPDemo.h
+++ b/FreeRTOS/Demo/ColdFire_MCF52259_CodeWarrior/HTTPDemo.h
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Demo/ColdFire_MCF52259_CodeWarrior/ParTest/ParTest.c b/FreeRTOS/Demo/ColdFire_MCF52259_CodeWarrior/ParTest/ParTest.c
index 15b29c5..243b7bc 100644
--- a/FreeRTOS/Demo/ColdFire_MCF52259_CodeWarrior/ParTest/ParTest.c
+++ b/FreeRTOS/Demo/ColdFire_MCF52259_CodeWarrior/ParTest/ParTest.c
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Demo/ColdFire_MCF52259_CodeWarrior/main.c b/FreeRTOS/Demo/ColdFire_MCF52259_CodeWarrior/main.c
index 932df0f..3a4d94c 100644
--- a/FreeRTOS/Demo/ColdFire_MCF52259_CodeWarrior/main.c
+++ b/FreeRTOS/Demo/ColdFire_MCF52259_CodeWarrior/main.c
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Demo/ColdFire_MCF5282_Eclipse/RTOSDemo/FreeRTOSConfig.h b/FreeRTOS/Demo/ColdFire_MCF5282_Eclipse/RTOSDemo/FreeRTOSConfig.h
index 4682fb0..24554a3 100644
--- a/FreeRTOS/Demo/ColdFire_MCF5282_Eclipse/RTOSDemo/FreeRTOSConfig.h
+++ b/FreeRTOS/Demo/ColdFire_MCF5282_Eclipse/RTOSDemo/FreeRTOSConfig.h
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Demo/ColdFire_MCF5282_Eclipse/RTOSDemo/FreeRTOS_Tick_Setup.c b/FreeRTOS/Demo/ColdFire_MCF5282_Eclipse/RTOSDemo/FreeRTOS_Tick_Setup.c
index fcb1963..bcc56ee 100644
--- a/FreeRTOS/Demo/ColdFire_MCF5282_Eclipse/RTOSDemo/FreeRTOS_Tick_Setup.c
+++ b/FreeRTOS/Demo/ColdFire_MCF5282_Eclipse/RTOSDemo/FreeRTOS_Tick_Setup.c
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Demo/ColdFire_MCF5282_Eclipse/RTOSDemo/IntQueueTimer.c b/FreeRTOS/Demo/ColdFire_MCF5282_Eclipse/RTOSDemo/IntQueueTimer.c
index def60cf..7657a43 100644
--- a/FreeRTOS/Demo/ColdFire_MCF5282_Eclipse/RTOSDemo/IntQueueTimer.c
+++ b/FreeRTOS/Demo/ColdFire_MCF5282_Eclipse/RTOSDemo/IntQueueTimer.c
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Demo/ColdFire_MCF5282_Eclipse/RTOSDemo/IntQueueTimer.h b/FreeRTOS/Demo/ColdFire_MCF5282_Eclipse/RTOSDemo/IntQueueTimer.h
index 77de772..fcf9f8c 100644
--- a/FreeRTOS/Demo/ColdFire_MCF5282_Eclipse/RTOSDemo/IntQueueTimer.h
+++ b/FreeRTOS/Demo/ColdFire_MCF5282_Eclipse/RTOSDemo/IntQueueTimer.h
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Demo/ColdFire_MCF5282_Eclipse/RTOSDemo/ParTest/ParTest.c b/FreeRTOS/Demo/ColdFire_MCF5282_Eclipse/RTOSDemo/ParTest/ParTest.c
index 57413eb..1537839 100644
--- a/FreeRTOS/Demo/ColdFire_MCF5282_Eclipse/RTOSDemo/ParTest/ParTest.c
+++ b/FreeRTOS/Demo/ColdFire_MCF5282_Eclipse/RTOSDemo/ParTest/ParTest.c
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Demo/ColdFire_MCF5282_Eclipse/RTOSDemo/main.c b/FreeRTOS/Demo/ColdFire_MCF5282_Eclipse/RTOSDemo/main.c
index 5066d3b..c502cfd 100644
--- a/FreeRTOS/Demo/ColdFire_MCF5282_Eclipse/RTOSDemo/main.c
+++ b/FreeRTOS/Demo/ColdFire_MCF5282_Eclipse/RTOSDemo/main.c
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Demo/ColdFire_MCF5282_Eclipse/RTOSDemo/serial/serial.c b/FreeRTOS/Demo/ColdFire_MCF5282_Eclipse/RTOSDemo/serial/serial.c
index becd165..ecd4af0 100644
--- a/FreeRTOS/Demo/ColdFire_MCF5282_Eclipse/RTOSDemo/serial/serial.c
+++ b/FreeRTOS/Demo/ColdFire_MCF5282_Eclipse/RTOSDemo/serial/serial.c
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Demo/Common/Full/BlockQ.c b/FreeRTOS/Demo/Common/Full/BlockQ.c
index e25c375..bcd8075 100644
--- a/FreeRTOS/Demo/Common/Full/BlockQ.c
+++ b/FreeRTOS/Demo/Common/Full/BlockQ.c
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Demo/Common/Full/PollQ.c b/FreeRTOS/Demo/Common/Full/PollQ.c
index 3c14d94..99b05ce 100644
--- a/FreeRTOS/Demo/Common/Full/PollQ.c
+++ b/FreeRTOS/Demo/Common/Full/PollQ.c
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Demo/Common/Full/comtest.c b/FreeRTOS/Demo/Common/Full/comtest.c
index 9a7b159..9ac2e42 100644
--- a/FreeRTOS/Demo/Common/Full/comtest.c
+++ b/FreeRTOS/Demo/Common/Full/comtest.c
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Demo/Common/Full/death.c b/FreeRTOS/Demo/Common/Full/death.c
index 7fb4469..94d4f6d 100644
--- a/FreeRTOS/Demo/Common/Full/death.c
+++ b/FreeRTOS/Demo/Common/Full/death.c
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Demo/Common/Full/dynamic.c b/FreeRTOS/Demo/Common/Full/dynamic.c
index 5d0cc86..a52392b 100644
--- a/FreeRTOS/Demo/Common/Full/dynamic.c
+++ b/FreeRTOS/Demo/Common/Full/dynamic.c
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Demo/Common/Full/events.c b/FreeRTOS/Demo/Common/Full/events.c
index 42ba9c8..807ae53 100644
--- a/FreeRTOS/Demo/Common/Full/events.c
+++ b/FreeRTOS/Demo/Common/Full/events.c
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Demo/Common/Full/flash.c b/FreeRTOS/Demo/Common/Full/flash.c
index 1b75b83..087429d 100644
--- a/FreeRTOS/Demo/Common/Full/flash.c
+++ b/FreeRTOS/Demo/Common/Full/flash.c
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Demo/Common/Full/flop.c b/FreeRTOS/Demo/Common/Full/flop.c
index 0936ee5..e714a40 100644
--- a/FreeRTOS/Demo/Common/Full/flop.c
+++ b/FreeRTOS/Demo/Common/Full/flop.c
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Demo/Common/Full/integer.c b/FreeRTOS/Demo/Common/Full/integer.c
index 21410ea..4b2da6e 100644
--- a/FreeRTOS/Demo/Common/Full/integer.c
+++ b/FreeRTOS/Demo/Common/Full/integer.c
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Demo/Common/Full/print.c b/FreeRTOS/Demo/Common/Full/print.c
index b4433a5..16f8920 100644
--- a/FreeRTOS/Demo/Common/Full/print.c
+++ b/FreeRTOS/Demo/Common/Full/print.c
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Demo/Common/Full/semtest.c b/FreeRTOS/Demo/Common/Full/semtest.c
index 9397f85..bcd1e9a 100644
--- a/FreeRTOS/Demo/Common/Full/semtest.c
+++ b/FreeRTOS/Demo/Common/Full/semtest.c
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Demo/Common/Minimal/AltBlckQ.c b/FreeRTOS/Demo/Common/Minimal/AltBlckQ.c
index 6b4e7e4..4531cf0 100644
--- a/FreeRTOS/Demo/Common/Minimal/AltBlckQ.c
+++ b/FreeRTOS/Demo/Common/Minimal/AltBlckQ.c
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Demo/Common/Minimal/AltBlock.c b/FreeRTOS/Demo/Common/Minimal/AltBlock.c
index e5783b3..fd3ec72 100644
--- a/FreeRTOS/Demo/Common/Minimal/AltBlock.c
+++ b/FreeRTOS/Demo/Common/Minimal/AltBlock.c
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Demo/Common/Minimal/AltPollQ.c b/FreeRTOS/Demo/Common/Minimal/AltPollQ.c
index 0dbaf63..b9089b3 100644
--- a/FreeRTOS/Demo/Common/Minimal/AltPollQ.c
+++ b/FreeRTOS/Demo/Common/Minimal/AltPollQ.c
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Demo/Common/Minimal/AltQTest.c b/FreeRTOS/Demo/Common/Minimal/AltQTest.c
index 1025419..121ed8b 100644
--- a/FreeRTOS/Demo/Common/Minimal/AltQTest.c
+++ b/FreeRTOS/Demo/Common/Minimal/AltQTest.c
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Demo/Common/Minimal/BlockQ.c b/FreeRTOS/Demo/Common/Minimal/BlockQ.c
index 7546229..6b81f24 100644
--- a/FreeRTOS/Demo/Common/Minimal/BlockQ.c
+++ b/FreeRTOS/Demo/Common/Minimal/BlockQ.c
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Demo/Common/Minimal/EventGroupsDemo.c b/FreeRTOS/Demo/Common/Minimal/EventGroupsDemo.c
index 70108aa..da839c4 100644
--- a/FreeRTOS/Demo/Common/Minimal/EventGroupsDemo.c
+++ b/FreeRTOS/Demo/Common/Minimal/EventGroupsDemo.c
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Demo/Common/Minimal/GenQTest.c b/FreeRTOS/Demo/Common/Minimal/GenQTest.c
index e1934c6..5fabb75 100644
--- a/FreeRTOS/Demo/Common/Minimal/GenQTest.c
+++ b/FreeRTOS/Demo/Common/Minimal/GenQTest.c
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Demo/Common/Minimal/IntQueue.c b/FreeRTOS/Demo/Common/Minimal/IntQueue.c
index 9a0c82f..4a68d85 100644
--- a/FreeRTOS/Demo/Common/Minimal/IntQueue.c
+++ b/FreeRTOS/Demo/Common/Minimal/IntQueue.c
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Demo/Common/Minimal/IntSemTest.c b/FreeRTOS/Demo/Common/Minimal/IntSemTest.c
index 69a0294..c6545fc 100644
--- a/FreeRTOS/Demo/Common/Minimal/IntSemTest.c
+++ b/FreeRTOS/Demo/Common/Minimal/IntSemTest.c
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Demo/Common/Minimal/PollQ.c b/FreeRTOS/Demo/Common/Minimal/PollQ.c
index 8c2633c..2156529 100644
--- a/FreeRTOS/Demo/Common/Minimal/PollQ.c
+++ b/FreeRTOS/Demo/Common/Minimal/PollQ.c
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Demo/Common/Minimal/QPeek.c b/FreeRTOS/Demo/Common/Minimal/QPeek.c
index 481b280..5c47517 100644
--- a/FreeRTOS/Demo/Common/Minimal/QPeek.c
+++ b/FreeRTOS/Demo/Common/Minimal/QPeek.c
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Demo/Common/Minimal/QueueOverwrite.c b/FreeRTOS/Demo/Common/Minimal/QueueOverwrite.c
index 41735d6..cd9b035 100644
--- a/FreeRTOS/Demo/Common/Minimal/QueueOverwrite.c
+++ b/FreeRTOS/Demo/Common/Minimal/QueueOverwrite.c
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Demo/Common/Minimal/QueueSet.c b/FreeRTOS/Demo/Common/Minimal/QueueSet.c
index 7761b19..8e32def 100644
--- a/FreeRTOS/Demo/Common/Minimal/QueueSet.c
+++ b/FreeRTOS/Demo/Common/Minimal/QueueSet.c
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Demo/Common/Minimal/QueueSetPolling.c b/FreeRTOS/Demo/Common/Minimal/QueueSetPolling.c
index c2a6dcd..0cc97f7 100644
--- a/FreeRTOS/Demo/Common/Minimal/QueueSetPolling.c
+++ b/FreeRTOS/Demo/Common/Minimal/QueueSetPolling.c
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Demo/Common/Minimal/TaskNotify.c b/FreeRTOS/Demo/Common/Minimal/TaskNotify.c
index e74d059..6a954fa 100644
--- a/FreeRTOS/Demo/Common/Minimal/TaskNotify.c
+++ b/FreeRTOS/Demo/Common/Minimal/TaskNotify.c
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Demo/Common/Minimal/TimerDemo.c b/FreeRTOS/Demo/Common/Minimal/TimerDemo.c
index 1a7ec74..1299d8e 100644
--- a/FreeRTOS/Demo/Common/Minimal/TimerDemo.c
+++ b/FreeRTOS/Demo/Common/Minimal/TimerDemo.c
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Demo/Common/Minimal/blocktim.c b/FreeRTOS/Demo/Common/Minimal/blocktim.c
index c2b5396..068ea59 100644
--- a/FreeRTOS/Demo/Common/Minimal/blocktim.c
+++ b/FreeRTOS/Demo/Common/Minimal/blocktim.c
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Demo/Common/Minimal/comtest.c b/FreeRTOS/Demo/Common/Minimal/comtest.c
index 5c58a31..5019795 100644
--- a/FreeRTOS/Demo/Common/Minimal/comtest.c
+++ b/FreeRTOS/Demo/Common/Minimal/comtest.c
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Demo/Common/Minimal/comtest_strings.c b/FreeRTOS/Demo/Common/Minimal/comtest_strings.c
index 3c96299..efba0bd 100644
--- a/FreeRTOS/Demo/Common/Minimal/comtest_strings.c
+++ b/FreeRTOS/Demo/Common/Minimal/comtest_strings.c
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Demo/Common/Minimal/countsem.c b/FreeRTOS/Demo/Common/Minimal/countsem.c
index 0483a0a..2b45fb0 100644
--- a/FreeRTOS/Demo/Common/Minimal/countsem.c
+++ b/FreeRTOS/Demo/Common/Minimal/countsem.c
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Demo/Common/Minimal/crflash.c b/FreeRTOS/Demo/Common/Minimal/crflash.c
index fee0adf..14431ad 100644
--- a/FreeRTOS/Demo/Common/Minimal/crflash.c
+++ b/FreeRTOS/Demo/Common/Minimal/crflash.c
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Demo/Common/Minimal/crhook.c b/FreeRTOS/Demo/Common/Minimal/crhook.c
index bbc98dc..1f2718f 100644
--- a/FreeRTOS/Demo/Common/Minimal/crhook.c
+++ b/FreeRTOS/Demo/Common/Minimal/crhook.c
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Demo/Common/Minimal/death.c b/FreeRTOS/Demo/Common/Minimal/death.c
index ae348d4..52e5012 100644
--- a/FreeRTOS/Demo/Common/Minimal/death.c
+++ b/FreeRTOS/Demo/Common/Minimal/death.c
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Demo/Common/Minimal/dynamic.c b/FreeRTOS/Demo/Common/Minimal/dynamic.c
index 481e89c..e4546af 100644
--- a/FreeRTOS/Demo/Common/Minimal/dynamic.c
+++ b/FreeRTOS/Demo/Common/Minimal/dynamic.c
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Demo/Common/Minimal/flash.c b/FreeRTOS/Demo/Common/Minimal/flash.c
index 0187d6b..ec0656d 100644
--- a/FreeRTOS/Demo/Common/Minimal/flash.c
+++ b/FreeRTOS/Demo/Common/Minimal/flash.c
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Demo/Common/Minimal/flash_timer.c b/FreeRTOS/Demo/Common/Minimal/flash_timer.c
index a4ad7e8..c08135a 100644
--- a/FreeRTOS/Demo/Common/Minimal/flash_timer.c
+++ b/FreeRTOS/Demo/Common/Minimal/flash_timer.c
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Demo/Common/Minimal/flop.c b/FreeRTOS/Demo/Common/Minimal/flop.c
index 041f846..403b5d5 100644
--- a/FreeRTOS/Demo/Common/Minimal/flop.c
+++ b/FreeRTOS/Demo/Common/Minimal/flop.c
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Demo/Common/Minimal/integer.c b/FreeRTOS/Demo/Common/Minimal/integer.c
index ba0599f..107ed04 100644
--- a/FreeRTOS/Demo/Common/Minimal/integer.c
+++ b/FreeRTOS/Demo/Common/Minimal/integer.c
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Demo/Common/Minimal/recmutex.c b/FreeRTOS/Demo/Common/Minimal/recmutex.c
index c68b0f6..f59d360 100644
--- a/FreeRTOS/Demo/Common/Minimal/recmutex.c
+++ b/FreeRTOS/Demo/Common/Minimal/recmutex.c
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Demo/Common/Minimal/semtest.c b/FreeRTOS/Demo/Common/Minimal/semtest.c
index 7da608b..e74ba5c 100644
--- a/FreeRTOS/Demo/Common/Minimal/semtest.c
+++ b/FreeRTOS/Demo/Common/Minimal/semtest.c
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Demo/Common/Minimal/sp_flop.c b/FreeRTOS/Demo/Common/Minimal/sp_flop.c
index 00a3233..96a0543 100644
--- a/FreeRTOS/Demo/Common/Minimal/sp_flop.c
+++ b/FreeRTOS/Demo/Common/Minimal/sp_flop.c
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

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 6b3278d..8760308 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,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

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 002041e..d80126a 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,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

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 201dd57..7805f99 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,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

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 88d9a16..6cad431 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,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Demo/Common/include/AltBlckQ.h b/FreeRTOS/Demo/Common/include/AltBlckQ.h
index 2c67d16..f96bd1c 100644
--- a/FreeRTOS/Demo/Common/include/AltBlckQ.h
+++ b/FreeRTOS/Demo/Common/include/AltBlckQ.h
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Demo/Common/include/AltBlock.h b/FreeRTOS/Demo/Common/include/AltBlock.h
index faab1ab..a0e3435 100644
--- a/FreeRTOS/Demo/Common/include/AltBlock.h
+++ b/FreeRTOS/Demo/Common/include/AltBlock.h
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Demo/Common/include/AltPollQ.h b/FreeRTOS/Demo/Common/include/AltPollQ.h
index 3c05007..567750c 100644
--- a/FreeRTOS/Demo/Common/include/AltPollQ.h
+++ b/FreeRTOS/Demo/Common/include/AltPollQ.h
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Demo/Common/include/AltQTest.h b/FreeRTOS/Demo/Common/include/AltQTest.h
index 68228dc..d0bc5a5 100644
--- a/FreeRTOS/Demo/Common/include/AltQTest.h
+++ b/FreeRTOS/Demo/Common/include/AltQTest.h
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Demo/Common/include/BlockQ.h b/FreeRTOS/Demo/Common/include/BlockQ.h
index 1ffb0e5..7c2bdda 100644
--- a/FreeRTOS/Demo/Common/include/BlockQ.h
+++ b/FreeRTOS/Demo/Common/include/BlockQ.h
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Demo/Common/include/EventGroupsDemo.h b/FreeRTOS/Demo/Common/include/EventGroupsDemo.h
index e9dec3e..7206b84 100644
--- a/FreeRTOS/Demo/Common/include/EventGroupsDemo.h
+++ b/FreeRTOS/Demo/Common/include/EventGroupsDemo.h
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Demo/Common/include/GenQTest.h b/FreeRTOS/Demo/Common/include/GenQTest.h
index 978f7b6..071305d 100644
--- a/FreeRTOS/Demo/Common/include/GenQTest.h
+++ b/FreeRTOS/Demo/Common/include/GenQTest.h
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Demo/Common/include/IntQueue.h b/FreeRTOS/Demo/Common/include/IntQueue.h
index 768571e..c81f168 100644
--- a/FreeRTOS/Demo/Common/include/IntQueue.h
+++ b/FreeRTOS/Demo/Common/include/IntQueue.h
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Demo/Common/include/IntSemTest.h b/FreeRTOS/Demo/Common/include/IntSemTest.h
index 5476d82..2656ab5 100644
--- a/FreeRTOS/Demo/Common/include/IntSemTest.h
+++ b/FreeRTOS/Demo/Common/include/IntSemTest.h
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Demo/Common/include/PollQ.h b/FreeRTOS/Demo/Common/include/PollQ.h
index af4f8bb..041c648 100644
--- a/FreeRTOS/Demo/Common/include/PollQ.h
+++ b/FreeRTOS/Demo/Common/include/PollQ.h
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Demo/Common/include/QPeek.h b/FreeRTOS/Demo/Common/include/QPeek.h
index 9c89ebe..27e04cc 100644
--- a/FreeRTOS/Demo/Common/include/QPeek.h
+++ b/FreeRTOS/Demo/Common/include/QPeek.h
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Demo/Common/include/QueueOverwrite.h b/FreeRTOS/Demo/Common/include/QueueOverwrite.h
index 6c9ac01..f877b62 100644
--- a/FreeRTOS/Demo/Common/include/QueueOverwrite.h
+++ b/FreeRTOS/Demo/Common/include/QueueOverwrite.h
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Demo/Common/include/QueueSet.h b/FreeRTOS/Demo/Common/include/QueueSet.h
index ad6f9fd..b3d14c6 100644
--- a/FreeRTOS/Demo/Common/include/QueueSet.h
+++ b/FreeRTOS/Demo/Common/include/QueueSet.h
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Demo/Common/include/QueueSetPolling.h b/FreeRTOS/Demo/Common/include/QueueSetPolling.h
index 61dbdf6..88b0a4d 100644
--- a/FreeRTOS/Demo/Common/include/QueueSetPolling.h
+++ b/FreeRTOS/Demo/Common/include/QueueSetPolling.h
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Demo/Common/include/TaskNotify.h b/FreeRTOS/Demo/Common/include/TaskNotify.h
index e2c1947..e7a0e97 100644
--- a/FreeRTOS/Demo/Common/include/TaskNotify.h
+++ b/FreeRTOS/Demo/Common/include/TaskNotify.h
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Demo/Common/include/TimerDemo.h b/FreeRTOS/Demo/Common/include/TimerDemo.h
index 4e44ed5..dbd5f70 100644
--- a/FreeRTOS/Demo/Common/include/TimerDemo.h
+++ b/FreeRTOS/Demo/Common/include/TimerDemo.h
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Demo/Common/include/blocktim.h b/FreeRTOS/Demo/Common/include/blocktim.h
index b9fee17..14ba5a1 100644
--- a/FreeRTOS/Demo/Common/include/blocktim.h
+++ b/FreeRTOS/Demo/Common/include/blocktim.h
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Demo/Common/include/comtest.h b/FreeRTOS/Demo/Common/include/comtest.h
index 4d142b5..9ff3784 100644
--- a/FreeRTOS/Demo/Common/include/comtest.h
+++ b/FreeRTOS/Demo/Common/include/comtest.h
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Demo/Common/include/comtest2.h b/FreeRTOS/Demo/Common/include/comtest2.h
index a899f4d..d5d2900 100644
--- a/FreeRTOS/Demo/Common/include/comtest2.h
+++ b/FreeRTOS/Demo/Common/include/comtest2.h
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Demo/Common/include/comtest_strings.h b/FreeRTOS/Demo/Common/include/comtest_strings.h
index 53c7daa..e450e4b 100644
--- a/FreeRTOS/Demo/Common/include/comtest_strings.h
+++ b/FreeRTOS/Demo/Common/include/comtest_strings.h
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Demo/Common/include/countsem.h b/FreeRTOS/Demo/Common/include/countsem.h
index 37da96b..61ce201 100644
--- a/FreeRTOS/Demo/Common/include/countsem.h
+++ b/FreeRTOS/Demo/Common/include/countsem.h
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Demo/Common/include/crflash.h b/FreeRTOS/Demo/Common/include/crflash.h
index a164e24..3034405 100644
--- a/FreeRTOS/Demo/Common/include/crflash.h
+++ b/FreeRTOS/Demo/Common/include/crflash.h
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Demo/Common/include/crhook.h b/FreeRTOS/Demo/Common/include/crhook.h
index 0524c68..8a21e68 100644
--- a/FreeRTOS/Demo/Common/include/crhook.h
+++ b/FreeRTOS/Demo/Common/include/crhook.h
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Demo/Common/include/death.h b/FreeRTOS/Demo/Common/include/death.h
index 36b94be..d705a33 100644
--- a/FreeRTOS/Demo/Common/include/death.h
+++ b/FreeRTOS/Demo/Common/include/death.h
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Demo/Common/include/dynamic.h b/FreeRTOS/Demo/Common/include/dynamic.h
index 56d2e9c..0249406 100644
--- a/FreeRTOS/Demo/Common/include/dynamic.h
+++ b/FreeRTOS/Demo/Common/include/dynamic.h
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Demo/Common/include/fileIO.h b/FreeRTOS/Demo/Common/include/fileIO.h
index bc8aeff..b1a3a7f 100644
--- a/FreeRTOS/Demo/Common/include/fileIO.h
+++ b/FreeRTOS/Demo/Common/include/fileIO.h
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Demo/Common/include/flash.h b/FreeRTOS/Demo/Common/include/flash.h
index 5b40176..689a0d4 100644
--- a/FreeRTOS/Demo/Common/include/flash.h
+++ b/FreeRTOS/Demo/Common/include/flash.h
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Demo/Common/include/flash_timer.h b/FreeRTOS/Demo/Common/include/flash_timer.h
index 1b57db1..6d05892 100644
--- a/FreeRTOS/Demo/Common/include/flash_timer.h
+++ b/FreeRTOS/Demo/Common/include/flash_timer.h
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Demo/Common/include/flop.h b/FreeRTOS/Demo/Common/include/flop.h
index 448eaff..097d432 100644
--- a/FreeRTOS/Demo/Common/include/flop.h
+++ b/FreeRTOS/Demo/Common/include/flop.h
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Demo/Common/include/integer.h b/FreeRTOS/Demo/Common/include/integer.h
index 89aa8a8..8b74a56 100644
--- a/FreeRTOS/Demo/Common/include/integer.h
+++ b/FreeRTOS/Demo/Common/include/integer.h
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Demo/Common/include/mevents.h b/FreeRTOS/Demo/Common/include/mevents.h
index 748fd79..c0ed997 100644
--- a/FreeRTOS/Demo/Common/include/mevents.h
+++ b/FreeRTOS/Demo/Common/include/mevents.h
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Demo/Common/include/partest.h b/FreeRTOS/Demo/Common/include/partest.h
index 7cebe26..02db404 100644
--- a/FreeRTOS/Demo/Common/include/partest.h
+++ b/FreeRTOS/Demo/Common/include/partest.h
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Demo/Common/include/print.h b/FreeRTOS/Demo/Common/include/print.h
index 50c5ff6..1e78780 100644
--- a/FreeRTOS/Demo/Common/include/print.h
+++ b/FreeRTOS/Demo/Common/include/print.h
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Demo/Common/include/recmutex.h b/FreeRTOS/Demo/Common/include/recmutex.h
index 8f0013b..52a4eb2 100644
--- a/FreeRTOS/Demo/Common/include/recmutex.h
+++ b/FreeRTOS/Demo/Common/include/recmutex.h
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Demo/Common/include/semtest.h b/FreeRTOS/Demo/Common/include/semtest.h
index 8428374..ecfeede 100644
--- a/FreeRTOS/Demo/Common/include/semtest.h
+++ b/FreeRTOS/Demo/Common/include/semtest.h
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Demo/Common/include/serial.h b/FreeRTOS/Demo/Common/include/serial.h
index 09f399b..dbea24a 100644
--- a/FreeRTOS/Demo/Common/include/serial.h
+++ b/FreeRTOS/Demo/Common/include/serial.h
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Demo/Cygnal/FreeRTOSConfig.h b/FreeRTOS/Demo/Cygnal/FreeRTOSConfig.h
index 9899bd6..1aabdbc 100644
--- a/FreeRTOS/Demo/Cygnal/FreeRTOSConfig.h
+++ b/FreeRTOS/Demo/Cygnal/FreeRTOSConfig.h
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Demo/Cygnal/Makefile b/FreeRTOS/Demo/Cygnal/Makefile
index 79418ca..686664c 100644
--- a/FreeRTOS/Demo/Cygnal/Makefile
+++ b/FreeRTOS/Demo/Cygnal/Makefile
@@ -1,5 +1,5 @@
 #/*

-#    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+#    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

 #	

 #

 #    ***************************************************************************

diff --git a/FreeRTOS/Demo/Cygnal/ParTest/ParTest.c b/FreeRTOS/Demo/Cygnal/ParTest/ParTest.c
index 1347de0..c53a050 100644
--- a/FreeRTOS/Demo/Cygnal/ParTest/ParTest.c
+++ b/FreeRTOS/Demo/Cygnal/ParTest/ParTest.c
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Demo/Cygnal/main.c b/FreeRTOS/Demo/Cygnal/main.c
index db0bf89..ac4eb0d 100644
--- a/FreeRTOS/Demo/Cygnal/main.c
+++ b/FreeRTOS/Demo/Cygnal/main.c
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Demo/Cygnal/serial/serial.c b/FreeRTOS/Demo/Cygnal/serial/serial.c
index 7cc827d..47fa796 100644
--- a/FreeRTOS/Demo/Cygnal/serial/serial.c
+++ b/FreeRTOS/Demo/Cygnal/serial/serial.c
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Demo/Flshlite/FRConfig.h b/FreeRTOS/Demo/Flshlite/FRConfig.h
index e3a0f41..0f28d46 100644
--- a/FreeRTOS/Demo/Flshlite/FRConfig.h
+++ b/FreeRTOS/Demo/Flshlite/FRConfig.h
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Demo/Flshlite/FileIO/fileIO.c b/FreeRTOS/Demo/Flshlite/FileIO/fileIO.c
index afc26b0..18d2052 100644
--- a/FreeRTOS/Demo/Flshlite/FileIO/fileIO.c
+++ b/FreeRTOS/Demo/Flshlite/FileIO/fileIO.c
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Demo/Flshlite/FreeRTOSConfig.h b/FreeRTOS/Demo/Flshlite/FreeRTOSConfig.h
index e093da1..28a00b9 100644
--- a/FreeRTOS/Demo/Flshlite/FreeRTOSConfig.h
+++ b/FreeRTOS/Demo/Flshlite/FreeRTOSConfig.h
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Demo/Flshlite/ParTest/ParTest.c b/FreeRTOS/Demo/Flshlite/ParTest/ParTest.c
index 1390916..93c4845 100644
--- a/FreeRTOS/Demo/Flshlite/ParTest/ParTest.c
+++ b/FreeRTOS/Demo/Flshlite/ParTest/ParTest.c
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Demo/Flshlite/main.c b/FreeRTOS/Demo/Flshlite/main.c
index 317ca06..2adbea2 100644
--- a/FreeRTOS/Demo/Flshlite/main.c
+++ b/FreeRTOS/Demo/Flshlite/main.c
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Demo/Flshlite/serial/serial.c b/FreeRTOS/Demo/Flshlite/serial/serial.c
index cf479aa..08488c4 100644
--- a/FreeRTOS/Demo/Flshlite/serial/serial.c
+++ b/FreeRTOS/Demo/Flshlite/serial/serial.c
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Demo/H8S/RTOSDemo/FreeRTOSConfig.h b/FreeRTOS/Demo/H8S/RTOSDemo/FreeRTOSConfig.h
index fe1ac90..183477f 100644
--- a/FreeRTOS/Demo/H8S/RTOSDemo/FreeRTOSConfig.h
+++ b/FreeRTOS/Demo/H8S/RTOSDemo/FreeRTOSConfig.h
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Demo/H8S/RTOSDemo/ParTest/ParTest.c b/FreeRTOS/Demo/H8S/RTOSDemo/ParTest/ParTest.c
index 77315b2..223d20b 100644
--- a/FreeRTOS/Demo/H8S/RTOSDemo/ParTest/ParTest.c
+++ b/FreeRTOS/Demo/H8S/RTOSDemo/ParTest/ParTest.c
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Demo/H8S/RTOSDemo/main.c b/FreeRTOS/Demo/H8S/RTOSDemo/main.c
index dd1c17f..549abb4 100644
--- a/FreeRTOS/Demo/H8S/RTOSDemo/main.c
+++ b/FreeRTOS/Demo/H8S/RTOSDemo/main.c
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Demo/H8S/RTOSDemo/serial/serial.c b/FreeRTOS/Demo/H8S/RTOSDemo/serial/serial.c
index 4f1f1e0..5b04162 100644
--- a/FreeRTOS/Demo/H8S/RTOSDemo/serial/serial.c
+++ b/FreeRTOS/Demo/H8S/RTOSDemo/serial/serial.c
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Demo/HCS12_CodeWarrior_banked/FreeRTOSConfig.h b/FreeRTOS/Demo/HCS12_CodeWarrior_banked/FreeRTOSConfig.h
index 8cc73f8..15dfbb3 100644
--- a/FreeRTOS/Demo/HCS12_CodeWarrior_banked/FreeRTOSConfig.h
+++ b/FreeRTOS/Demo/HCS12_CodeWarrior_banked/FreeRTOSConfig.h
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Demo/HCS12_CodeWarrior_banked/ParTest/ParTest.c b/FreeRTOS/Demo/HCS12_CodeWarrior_banked/ParTest/ParTest.c
index a6d7dae..b52754f 100644
--- a/FreeRTOS/Demo/HCS12_CodeWarrior_banked/ParTest/ParTest.c
+++ b/FreeRTOS/Demo/HCS12_CodeWarrior_banked/ParTest/ParTest.c
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Demo/HCS12_CodeWarrior_banked/main.c b/FreeRTOS/Demo/HCS12_CodeWarrior_banked/main.c
index 66b1f7e..f7c816f 100644
--- a/FreeRTOS/Demo/HCS12_CodeWarrior_banked/main.c
+++ b/FreeRTOS/Demo/HCS12_CodeWarrior_banked/main.c
@@ -1,6 +1,6 @@
 

 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Demo/HCS12_CodeWarrior_banked/serial/serial.c b/FreeRTOS/Demo/HCS12_CodeWarrior_banked/serial/serial.c
index f4006f6..6d50776 100644
--- a/FreeRTOS/Demo/HCS12_CodeWarrior_banked/serial/serial.c
+++ b/FreeRTOS/Demo/HCS12_CodeWarrior_banked/serial/serial.c
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Demo/HCS12_CodeWarrior_small/FreeRTOSConfig.h b/FreeRTOS/Demo/HCS12_CodeWarrior_small/FreeRTOSConfig.h
index c5963bc..e6b81c9 100644
--- a/FreeRTOS/Demo/HCS12_CodeWarrior_small/FreeRTOSConfig.h
+++ b/FreeRTOS/Demo/HCS12_CodeWarrior_small/FreeRTOSConfig.h
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Demo/HCS12_CodeWarrior_small/ParTest/ParTest.c b/FreeRTOS/Demo/HCS12_CodeWarrior_small/ParTest/ParTest.c
index a6d7dae..b52754f 100644
--- a/FreeRTOS/Demo/HCS12_CodeWarrior_small/ParTest/ParTest.c
+++ b/FreeRTOS/Demo/HCS12_CodeWarrior_small/ParTest/ParTest.c
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Demo/HCS12_CodeWarrior_small/main.c b/FreeRTOS/Demo/HCS12_CodeWarrior_small/main.c
index 9e0c6a4..623ac4c 100644
--- a/FreeRTOS/Demo/HCS12_CodeWarrior_small/main.c
+++ b/FreeRTOS/Demo/HCS12_CodeWarrior_small/main.c
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Demo/HCS12_CodeWarrior_small/serial/serial.c b/FreeRTOS/Demo/HCS12_CodeWarrior_small/serial/serial.c
index f3a9a0d..a2cf288 100644
--- a/FreeRTOS/Demo/HCS12_CodeWarrior_small/serial/serial.c
+++ b/FreeRTOS/Demo/HCS12_CodeWarrior_small/serial/serial.c
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Demo/HCS12_GCC_banked/FreeRTOSConfig.h b/FreeRTOS/Demo/HCS12_GCC_banked/FreeRTOSConfig.h
index 28db532..f5255d2 100644
--- a/FreeRTOS/Demo/HCS12_GCC_banked/FreeRTOSConfig.h
+++ b/FreeRTOS/Demo/HCS12_GCC_banked/FreeRTOSConfig.h
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Demo/HCS12_GCC_banked/ParTest.c b/FreeRTOS/Demo/HCS12_GCC_banked/ParTest.c
index 0137a3b..15a6d45 100644
--- a/FreeRTOS/Demo/HCS12_GCC_banked/ParTest.c
+++ b/FreeRTOS/Demo/HCS12_GCC_banked/ParTest.c
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Demo/HCS12_GCC_banked/main.c b/FreeRTOS/Demo/HCS12_GCC_banked/main.c
index 82be497..1dadef8 100644
--- a/FreeRTOS/Demo/HCS12_GCC_banked/main.c
+++ b/FreeRTOS/Demo/HCS12_GCC_banked/main.c
@@ -1,6 +1,6 @@
 

 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Demo/HCS12_GCC_banked/startup.c b/FreeRTOS/Demo/HCS12_GCC_banked/startup.c
index c9cf967..88d6a9b 100644
--- a/FreeRTOS/Demo/HCS12_GCC_banked/startup.c
+++ b/FreeRTOS/Demo/HCS12_GCC_banked/startup.c
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

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 61977ef..ea5c4d4 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,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

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 adcdf61..c0ad848 100644
--- a/FreeRTOS/Demo/IA32_flat_GCC_Galileo_Gen_2/FreeRTOSConfig.h
+++ b/FreeRTOS/Demo/IA32_flat_GCC_Galileo_Gen_2/FreeRTOSConfig.h
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

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 d230aad..4e23688 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,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

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 77de772..fcf9f8c 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,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

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 6f09608..ddb50c5 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,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

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 a6cbc8e..466a99a 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,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

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 f495e16..21b08fb 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,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

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 bd0f18c..b9e5f12 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,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

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 c288bca..57704da 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,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

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 9087524..4436629 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,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

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 7f99233..2471cb3 100644
--- a/FreeRTOS/Demo/IA32_flat_GCC_Galileo_Gen_2/main.c
+++ b/FreeRTOS/Demo/IA32_flat_GCC_Galileo_Gen_2/main.c
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Demo/MB91460_Softune/SRC/FreeRTOSConfig.h b/FreeRTOS/Demo/MB91460_Softune/SRC/FreeRTOSConfig.h
index 9876e3a..7b4efb5 100644
--- a/FreeRTOS/Demo/MB91460_Softune/SRC/FreeRTOSConfig.h
+++ b/FreeRTOS/Demo/MB91460_Softune/SRC/FreeRTOSConfig.h
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Demo/MB91460_Softune/SRC/crflash_modified.c b/FreeRTOS/Demo/MB91460_Softune/SRC/crflash_modified.c
index be1de43..757143c 100644
--- a/FreeRTOS/Demo/MB91460_Softune/SRC/crflash_modified.c
+++ b/FreeRTOS/Demo/MB91460_Softune/SRC/crflash_modified.c
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Demo/MB91460_Softune/SRC/main.c b/FreeRTOS/Demo/MB91460_Softune/SRC/main.c
index 66adf1c..4e9428f 100644
--- a/FreeRTOS/Demo/MB91460_Softune/SRC/main.c
+++ b/FreeRTOS/Demo/MB91460_Softune/SRC/main.c
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Demo/MB91460_Softune/SRC/partest/partest.c b/FreeRTOS/Demo/MB91460_Softune/SRC/partest/partest.c
index 9d589fe..8c7bb26 100644
--- a/FreeRTOS/Demo/MB91460_Softune/SRC/partest/partest.c
+++ b/FreeRTOS/Demo/MB91460_Softune/SRC/partest/partest.c
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Demo/MB91460_Softune/SRC/serial/serial.c b/FreeRTOS/Demo/MB91460_Softune/SRC/serial/serial.c
index 8def71a..3b8efe8 100644
--- a/FreeRTOS/Demo/MB91460_Softune/SRC/serial/serial.c
+++ b/FreeRTOS/Demo/MB91460_Softune/SRC/serial/serial.c
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

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 274ab78..58d67c5 100644
--- a/FreeRTOS/Demo/MB96340_Softune/FreeRTOS_96348hs_SK16FX100PMC/Src/FreeRTOSConfig.h
+++ b/FreeRTOS/Demo/MB96340_Softune/FreeRTOS_96348hs_SK16FX100PMC/Src/FreeRTOSConfig.h
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

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 be1de43..757143c 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,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

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 d4f34c7..e34e449 100644
--- a/FreeRTOS/Demo/MB96340_Softune/FreeRTOS_96348hs_SK16FX100PMC/Src/main.c
+++ b/FreeRTOS/Demo/MB96340_Softune/FreeRTOS_96348hs_SK16FX100PMC/Src/main.c
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

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 76193d2..8391772 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,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

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 9a39a3f..ab668dc 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,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Demo/MB96350_Softune_Dice_Kit/DiceTask.c b/FreeRTOS/Demo/MB96350_Softune_Dice_Kit/DiceTask.c
index 88592eb..3ba3b53 100644
--- a/FreeRTOS/Demo/MB96350_Softune_Dice_Kit/DiceTask.c
+++ b/FreeRTOS/Demo/MB96350_Softune_Dice_Kit/DiceTask.c
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Demo/MB96350_Softune_Dice_Kit/DiceTask.h b/FreeRTOS/Demo/MB96350_Softune_Dice_Kit/DiceTask.h
index d833042..c1c63da 100644
--- a/FreeRTOS/Demo/MB96350_Softune_Dice_Kit/DiceTask.h
+++ b/FreeRTOS/Demo/MB96350_Softune_Dice_Kit/DiceTask.h
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Demo/MB96350_Softune_Dice_Kit/FreeRTOSConfig.h b/FreeRTOS/Demo/MB96350_Softune_Dice_Kit/FreeRTOSConfig.h
index c004225..cb49486 100644
--- a/FreeRTOS/Demo/MB96350_Softune_Dice_Kit/FreeRTOSConfig.h
+++ b/FreeRTOS/Demo/MB96350_Softune_Dice_Kit/FreeRTOSConfig.h
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Demo/MB96350_Softune_Dice_Kit/ParTest/ParTest.c b/FreeRTOS/Demo/MB96350_Softune_Dice_Kit/ParTest/ParTest.c
index 2ddc0e6..6f1f996 100644
--- a/FreeRTOS/Demo/MB96350_Softune_Dice_Kit/ParTest/ParTest.c
+++ b/FreeRTOS/Demo/MB96350_Softune_Dice_Kit/ParTest/ParTest.c
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Demo/MB96350_Softune_Dice_Kit/SegmentToggleTasks.c b/FreeRTOS/Demo/MB96350_Softune_Dice_Kit/SegmentToggleTasks.c
index de9852a..8f6222e 100644
--- a/FreeRTOS/Demo/MB96350_Softune_Dice_Kit/SegmentToggleTasks.c
+++ b/FreeRTOS/Demo/MB96350_Softune_Dice_Kit/SegmentToggleTasks.c
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Demo/MB96350_Softune_Dice_Kit/main.c b/FreeRTOS/Demo/MB96350_Softune_Dice_Kit/main.c
index 4d1ae55..721574f 100644
--- a/FreeRTOS/Demo/MB96350_Softune_Dice_Kit/main.c
+++ b/FreeRTOS/Demo/MB96350_Softune_Dice_Kit/main.c
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Demo/MSP430X_MSP430F5438_CCS/Demo_Source/FreeRTOSConfig.h b/FreeRTOS/Demo/MSP430X_MSP430F5438_CCS/Demo_Source/FreeRTOSConfig.h
index deb32eb..3159603 100644
--- a/FreeRTOS/Demo/MSP430X_MSP430F5438_CCS/Demo_Source/FreeRTOSConfig.h
+++ b/FreeRTOS/Demo/MSP430X_MSP430F5438_CCS/Demo_Source/FreeRTOSConfig.h
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Demo/MSP430X_MSP430F5438_CCS/Demo_Source/ParTest.c b/FreeRTOS/Demo/MSP430X_MSP430F5438_CCS/Demo_Source/ParTest.c
index 2d03334..bebba34 100644
--- a/FreeRTOS/Demo/MSP430X_MSP430F5438_CCS/Demo_Source/ParTest.c
+++ b/FreeRTOS/Demo/MSP430X_MSP430F5438_CCS/Demo_Source/ParTest.c
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Demo/MSP430X_MSP430F5438_CCS/Demo_Source/RegTest.asm b/FreeRTOS/Demo/MSP430X_MSP430F5438_CCS/Demo_Source/RegTest.asm
index 18373b7..b1c2260 100644
--- a/FreeRTOS/Demo/MSP430X_MSP430F5438_CCS/Demo_Source/RegTest.asm
+++ b/FreeRTOS/Demo/MSP430X_MSP430F5438_CCS/Demo_Source/RegTest.asm
@@ -1,6 +1,6 @@
 ;

 ;/*

-;    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+;    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

 ;	

 ;

 ;    ***************************************************************************

diff --git a/FreeRTOS/Demo/MSP430X_MSP430F5438_CCS/Demo_Source/RunTimeStatsConfig.c b/FreeRTOS/Demo/MSP430X_MSP430F5438_CCS/Demo_Source/RunTimeStatsConfig.c
index cc7e9b8..6fb2ec5 100644
--- a/FreeRTOS/Demo/MSP430X_MSP430F5438_CCS/Demo_Source/RunTimeStatsConfig.c
+++ b/FreeRTOS/Demo/MSP430X_MSP430F5438_CCS/Demo_Source/RunTimeStatsConfig.c
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Demo/MSP430X_MSP430F5438_CCS/Demo_Source/main.c b/FreeRTOS/Demo/MSP430X_MSP430F5438_CCS/Demo_Source/main.c
index 3441144..ee3123e 100644
--- a/FreeRTOS/Demo/MSP430X_MSP430F5438_CCS/Demo_Source/main.c
+++ b/FreeRTOS/Demo/MSP430X_MSP430F5438_CCS/Demo_Source/main.c
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Demo/MSP430X_MSP430F5438_CCS/Demo_Source/serial.c b/FreeRTOS/Demo/MSP430X_MSP430F5438_CCS/Demo_Source/serial.c
index 8b43e41..cb024c9 100644
--- a/FreeRTOS/Demo/MSP430X_MSP430F5438_CCS/Demo_Source/serial.c
+++ b/FreeRTOS/Demo/MSP430X_MSP430F5438_CCS/Demo_Source/serial.c
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Demo/MSP430X_MSP430F5438_IAR/FreeRTOSConfig.h b/FreeRTOS/Demo/MSP430X_MSP430F5438_IAR/FreeRTOSConfig.h
index f3bc0bc..d8f2d95 100644
--- a/FreeRTOS/Demo/MSP430X_MSP430F5438_IAR/FreeRTOSConfig.h
+++ b/FreeRTOS/Demo/MSP430X_MSP430F5438_IAR/FreeRTOSConfig.h
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Demo/MSP430X_MSP430F5438_IAR/ParTest.c b/FreeRTOS/Demo/MSP430X_MSP430F5438_IAR/ParTest.c
index 2d03334..bebba34 100644
--- a/FreeRTOS/Demo/MSP430X_MSP430F5438_IAR/ParTest.c
+++ b/FreeRTOS/Demo/MSP430X_MSP430F5438_IAR/ParTest.c
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Demo/MSP430X_MSP430F5438_IAR/RegTest.s43 b/FreeRTOS/Demo/MSP430X_MSP430F5438_IAR/RegTest.s43
index 95f9edb..e3ce176 100644
--- a/FreeRTOS/Demo/MSP430X_MSP430F5438_IAR/RegTest.s43
+++ b/FreeRTOS/Demo/MSP430X_MSP430F5438_IAR/RegTest.s43
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Demo/MSP430X_MSP430F5438_IAR/RunTimeStatsConfig.c b/FreeRTOS/Demo/MSP430X_MSP430F5438_IAR/RunTimeStatsConfig.c
index 0cbab79..520f177 100644
--- a/FreeRTOS/Demo/MSP430X_MSP430F5438_IAR/RunTimeStatsConfig.c
+++ b/FreeRTOS/Demo/MSP430X_MSP430F5438_IAR/RunTimeStatsConfig.c
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Demo/MSP430X_MSP430F5438_IAR/main.c b/FreeRTOS/Demo/MSP430X_MSP430F5438_IAR/main.c
index 30733f2..1991603 100644
--- a/FreeRTOS/Demo/MSP430X_MSP430F5438_IAR/main.c
+++ b/FreeRTOS/Demo/MSP430X_MSP430F5438_IAR/main.c
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Demo/MSP430X_MSP430F5438_IAR/serial.c b/FreeRTOS/Demo/MSP430X_MSP430F5438_IAR/serial.c
index 6265ef3..2bff392 100644
--- a/FreeRTOS/Demo/MSP430X_MSP430F5438_IAR/serial.c
+++ b/FreeRTOS/Demo/MSP430X_MSP430F5438_IAR/serial.c
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

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 0cb9fa9..0fad539 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,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

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 46fe4f1..1ca4b41 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,6 +1,6 @@
 ;

 ;/*

-;    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+;    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

 ;	

 ;

 ;    ***************************************************************************

diff --git a/FreeRTOS/Demo/MSP430X_MSP430FR5969_LaunchPad_IAR_CCS/FreeRTOSConfig.h b/FreeRTOS/Demo/MSP430X_MSP430FR5969_LaunchPad_IAR_CCS/FreeRTOSConfig.h
index 2aae9fe..2fedcc4 100644
--- a/FreeRTOS/Demo/MSP430X_MSP430FR5969_LaunchPad_IAR_CCS/FreeRTOSConfig.h
+++ b/FreeRTOS/Demo/MSP430X_MSP430FR5969_LaunchPad_IAR_CCS/FreeRTOSConfig.h
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

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 77f734b..fc1fd18 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,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

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 9cf5902..77bab4f 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,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

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 4e7c698..669aab3 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,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Demo/MSP430X_MSP430FR5969_LaunchPad_IAR_CCS/LEDs.c b/FreeRTOS/Demo/MSP430X_MSP430FR5969_LaunchPad_IAR_CCS/LEDs.c
index 284a7ce..4896a53 100644
--- a/FreeRTOS/Demo/MSP430X_MSP430FR5969_LaunchPad_IAR_CCS/LEDs.c
+++ b/FreeRTOS/Demo/MSP430X_MSP430FR5969_LaunchPad_IAR_CCS/LEDs.c
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Demo/MSP430X_MSP430FR5969_LaunchPad_IAR_CCS/main.c b/FreeRTOS/Demo/MSP430X_MSP430FR5969_LaunchPad_IAR_CCS/main.c
index e725cf0..f13957e 100644
--- a/FreeRTOS/Demo/MSP430X_MSP430FR5969_LaunchPad_IAR_CCS/main.c
+++ b/FreeRTOS/Demo/MSP430X_MSP430FR5969_LaunchPad_IAR_CCS/main.c
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

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 7236d62..3d3bd35 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,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Demo/MicroBlaze_Kintex7_EthernetLite/RTOSDemo/src/FreeRTOSConfig.h b/FreeRTOS/Demo/MicroBlaze_Kintex7_EthernetLite/RTOSDemo/src/FreeRTOSConfig.h
index 4985de5..e973344 100644
--- a/FreeRTOS/Demo/MicroBlaze_Kintex7_EthernetLite/RTOSDemo/src/FreeRTOSConfig.h
+++ b/FreeRTOS/Demo/MicroBlaze_Kintex7_EthernetLite/RTOSDemo/src/FreeRTOSConfig.h
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

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 7f84f03..b210813 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,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

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 94a8ad9..689d4be 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,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Demo/MicroBlaze_Kintex7_EthernetLite/RTOSDemo/src/LEDs.c b/FreeRTOS/Demo/MicroBlaze_Kintex7_EthernetLite/RTOSDemo/src/LEDs.c
index 02f1842..a81a063 100644
--- a/FreeRTOS/Demo/MicroBlaze_Kintex7_EthernetLite/RTOSDemo/src/LEDs.c
+++ b/FreeRTOS/Demo/MicroBlaze_Kintex7_EthernetLite/RTOSDemo/src/LEDs.c
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

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 8e537e2..709b167 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,54 +1,70 @@
 /*

-    FreeRTOS V7.0.2 - Copyright (C) 2011 Real Time Engineers Ltd.

+    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    All rights reserved

 

-

-    ***************************************************************************

-     *                                                                       *

-     *    FreeRTOS tutorial books are available in pdf and paperback.        *

-     *    Complete, revised, and edited pdf reference manuals are also       *

-     *    available.                                                         *

-     *                                                                       *

-     *    Purchasing FreeRTOS documentation will not only help you, by       *

-     *    ensuring you get running as quickly as possible and with an        *

-     *    in-depth knowledge of how to use FreeRTOS, it will also help       *

-     *    the FreeRTOS project to continue with its mission of providing     *

-     *    professional grade, cross platform, de facto standard solutions    *

-     *    for microcontrollers - completely free of charge!                  *

-     *                                                                       *

-     *    >>> See http://www.FreeRTOS.org/Documentation for details. <<<     *

-     *                                                                       *

-     *    Thank you for using FreeRTOS, and thank you for your support!      *

-     *                                                                       *

-    ***************************************************************************

-

+    VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

 

     This file is part of the FreeRTOS distribution.

 

     FreeRTOS is free software; you can redistribute it and/or modify it under

     the terms of the GNU General Public License (version 2) as published by the

-    Free Software Foundation AND MODIFIED BY the FreeRTOS exception.

-    >>>NOTE<<< The modification to the GPL is included to allow you to

-    distribute a combined work that includes FreeRTOS without being obliged to

-    provide the source code for proprietary components outside of the FreeRTOS

-    kernel.  FreeRTOS is distributed in the hope that it will be useful, but

-    WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY

-    or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License for

-    more details. You should have received a copy of the GNU General Public

-    License and the FreeRTOS license exception along with FreeRTOS; if not it

-    can be viewed here: http://www.freertos.org/a00114.html and also obtained

-    by writing to Richard Barry, contact details for whom are available on the

-    FreeRTOS WEB site.

+    Free Software Foundation >>!AND MODIFIED BY!<< the FreeRTOS exception.

+

+    ***************************************************************************

+    >>!   NOTE: The modification to the GPL is included to allow you to     !<<

+    >>!   distribute a combined work that includes FreeRTOS without being   !<<

+    >>!   obliged to provide the source code for proprietary components     !<<

+    >>!   outside of the FreeRTOS kernel.                                   !<<

+    ***************************************************************************

+

+    FreeRTOS is distributed in the hope that it will be useful, but WITHOUT ANY

+    WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS

+    FOR A PARTICULAR PURPOSE.  Full license text is available on the following

+    link: http://www.freertos.org/a00114.html

+

+    ***************************************************************************

+     *                                                                       *

+     *    FreeRTOS provides completely free yet professionally developed,    *

+     *    robust, strictly quality controlled, supported, and cross          *

+     *    platform software that is more than just the market leader, it     *

+     *    is the industry's de facto standard.                               *

+     *                                                                       *

+     *    Help yourself get started quickly while simultaneously helping     *

+     *    to support the FreeRTOS project by purchasing a FreeRTOS           *

+     *    tutorial book, reference manual, or both:                          *

+     *    http://www.FreeRTOS.org/Documentation                              *

+     *                                                                       *

+    ***************************************************************************

+

+    http://www.FreeRTOS.org/FAQHelp.html - Having a problem?  Start by reading

+    the FAQ page "My application does not run, what could be wrong?".  Have you

+    defined configASSERT()?

+

+    http://www.FreeRTOS.org/support - In return for receiving this top quality

+    embedded software for free we request you assist our global community by

+    participating in the support forum.

+

+    http://www.FreeRTOS.org/training - Investing in training allows your team to

+    be as productive as possible as early as possible.  Now you can receive

+    FreeRTOS training directly from Richard Barry, CEO of Real Time Engineers

+    Ltd, and the world's leading authority on the world's leading RTOS.

+

+    http://www.FreeRTOS.org/plus - A selection of FreeRTOS ecosystem products,

+    including FreeRTOS+Trace - an indispensable productivity tool, a DOS

+    compatible FAT file system, and our tiny thread aware UDP/IP stack.

+

+    http://www.FreeRTOS.org/labs - Where new FreeRTOS products go to incubate.

+    Come and try FreeRTOS+TCP, our new open source TCP/IP stack for FreeRTOS.

+

+    http://www.OpenRTOS.com - Real Time Engineers ltd. license FreeRTOS to High

+    Integrity Systems ltd. to sell under the OpenRTOS brand.  Low cost OpenRTOS

+    licenses offer ticketed support, indemnification and commercial middleware.

+

+    http://www.SafeRTOS.com - High Integrity Systems also provide a safety

+    engineered and independently SIL3 certified version for use in safety and

+    mission critical applications that require provable dependability.

 

     1 tab == 4 spaces!

-

-    http://www.FreeRTOS.org - Documentation, latest information, license and

-    contact details.

-

-    http://www.SafeRTOS.com - A version that is certified for use in safety

-    critical systems.

-

-    http://www.OpenRTOS.com - Commercial support, development, porting,

-    licensing and training services.

 */

 

 /* Standard includes. */

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 80e840f..78d120a 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,54 +1,70 @@
 /*

-    FreeRTOS V7.0.2 - Copyright (C) 2011 Real Time Engineers Ltd.

-	

+    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    All rights reserved

 

-    ***************************************************************************

-     *                                                                       *

-     *    FreeRTOS tutorial books are available in pdf and paperback.        *

-     *    Complete, revised, and edited pdf reference manuals are also       *

-     *    available.                                                         *

-     *                                                                       *

-     *    Purchasing FreeRTOS documentation will not only help you, by       *

-     *    ensuring you get running as quickly as possible and with an        *

-     *    in-depth knowledge of how to use FreeRTOS, it will also help       *

-     *    the FreeRTOS project to continue with its mission of providing     *

-     *    professional grade, cross platform, de facto standard solutions    *

-     *    for microcontrollers - completely free of charge!                  *

-     *                                                                       *

-     *    >>> See http://www.FreeRTOS.org/Documentation for details. <<<     *

-     *                                                                       *

-     *    Thank you for using FreeRTOS, and thank you for your support!      *

-     *                                                                       *

-    ***************************************************************************

-

+    VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

 

     This file is part of the FreeRTOS distribution.

 

     FreeRTOS is free software; you can redistribute it and/or modify it under

     the terms of the GNU General Public License (version 2) as published by the

-    Free Software Foundation AND MODIFIED BY the FreeRTOS exception.

-    >>>NOTE<<< The modification to the GPL is included to allow you to

-    distribute a combined work that includes FreeRTOS without being obliged to

-    provide the source code for proprietary components outside of the FreeRTOS

-    kernel.  FreeRTOS is distributed in the hope that it will be useful, but

-    WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY

-    or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License for

-    more details. You should have received a copy of the GNU General Public

-    License and the FreeRTOS license exception along with FreeRTOS; if not it

-    can be viewed here: http://www.freertos.org/a00114.html and also obtained

-    by writing to Richard Barry, contact details for whom are available on the

-    FreeRTOS WEB site.

+    Free Software Foundation >>!AND MODIFIED BY!<< the FreeRTOS exception.

+

+    ***************************************************************************

+    >>!   NOTE: The modification to the GPL is included to allow you to     !<<

+    >>!   distribute a combined work that includes FreeRTOS without being   !<<

+    >>!   obliged to provide the source code for proprietary components     !<<

+    >>!   outside of the FreeRTOS kernel.                                   !<<

+    ***************************************************************************

+

+    FreeRTOS is distributed in the hope that it will be useful, but WITHOUT ANY

+    WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS

+    FOR A PARTICULAR PURPOSE.  Full license text is available on the following

+    link: http://www.freertos.org/a00114.html

+

+    ***************************************************************************

+     *                                                                       *

+     *    FreeRTOS provides completely free yet professionally developed,    *

+     *    robust, strictly quality controlled, supported, and cross          *

+     *    platform software that is more than just the market leader, it     *

+     *    is the industry's de facto standard.                               *

+     *                                                                       *

+     *    Help yourself get started quickly while simultaneously helping     *

+     *    to support the FreeRTOS project by purchasing a FreeRTOS           *

+     *    tutorial book, reference manual, or both:                          *

+     *    http://www.FreeRTOS.org/Documentation                              *

+     *                                                                       *

+    ***************************************************************************

+

+    http://www.FreeRTOS.org/FAQHelp.html - Having a problem?  Start by reading

+    the FAQ page "My application does not run, what could be wrong?".  Have you

+    defined configASSERT()?

+

+    http://www.FreeRTOS.org/support - In return for receiving this top quality

+    embedded software for free we request you assist our global community by

+    participating in the support forum.

+

+    http://www.FreeRTOS.org/training - Investing in training allows your team to

+    be as productive as possible as early as possible.  Now you can receive

+    FreeRTOS training directly from Richard Barry, CEO of Real Time Engineers

+    Ltd, and the world's leading authority on the world's leading RTOS.

+

+    http://www.FreeRTOS.org/plus - A selection of FreeRTOS ecosystem products,

+    including FreeRTOS+Trace - an indispensable productivity tool, a DOS

+    compatible FAT file system, and our tiny thread aware UDP/IP stack.

+

+    http://www.FreeRTOS.org/labs - Where new FreeRTOS products go to incubate.

+    Come and try FreeRTOS+TCP, our new open source TCP/IP stack for FreeRTOS.

+

+    http://www.OpenRTOS.com - Real Time Engineers ltd. license FreeRTOS to High

+    Integrity Systems ltd. to sell under the OpenRTOS brand.  Low cost OpenRTOS

+    licenses offer ticketed support, indemnification and commercial middleware.

+

+    http://www.SafeRTOS.com - High Integrity Systems also provide a safety

+    engineered and independently SIL3 certified version for use in safety and

+    mission critical applications that require provable dependability.

 

     1 tab == 4 spaces!

-

-    http://www.FreeRTOS.org - Documentation, latest information, license and

-    contact details.

-

-    http://www.SafeRTOS.com - A version that is certified for use in safety

-    critical systems.

-

-    http://www.OpenRTOS.com - Commercial support, development, porting,

-    licensing and training services.

 */

 

 /* Standard includes. */

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 cf6fd02..7b54fe7 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,62 +1,78 @@
 /*

-    FreeRTOS V7.0.1 - Copyright (C) 2011 Real Time Engineers Ltd.

-	

+    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    All rights reserved

 

-    ***************************************************************************

-     *                                                                       *

-     *    FreeRTOS tutorial books are available in pdf and paperback.        *

-     *    Complete, revised, and edited pdf reference manuals are also       *

-     *    available.                                                         *

-     *                                                                       *

-     *    Purchasing FreeRTOS documentation will not only help you, by       *

-     *    ensuring you get running as quickly as possible and with an        *

-     *    in-depth knowledge of how to use FreeRTOS, it will also help       *

-     *    the FreeRTOS project to continue with its mission of providing     *

-     *    professional grade, cross platform, de facto standard solutions    *

-     *    for microcontrollers - completely free of charge!                  *

-     *                                                                       *

-     *    >>> See http://www.FreeRTOS.org/Documentation for details. <<<     *

-     *                                                                       *

-     *    Thank you for using FreeRTOS, and thank you for your support!      *

-     *                                                                       *

-    ***************************************************************************

-

+    VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

 

     This file is part of the FreeRTOS distribution.

 

     FreeRTOS is free software; you can redistribute it and/or modify it under

     the terms of the GNU General Public License (version 2) as published by the

-    Free Software Foundation AND MODIFIED BY the FreeRTOS exception.

-    >>>NOTE<<< The modification to the GPL is included to allow you to

-    distribute a combined work that includes FreeRTOS without being obliged to

-    provide the source code for proprietary components outside of the FreeRTOS

-    kernel.  FreeRTOS is distributed in the hope that it will be useful, but

-    WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY

-    or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License for

-    more details. You should have received a copy of the GNU General Public

-    License and the FreeRTOS license exception along with FreeRTOS; if not it

-    can be viewed here: http://www.freertos.org/a00114.html and also obtained

-    by writing to Richard Barry, contact details for whom are available on the

-    FreeRTOS WEB site.

+    Free Software Foundation >>!AND MODIFIED BY!<< the FreeRTOS exception.

+

+    ***************************************************************************

+    >>!   NOTE: The modification to the GPL is included to allow you to     !<<

+    >>!   distribute a combined work that includes FreeRTOS without being   !<<

+    >>!   obliged to provide the source code for proprietary components     !<<

+    >>!   outside of the FreeRTOS kernel.                                   !<<

+    ***************************************************************************

+

+    FreeRTOS is distributed in the hope that it will be useful, but WITHOUT ANY

+    WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS

+    FOR A PARTICULAR PURPOSE.  Full license text is available on the following

+    link: http://www.freertos.org/a00114.html

+

+    ***************************************************************************

+     *                                                                       *

+     *    FreeRTOS provides completely free yet professionally developed,    *

+     *    robust, strictly quality controlled, supported, and cross          *

+     *    platform software that is more than just the market leader, it     *

+     *    is the industry's de facto standard.                               *

+     *                                                                       *

+     *    Help yourself get started quickly while simultaneously helping     *

+     *    to support the FreeRTOS project by purchasing a FreeRTOS           *

+     *    tutorial book, reference manual, or both:                          *

+     *    http://www.FreeRTOS.org/Documentation                              *

+     *                                                                       *

+    ***************************************************************************

+

+    http://www.FreeRTOS.org/FAQHelp.html - Having a problem?  Start by reading

+    the FAQ page "My application does not run, what could be wrong?".  Have you

+    defined configASSERT()?

+

+    http://www.FreeRTOS.org/support - In return for receiving this top quality

+    embedded software for free we request you assist our global community by

+    participating in the support forum.

+

+    http://www.FreeRTOS.org/training - Investing in training allows your team to

+    be as productive as possible as early as possible.  Now you can receive

+    FreeRTOS training directly from Richard Barry, CEO of Real Time Engineers

+    Ltd, and the world's leading authority on the world's leading RTOS.

+

+    http://www.FreeRTOS.org/plus - A selection of FreeRTOS ecosystem products,

+    including FreeRTOS+Trace - an indispensable productivity tool, a DOS

+    compatible FAT file system, and our tiny thread aware UDP/IP stack.

+

+    http://www.FreeRTOS.org/labs - Where new FreeRTOS products go to incubate.

+    Come and try FreeRTOS+TCP, our new open source TCP/IP stack for FreeRTOS.

+

+    http://www.OpenRTOS.com - Real Time Engineers ltd. license FreeRTOS to High

+    Integrity Systems ltd. to sell under the OpenRTOS brand.  Low cost OpenRTOS

+    licenses offer ticketed support, indemnification and commercial middleware.

+

+    http://www.SafeRTOS.com - High Integrity Systems also provide a safety

+    engineered and independently SIL3 certified version for use in safety and

+    mission critical applications that require provable dependability.

 

     1 tab == 4 spaces!

+*/

+#ifndef LWIP_APPS_H

+#define LWIP_APPS_H

 

-    http://www.FreeRTOS.org - Documentation, latest information, license and

-    contact details.

+/* 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 );

 

-    http://www.SafeRTOS.com - A version that is certified for use in safety

-    critical systems.

+#endif /* LWIP_APPS_H */

 

-    http://www.OpenRTOS.com - Commercial support, development, porting,

-    licensing and training services.

-*/
-#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/MicroBlaze_Kintex7_EthernetLite/RTOSDemo/src/lwIP_Demo/main_lwIP.c b/FreeRTOS/Demo/MicroBlaze_Kintex7_EthernetLite/RTOSDemo/src/lwIP_Demo/main_lwIP.c
index b7b8e04..ac677b1 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,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Demo/MicroBlaze_Kintex7_EthernetLite/RTOSDemo/src/main.c b/FreeRTOS/Demo/MicroBlaze_Kintex7_EthernetLite/RTOSDemo/src/main.c
index 4ec3d72..ef29562 100644
--- a/FreeRTOS/Demo/MicroBlaze_Kintex7_EthernetLite/RTOSDemo/src/main.c
+++ b/FreeRTOS/Demo/MicroBlaze_Kintex7_EthernetLite/RTOSDemo/src/main.c
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Demo/MicroBlaze_Kintex7_EthernetLite/RTOSDemo/src/serial.c b/FreeRTOS/Demo/MicroBlaze_Kintex7_EthernetLite/RTOSDemo/src/serial.c
index a3fa5a0..fcfad97 100644
--- a/FreeRTOS/Demo/MicroBlaze_Kintex7_EthernetLite/RTOSDemo/src/serial.c
+++ b/FreeRTOS/Demo/MicroBlaze_Kintex7_EthernetLite/RTOSDemo/src/serial.c
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Demo/MicroBlaze_Spartan-6_EthernetLite/ReadMe.txt b/FreeRTOS/Demo/MicroBlaze_Spartan-6_EthernetLite/ReadMe.txt
index 305bd35..93e4e07 100644
--- a/FreeRTOS/Demo/MicroBlaze_Spartan-6_EthernetLite/ReadMe.txt
+++ b/FreeRTOS/Demo/MicroBlaze_Spartan-6_EthernetLite/ReadMe.txt
@@ -1,6 +1,6 @@
 The project from this directory has been superseded by the project documented

 on the following page: http://www.freertos.org/RTOS-Xilinx-Microblaze-KC705.html

 

-If you need the demo that used to be in this directory then download FreeRTOS V8.2.1

+If you need the demo that used to be in this directory then download FreeRTOS V8.2.2

 from http://sourceforge.net/projects/freertos/files/FreeRTOS/

 

diff --git a/FreeRTOS/Demo/NEC_78K0R_IAR/ButtonISR.s26 b/FreeRTOS/Demo/NEC_78K0R_IAR/ButtonISR.s26
index d815d90..b2c5413 100644
--- a/FreeRTOS/Demo/NEC_78K0R_IAR/ButtonISR.s26
+++ b/FreeRTOS/Demo/NEC_78K0R_IAR/ButtonISR.s26
@@ -1,5 +1,5 @@
 ;/*

-;    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+;    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

 ;	

 ;

 ;    ***************************************************************************

diff --git a/FreeRTOS/Demo/NEC_78K0R_IAR/ButtonTask.c b/FreeRTOS/Demo/NEC_78K0R_IAR/ButtonTask.c
index 1c587ac..89947fa 100644
--- a/FreeRTOS/Demo/NEC_78K0R_IAR/ButtonTask.c
+++ b/FreeRTOS/Demo/NEC_78K0R_IAR/ButtonTask.c
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Demo/NEC_78K0R_IAR/FreeRTOSConfig.h b/FreeRTOS/Demo/NEC_78K0R_IAR/FreeRTOSConfig.h
index 9d13cd2..20674de 100644
--- a/FreeRTOS/Demo/NEC_78K0R_IAR/FreeRTOSConfig.h
+++ b/FreeRTOS/Demo/NEC_78K0R_IAR/FreeRTOSConfig.h
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Demo/NEC_78K0R_IAR/RegTest.s26 b/FreeRTOS/Demo/NEC_78K0R_IAR/RegTest.s26
index bb59abe..36895fd 100644
--- a/FreeRTOS/Demo/NEC_78K0R_IAR/RegTest.s26
+++ b/FreeRTOS/Demo/NEC_78K0R_IAR/RegTest.s26
@@ -1,5 +1,5 @@
 ;/*

-;    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+;    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

 ;	

 ;

 ;    ***************************************************************************

diff --git a/FreeRTOS/Demo/NEC_78K0R_IAR/main.c b/FreeRTOS/Demo/NEC_78K0R_IAR/main.c
index 9d3e570..9b5f084 100644
--- a/FreeRTOS/Demo/NEC_78K0R_IAR/main.c
+++ b/FreeRTOS/Demo/NEC_78K0R_IAR/main.c
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Demo/NEC_V850ES_IAR/FreeRTOSConfig.h b/FreeRTOS/Demo/NEC_V850ES_IAR/FreeRTOSConfig.h
index ae53441..48dc42f 100644
--- a/FreeRTOS/Demo/NEC_V850ES_IAR/FreeRTOSConfig.h
+++ b/FreeRTOS/Demo/NEC_V850ES_IAR/FreeRTOSConfig.h
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Demo/NEC_V850ES_IAR/LowLevelInit/LowLevelInit.c b/FreeRTOS/Demo/NEC_V850ES_IAR/LowLevelInit/LowLevelInit.c
index 92e13e3..2476db9 100644
--- a/FreeRTOS/Demo/NEC_V850ES_IAR/LowLevelInit/LowLevelInit.c
+++ b/FreeRTOS/Demo/NEC_V850ES_IAR/LowLevelInit/LowLevelInit.c
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Demo/NEC_V850ES_IAR/LowLevelInit/LowLevelInit_Fx3.c b/FreeRTOS/Demo/NEC_V850ES_IAR/LowLevelInit/LowLevelInit_Fx3.c
index 5c19b38..4fc1322 100644
--- a/FreeRTOS/Demo/NEC_V850ES_IAR/LowLevelInit/LowLevelInit_Fx3.c
+++ b/FreeRTOS/Demo/NEC_V850ES_IAR/LowLevelInit/LowLevelInit_Fx3.c
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Demo/NEC_V850ES_IAR/LowLevelInit/LowLevelInit_Hx2.c b/FreeRTOS/Demo/NEC_V850ES_IAR/LowLevelInit/LowLevelInit_Hx2.c
index 8379f14..358a103 100644
--- a/FreeRTOS/Demo/NEC_V850ES_IAR/LowLevelInit/LowLevelInit_Hx2.c
+++ b/FreeRTOS/Demo/NEC_V850ES_IAR/LowLevelInit/LowLevelInit_Hx2.c
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

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 5bfec74..f20fbb8 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,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

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 a203e4d..4f3ca5c 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,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Demo/NEC_V850ES_IAR/RegTest.s85 b/FreeRTOS/Demo/NEC_V850ES_IAR/RegTest.s85
index 8c8dbeb..99f49cb 100644
--- a/FreeRTOS/Demo/NEC_V850ES_IAR/RegTest.s85
+++ b/FreeRTOS/Demo/NEC_V850ES_IAR/RegTest.s85
@@ -1,5 +1,5 @@
 ;/*

-;    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+;    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

 ;	

 ;

 ;    ***************************************************************************

diff --git a/FreeRTOS/Demo/NEC_V850ES_IAR/main.c b/FreeRTOS/Demo/NEC_V850ES_IAR/main.c
index 0b4cc44..ca3cddd 100644
--- a/FreeRTOS/Demo/NEC_V850ES_IAR/main.c
+++ b/FreeRTOS/Demo/NEC_V850ES_IAR/main.c
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Demo/NEC_V850ES_IAR/serial/serial.c b/FreeRTOS/Demo/NEC_V850ES_IAR/serial/serial.c
index 2b7794b..c1923c8 100644
--- a/FreeRTOS/Demo/NEC_V850ES_IAR/serial/serial.c
+++ b/FreeRTOS/Demo/NEC_V850ES_IAR/serial/serial.c
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Demo/NiosII_CycloneIII_DBC3C40_GCC/RTOSDemo/FreeRTOSConfig.h b/FreeRTOS/Demo/NiosII_CycloneIII_DBC3C40_GCC/RTOSDemo/FreeRTOSConfig.h
index 136e9c5..39e5e32 100644
--- a/FreeRTOS/Demo/NiosII_CycloneIII_DBC3C40_GCC/RTOSDemo/FreeRTOSConfig.h
+++ b/FreeRTOS/Demo/NiosII_CycloneIII_DBC3C40_GCC/RTOSDemo/FreeRTOSConfig.h
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

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 2ac3655..541fc1a 100644
--- a/FreeRTOS/Demo/NiosII_CycloneIII_DBC3C40_GCC/RTOSDemo/ParTest/ParTest.c
+++ b/FreeRTOS/Demo/NiosII_CycloneIII_DBC3C40_GCC/RTOSDemo/ParTest/ParTest.c
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Demo/NiosII_CycloneIII_DBC3C40_GCC/RTOSDemo/main.c b/FreeRTOS/Demo/NiosII_CycloneIII_DBC3C40_GCC/RTOSDemo/main.c
index e302393..6823348 100644
--- a/FreeRTOS/Demo/NiosII_CycloneIII_DBC3C40_GCC/RTOSDemo/main.c
+++ b/FreeRTOS/Demo/NiosII_CycloneIII_DBC3C40_GCC/RTOSDemo/main.c
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Demo/NiosII_CycloneIII_DBC3C40_GCC/RTOSDemo/serial.c b/FreeRTOS/Demo/NiosII_CycloneIII_DBC3C40_GCC/RTOSDemo/serial.c
index 6d78d2a..f1ae68c 100644
--- a/FreeRTOS/Demo/NiosII_CycloneIII_DBC3C40_GCC/RTOSDemo/serial.c
+++ b/FreeRTOS/Demo/NiosII_CycloneIII_DBC3C40_GCC/RTOSDemo/serial.c
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Demo/PC/FRConfig.h b/FreeRTOS/Demo/PC/FRConfig.h
index 3838ed9..3606eb0 100644
--- a/FreeRTOS/Demo/PC/FRConfig.h
+++ b/FreeRTOS/Demo/PC/FRConfig.h
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Demo/PC/FileIO/fileIO.c b/FreeRTOS/Demo/PC/FileIO/fileIO.c
index 1a7c7bb..7beca39 100644
--- a/FreeRTOS/Demo/PC/FileIO/fileIO.c
+++ b/FreeRTOS/Demo/PC/FileIO/fileIO.c
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Demo/PC/FreeRTOSConfig.h b/FreeRTOS/Demo/PC/FreeRTOSConfig.h
index 77c3709..daaddf9 100644
--- a/FreeRTOS/Demo/PC/FreeRTOSConfig.h
+++ b/FreeRTOS/Demo/PC/FreeRTOSConfig.h
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Demo/PC/ParTest/ParTest.c b/FreeRTOS/Demo/PC/ParTest/ParTest.c
index 35666ed..923f847 100644
--- a/FreeRTOS/Demo/PC/ParTest/ParTest.c
+++ b/FreeRTOS/Demo/PC/ParTest/ParTest.c
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Demo/PC/main.c b/FreeRTOS/Demo/PC/main.c
index 8ca2f9e..0296b35 100644
--- a/FreeRTOS/Demo/PC/main.c
+++ b/FreeRTOS/Demo/PC/main.c
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Demo/PC/serial/serial.c b/FreeRTOS/Demo/PC/serial/serial.c
index aeefd64..f548e04 100644
--- a/FreeRTOS/Demo/PC/serial/serial.c
+++ b/FreeRTOS/Demo/PC/serial/serial.c
@@ -6,7 +6,7 @@
 */

 

 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Demo/PIC18_MPLAB/FreeRTOSConfig.h b/FreeRTOS/Demo/PIC18_MPLAB/FreeRTOSConfig.h
index a0a6000..7ddaf46 100644
--- a/FreeRTOS/Demo/PIC18_MPLAB/FreeRTOSConfig.h
+++ b/FreeRTOS/Demo/PIC18_MPLAB/FreeRTOSConfig.h
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Demo/PIC18_MPLAB/ParTest/ParTest.c b/FreeRTOS/Demo/PIC18_MPLAB/ParTest/ParTest.c
index 511a7d3..63b1578 100644
--- a/FreeRTOS/Demo/PIC18_MPLAB/ParTest/ParTest.c
+++ b/FreeRTOS/Demo/PIC18_MPLAB/ParTest/ParTest.c
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Demo/PIC18_MPLAB/main1.c b/FreeRTOS/Demo/PIC18_MPLAB/main1.c
index 0a339c5..02db799 100644
--- a/FreeRTOS/Demo/PIC18_MPLAB/main1.c
+++ b/FreeRTOS/Demo/PIC18_MPLAB/main1.c
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Demo/PIC18_MPLAB/main2.c b/FreeRTOS/Demo/PIC18_MPLAB/main2.c
index 6c924eb..0ae248d 100644
--- a/FreeRTOS/Demo/PIC18_MPLAB/main2.c
+++ b/FreeRTOS/Demo/PIC18_MPLAB/main2.c
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Demo/PIC18_MPLAB/main3.c b/FreeRTOS/Demo/PIC18_MPLAB/main3.c
index 7350d42..d607b3b 100644
--- a/FreeRTOS/Demo/PIC18_MPLAB/main3.c
+++ b/FreeRTOS/Demo/PIC18_MPLAB/main3.c
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Demo/PIC18_MPLAB/serial/serial.c b/FreeRTOS/Demo/PIC18_MPLAB/serial/serial.c
index 858ad32..f7d70d0 100644
--- a/FreeRTOS/Demo/PIC18_MPLAB/serial/serial.c
+++ b/FreeRTOS/Demo/PIC18_MPLAB/serial/serial.c
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Demo/PIC18_WizC/Demo1/FreeRTOSConfig.h b/FreeRTOS/Demo/PIC18_WizC/Demo1/FreeRTOSConfig.h
index 82a717e..a50bfe5 100644
--- a/FreeRTOS/Demo/PIC18_WizC/Demo1/FreeRTOSConfig.h
+++ b/FreeRTOS/Demo/PIC18_WizC/Demo1/FreeRTOSConfig.h
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Demo/PIC18_WizC/Demo1/WIZCmake.h b/FreeRTOS/Demo/PIC18_WizC/Demo1/WIZCmake.h
index 59f4a03..b4defc3 100644
--- a/FreeRTOS/Demo/PIC18_WizC/Demo1/WIZCmake.h
+++ b/FreeRTOS/Demo/PIC18_WizC/Demo1/WIZCmake.h
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Demo/PIC18_WizC/Demo1/fuses.c b/FreeRTOS/Demo/PIC18_WizC/Demo1/fuses.c
index 7bca72f..e481606 100644
--- a/FreeRTOS/Demo/PIC18_WizC/Demo1/fuses.c
+++ b/FreeRTOS/Demo/PIC18_WizC/Demo1/fuses.c
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Demo/PIC18_WizC/Demo1/interrupt.c b/FreeRTOS/Demo/PIC18_WizC/Demo1/interrupt.c
index e21a13f..3c0713f 100644
--- a/FreeRTOS/Demo/PIC18_WizC/Demo1/interrupt.c
+++ b/FreeRTOS/Demo/PIC18_WizC/Demo1/interrupt.c
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Demo/PIC18_WizC/Demo1/main.c b/FreeRTOS/Demo/PIC18_WizC/Demo1/main.c
index 43a5938..45d8f37 100644
--- a/FreeRTOS/Demo/PIC18_WizC/Demo1/main.c
+++ b/FreeRTOS/Demo/PIC18_WizC/Demo1/main.c
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Demo/PIC18_WizC/Demo2/FreeRTOSConfig.h b/FreeRTOS/Demo/PIC18_WizC/Demo2/FreeRTOSConfig.h
index 6ef2e94..285e6e4 100644
--- a/FreeRTOS/Demo/PIC18_WizC/Demo2/FreeRTOSConfig.h
+++ b/FreeRTOS/Demo/PIC18_WizC/Demo2/FreeRTOSConfig.h
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Demo/PIC18_WizC/Demo2/WIZCmake.h b/FreeRTOS/Demo/PIC18_WizC/Demo2/WIZCmake.h
index 9a6bd90..7bc8b44 100644
--- a/FreeRTOS/Demo/PIC18_WizC/Demo2/WIZCmake.h
+++ b/FreeRTOS/Demo/PIC18_WizC/Demo2/WIZCmake.h
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Demo/PIC18_WizC/Demo2/fuses.c b/FreeRTOS/Demo/PIC18_WizC/Demo2/fuses.c
index 7bca72f..e481606 100644
--- a/FreeRTOS/Demo/PIC18_WizC/Demo2/fuses.c
+++ b/FreeRTOS/Demo/PIC18_WizC/Demo2/fuses.c
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Demo/PIC18_WizC/Demo2/interrupt.c b/FreeRTOS/Demo/PIC18_WizC/Demo2/interrupt.c
index fe502b2..c8e45fa 100644
--- a/FreeRTOS/Demo/PIC18_WizC/Demo2/interrupt.c
+++ b/FreeRTOS/Demo/PIC18_WizC/Demo2/interrupt.c
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Demo/PIC18_WizC/Demo2/main.c b/FreeRTOS/Demo/PIC18_WizC/Demo2/main.c
index 3bf8835..69ba0e6 100644
--- a/FreeRTOS/Demo/PIC18_WizC/Demo2/main.c
+++ b/FreeRTOS/Demo/PIC18_WizC/Demo2/main.c
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Demo/PIC18_WizC/Demo3/FreeRTOSConfig.h b/FreeRTOS/Demo/PIC18_WizC/Demo3/FreeRTOSConfig.h
index 393da05..9915ae5 100644
--- a/FreeRTOS/Demo/PIC18_WizC/Demo3/FreeRTOSConfig.h
+++ b/FreeRTOS/Demo/PIC18_WizC/Demo3/FreeRTOSConfig.h
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Demo/PIC18_WizC/Demo3/WIZCmake.h b/FreeRTOS/Demo/PIC18_WizC/Demo3/WIZCmake.h
index 9a6bd90..7bc8b44 100644
--- a/FreeRTOS/Demo/PIC18_WizC/Demo3/WIZCmake.h
+++ b/FreeRTOS/Demo/PIC18_WizC/Demo3/WIZCmake.h
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Demo/PIC18_WizC/Demo3/fuses.c b/FreeRTOS/Demo/PIC18_WizC/Demo3/fuses.c
index 7bca72f..e481606 100644
--- a/FreeRTOS/Demo/PIC18_WizC/Demo3/fuses.c
+++ b/FreeRTOS/Demo/PIC18_WizC/Demo3/fuses.c
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Demo/PIC18_WizC/Demo3/interrupt.c b/FreeRTOS/Demo/PIC18_WizC/Demo3/interrupt.c
index fe502b2..c8e45fa 100644
--- a/FreeRTOS/Demo/PIC18_WizC/Demo3/interrupt.c
+++ b/FreeRTOS/Demo/PIC18_WizC/Demo3/interrupt.c
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Demo/PIC18_WizC/Demo3/main.c b/FreeRTOS/Demo/PIC18_WizC/Demo3/main.c
index 0075c17..c6afc87 100644
--- a/FreeRTOS/Demo/PIC18_WizC/Demo3/main.c
+++ b/FreeRTOS/Demo/PIC18_WizC/Demo3/main.c
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Demo/PIC18_WizC/Demo4/FreeRTOSConfig.h b/FreeRTOS/Demo/PIC18_WizC/Demo4/FreeRTOSConfig.h
index 0ed265b..3d5c7b1 100644
--- a/FreeRTOS/Demo/PIC18_WizC/Demo4/FreeRTOSConfig.h
+++ b/FreeRTOS/Demo/PIC18_WizC/Demo4/FreeRTOSConfig.h
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Demo/PIC18_WizC/Demo4/WIZCmake.h b/FreeRTOS/Demo/PIC18_WizC/Demo4/WIZCmake.h
index 9a6bd90..7bc8b44 100644
--- a/FreeRTOS/Demo/PIC18_WizC/Demo4/WIZCmake.h
+++ b/FreeRTOS/Demo/PIC18_WizC/Demo4/WIZCmake.h
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Demo/PIC18_WizC/Demo4/fuses.c b/FreeRTOS/Demo/PIC18_WizC/Demo4/fuses.c
index 7bca72f..e481606 100644
--- a/FreeRTOS/Demo/PIC18_WizC/Demo4/fuses.c
+++ b/FreeRTOS/Demo/PIC18_WizC/Demo4/fuses.c
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Demo/PIC18_WizC/Demo4/interrupt.c b/FreeRTOS/Demo/PIC18_WizC/Demo4/interrupt.c
index fe502b2..c8e45fa 100644
--- a/FreeRTOS/Demo/PIC18_WizC/Demo4/interrupt.c
+++ b/FreeRTOS/Demo/PIC18_WizC/Demo4/interrupt.c
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Demo/PIC18_WizC/Demo4/main.c b/FreeRTOS/Demo/PIC18_WizC/Demo4/main.c
index d049691..342cc56 100644
--- a/FreeRTOS/Demo/PIC18_WizC/Demo4/main.c
+++ b/FreeRTOS/Demo/PIC18_WizC/Demo4/main.c
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Demo/PIC18_WizC/Demo5/FreeRTOSConfig.h b/FreeRTOS/Demo/PIC18_WizC/Demo5/FreeRTOSConfig.h
index a50b7d9..85f4849 100644
--- a/FreeRTOS/Demo/PIC18_WizC/Demo5/FreeRTOSConfig.h
+++ b/FreeRTOS/Demo/PIC18_WizC/Demo5/FreeRTOSConfig.h
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Demo/PIC18_WizC/Demo5/WIZCmake.h b/FreeRTOS/Demo/PIC18_WizC/Demo5/WIZCmake.h
index 9a6bd90..7bc8b44 100644
--- a/FreeRTOS/Demo/PIC18_WizC/Demo5/WIZCmake.h
+++ b/FreeRTOS/Demo/PIC18_WizC/Demo5/WIZCmake.h
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Demo/PIC18_WizC/Demo5/fuses.c b/FreeRTOS/Demo/PIC18_WizC/Demo5/fuses.c
index 7bca72f..e481606 100644
--- a/FreeRTOS/Demo/PIC18_WizC/Demo5/fuses.c
+++ b/FreeRTOS/Demo/PIC18_WizC/Demo5/fuses.c
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Demo/PIC18_WizC/Demo5/interrupt.c b/FreeRTOS/Demo/PIC18_WizC/Demo5/interrupt.c
index fe502b2..c8e45fa 100644
--- a/FreeRTOS/Demo/PIC18_WizC/Demo5/interrupt.c
+++ b/FreeRTOS/Demo/PIC18_WizC/Demo5/interrupt.c
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Demo/PIC18_WizC/Demo5/main.c b/FreeRTOS/Demo/PIC18_WizC/Demo5/main.c
index 4e74e33..015d08b 100644
--- a/FreeRTOS/Demo/PIC18_WizC/Demo5/main.c
+++ b/FreeRTOS/Demo/PIC18_WizC/Demo5/main.c
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Demo/PIC18_WizC/Demo6/FreeRTOSConfig.h b/FreeRTOS/Demo/PIC18_WizC/Demo6/FreeRTOSConfig.h
index 5183ad5..95f3d4a 100644
--- a/FreeRTOS/Demo/PIC18_WizC/Demo6/FreeRTOSConfig.h
+++ b/FreeRTOS/Demo/PIC18_WizC/Demo6/FreeRTOSConfig.h
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Demo/PIC18_WizC/Demo6/WIZCmake.h b/FreeRTOS/Demo/PIC18_WizC/Demo6/WIZCmake.h
index 9a6bd90..7bc8b44 100644
--- a/FreeRTOS/Demo/PIC18_WizC/Demo6/WIZCmake.h
+++ b/FreeRTOS/Demo/PIC18_WizC/Demo6/WIZCmake.h
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Demo/PIC18_WizC/Demo6/fuses.c b/FreeRTOS/Demo/PIC18_WizC/Demo6/fuses.c
index 7bca72f..e481606 100644
--- a/FreeRTOS/Demo/PIC18_WizC/Demo6/fuses.c
+++ b/FreeRTOS/Demo/PIC18_WizC/Demo6/fuses.c
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Demo/PIC18_WizC/Demo6/interrupt.c b/FreeRTOS/Demo/PIC18_WizC/Demo6/interrupt.c
index fe502b2..c8e45fa 100644
--- a/FreeRTOS/Demo/PIC18_WizC/Demo6/interrupt.c
+++ b/FreeRTOS/Demo/PIC18_WizC/Demo6/interrupt.c
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Demo/PIC18_WizC/Demo6/main.c b/FreeRTOS/Demo/PIC18_WizC/Demo6/main.c
index cc51880..05c4bd2 100644
--- a/FreeRTOS/Demo/PIC18_WizC/Demo6/main.c
+++ b/FreeRTOS/Demo/PIC18_WizC/Demo6/main.c
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Demo/PIC18_WizC/Demo7/FreeRTOSConfig.h b/FreeRTOS/Demo/PIC18_WizC/Demo7/FreeRTOSConfig.h
index d2b581f..b7915da 100644
--- a/FreeRTOS/Demo/PIC18_WizC/Demo7/FreeRTOSConfig.h
+++ b/FreeRTOS/Demo/PIC18_WizC/Demo7/FreeRTOSConfig.h
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Demo/PIC18_WizC/Demo7/WIZCmake.h b/FreeRTOS/Demo/PIC18_WizC/Demo7/WIZCmake.h
index 9a6bd90..7bc8b44 100644
--- a/FreeRTOS/Demo/PIC18_WizC/Demo7/WIZCmake.h
+++ b/FreeRTOS/Demo/PIC18_WizC/Demo7/WIZCmake.h
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Demo/PIC18_WizC/Demo7/fuses.c b/FreeRTOS/Demo/PIC18_WizC/Demo7/fuses.c
index 7bca72f..e481606 100644
--- a/FreeRTOS/Demo/PIC18_WizC/Demo7/fuses.c
+++ b/FreeRTOS/Demo/PIC18_WizC/Demo7/fuses.c
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Demo/PIC18_WizC/Demo7/interrupt.c b/FreeRTOS/Demo/PIC18_WizC/Demo7/interrupt.c
index fe502b2..c8e45fa 100644
--- a/FreeRTOS/Demo/PIC18_WizC/Demo7/interrupt.c
+++ b/FreeRTOS/Demo/PIC18_WizC/Demo7/interrupt.c
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Demo/PIC18_WizC/Demo7/main.c b/FreeRTOS/Demo/PIC18_WizC/Demo7/main.c
index 1de389a..ac6bcb3 100644
--- a/FreeRTOS/Demo/PIC18_WizC/Demo7/main.c
+++ b/FreeRTOS/Demo/PIC18_WizC/Demo7/main.c
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Demo/PIC18_WizC/ParTest/ParTest.c b/FreeRTOS/Demo/PIC18_WizC/ParTest/ParTest.c
index 29dd2f8..a102bed 100644
--- a/FreeRTOS/Demo/PIC18_WizC/ParTest/ParTest.c
+++ b/FreeRTOS/Demo/PIC18_WizC/ParTest/ParTest.c
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Demo/PIC18_WizC/serial/isrSerialRx.c b/FreeRTOS/Demo/PIC18_WizC/serial/isrSerialRx.c
index dfb9b5f..76778a0 100644
--- a/FreeRTOS/Demo/PIC18_WizC/serial/isrSerialRx.c
+++ b/FreeRTOS/Demo/PIC18_WizC/serial/isrSerialRx.c
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Demo/PIC18_WizC/serial/isrSerialTx.c b/FreeRTOS/Demo/PIC18_WizC/serial/isrSerialTx.c
index fb30e1e..ebd416c 100644
--- a/FreeRTOS/Demo/PIC18_WizC/serial/isrSerialTx.c
+++ b/FreeRTOS/Demo/PIC18_WizC/serial/isrSerialTx.c
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Demo/PIC18_WizC/serial/serial.c b/FreeRTOS/Demo/PIC18_WizC/serial/serial.c
index 8f97d54..bee6a65 100644
--- a/FreeRTOS/Demo/PIC18_WizC/serial/serial.c
+++ b/FreeRTOS/Demo/PIC18_WizC/serial/serial.c
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Demo/PIC24_MPLAB/FreeRTOSConfig.h b/FreeRTOS/Demo/PIC24_MPLAB/FreeRTOSConfig.h
index 445f702..b67f777 100644
--- a/FreeRTOS/Demo/PIC24_MPLAB/FreeRTOSConfig.h
+++ b/FreeRTOS/Demo/PIC24_MPLAB/FreeRTOSConfig.h
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Demo/PIC24_MPLAB/ParTest/ParTest.c b/FreeRTOS/Demo/PIC24_MPLAB/ParTest/ParTest.c
index 8233568..09db728 100644
--- a/FreeRTOS/Demo/PIC24_MPLAB/ParTest/ParTest.c
+++ b/FreeRTOS/Demo/PIC24_MPLAB/ParTest/ParTest.c
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Demo/PIC24_MPLAB/lcd.c b/FreeRTOS/Demo/PIC24_MPLAB/lcd.c
index a5c0625..cedb1af 100644
--- a/FreeRTOS/Demo/PIC24_MPLAB/lcd.c
+++ b/FreeRTOS/Demo/PIC24_MPLAB/lcd.c
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Demo/PIC24_MPLAB/lcd.h b/FreeRTOS/Demo/PIC24_MPLAB/lcd.h
index 5e13e34..6bfb0905 100644
--- a/FreeRTOS/Demo/PIC24_MPLAB/lcd.h
+++ b/FreeRTOS/Demo/PIC24_MPLAB/lcd.h
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Demo/PIC24_MPLAB/main.c b/FreeRTOS/Demo/PIC24_MPLAB/main.c
index efe1003..8fdd1c8 100644
--- a/FreeRTOS/Demo/PIC24_MPLAB/main.c
+++ b/FreeRTOS/Demo/PIC24_MPLAB/main.c
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Demo/PIC24_MPLAB/serial/serial.c b/FreeRTOS/Demo/PIC24_MPLAB/serial/serial.c
index 3896739..948bad6 100644
--- a/FreeRTOS/Demo/PIC24_MPLAB/serial/serial.c
+++ b/FreeRTOS/Demo/PIC24_MPLAB/serial/serial.c
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Demo/PIC24_MPLAB/timertest.c b/FreeRTOS/Demo/PIC24_MPLAB/timertest.c
index c57bb82..e31900c 100644
--- a/FreeRTOS/Demo/PIC24_MPLAB/timertest.c
+++ b/FreeRTOS/Demo/PIC24_MPLAB/timertest.c
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Demo/PIC24_MPLAB/timertest.h b/FreeRTOS/Demo/PIC24_MPLAB/timertest.h
index a5d264c..3326d3d 100644
--- a/FreeRTOS/Demo/PIC24_MPLAB/timertest.h
+++ b/FreeRTOS/Demo/PIC24_MPLAB/timertest.h
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Demo/PIC32MX_MPLAB/ConfigPerformance.c b/FreeRTOS/Demo/PIC32MX_MPLAB/ConfigPerformance.c
index 1eecb90..91a89f1 100644
--- a/FreeRTOS/Demo/PIC32MX_MPLAB/ConfigPerformance.c
+++ b/FreeRTOS/Demo/PIC32MX_MPLAB/ConfigPerformance.c
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Demo/PIC32MX_MPLAB/ConfigPerformance.h b/FreeRTOS/Demo/PIC32MX_MPLAB/ConfigPerformance.h
index 627e1b9..003f9c7 100644
--- a/FreeRTOS/Demo/PIC32MX_MPLAB/ConfigPerformance.h
+++ b/FreeRTOS/Demo/PIC32MX_MPLAB/ConfigPerformance.h
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Demo/PIC32MX_MPLAB/FreeRTOSConfig.h b/FreeRTOS/Demo/PIC32MX_MPLAB/FreeRTOSConfig.h
index a6ef141..8595c36 100644
--- a/FreeRTOS/Demo/PIC32MX_MPLAB/FreeRTOSConfig.h
+++ b/FreeRTOS/Demo/PIC32MX_MPLAB/FreeRTOSConfig.h
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Demo/PIC32MX_MPLAB/IntQueueTimer.c b/FreeRTOS/Demo/PIC32MX_MPLAB/IntQueueTimer.c
index 11e73b0..8abd62e 100644
--- a/FreeRTOS/Demo/PIC32MX_MPLAB/IntQueueTimer.c
+++ b/FreeRTOS/Demo/PIC32MX_MPLAB/IntQueueTimer.c
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Demo/PIC32MX_MPLAB/IntQueueTimer.h b/FreeRTOS/Demo/PIC32MX_MPLAB/IntQueueTimer.h
index 77de772..fcf9f8c 100644
--- a/FreeRTOS/Demo/PIC32MX_MPLAB/IntQueueTimer.h
+++ b/FreeRTOS/Demo/PIC32MX_MPLAB/IntQueueTimer.h
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Demo/PIC32MX_MPLAB/IntQueueTimer_isr.S b/FreeRTOS/Demo/PIC32MX_MPLAB/IntQueueTimer_isr.S
index 330aaa7..781599c 100644
--- a/FreeRTOS/Demo/PIC32MX_MPLAB/IntQueueTimer_isr.S
+++ b/FreeRTOS/Demo/PIC32MX_MPLAB/IntQueueTimer_isr.S
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Demo/PIC32MX_MPLAB/ParTest/ParTest_Explorer16.c b/FreeRTOS/Demo/PIC32MX_MPLAB/ParTest/ParTest_Explorer16.c
index b43d3c4..baae533 100644
--- a/FreeRTOS/Demo/PIC32MX_MPLAB/ParTest/ParTest_Explorer16.c
+++ b/FreeRTOS/Demo/PIC32MX_MPLAB/ParTest/ParTest_Explorer16.c
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

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 8556c91..ecca2b7 100644
--- a/FreeRTOS/Demo/PIC32MX_MPLAB/ParTest/ParTest_USBII_Starter_Kit.c
+++ b/FreeRTOS/Demo/PIC32MX_MPLAB/ParTest/ParTest_USBII_Starter_Kit.c
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Demo/PIC32MX_MPLAB/RegisterTestTasks.S b/FreeRTOS/Demo/PIC32MX_MPLAB/RegisterTestTasks.S
index 844c324..125f6df 100644
--- a/FreeRTOS/Demo/PIC32MX_MPLAB/RegisterTestTasks.S
+++ b/FreeRTOS/Demo/PIC32MX_MPLAB/RegisterTestTasks.S
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Demo/PIC32MX_MPLAB/lcd.c b/FreeRTOS/Demo/PIC32MX_MPLAB/lcd.c
index 6e1b50c..790e334 100644
--- a/FreeRTOS/Demo/PIC32MX_MPLAB/lcd.c
+++ b/FreeRTOS/Demo/PIC32MX_MPLAB/lcd.c
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Demo/PIC32MX_MPLAB/lcd.h b/FreeRTOS/Demo/PIC32MX_MPLAB/lcd.h
index 5e13e34..6bfb0905 100644
--- a/FreeRTOS/Demo/PIC32MX_MPLAB/lcd.h
+++ b/FreeRTOS/Demo/PIC32MX_MPLAB/lcd.h
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Demo/PIC32MX_MPLAB/main.c b/FreeRTOS/Demo/PIC32MX_MPLAB/main.c
index b0fafb8..f660ef9 100644
--- a/FreeRTOS/Demo/PIC32MX_MPLAB/main.c
+++ b/FreeRTOS/Demo/PIC32MX_MPLAB/main.c
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Demo/PIC32MX_MPLAB/main_blinky.c b/FreeRTOS/Demo/PIC32MX_MPLAB/main_blinky.c
index a69e4f3..9262d46 100644
--- a/FreeRTOS/Demo/PIC32MX_MPLAB/main_blinky.c
+++ b/FreeRTOS/Demo/PIC32MX_MPLAB/main_blinky.c
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Demo/PIC32MX_MPLAB/main_full.c b/FreeRTOS/Demo/PIC32MX_MPLAB/main_full.c
index 5d90179..c014eca 100644
--- a/FreeRTOS/Demo/PIC32MX_MPLAB/main_full.c
+++ b/FreeRTOS/Demo/PIC32MX_MPLAB/main_full.c
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Demo/PIC32MX_MPLAB/serial/serial.c b/FreeRTOS/Demo/PIC32MX_MPLAB/serial/serial.c
index 1d8176b..b3e6634 100644
--- a/FreeRTOS/Demo/PIC32MX_MPLAB/serial/serial.c
+++ b/FreeRTOS/Demo/PIC32MX_MPLAB/serial/serial.c
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Demo/PIC32MX_MPLAB/timertest.c b/FreeRTOS/Demo/PIC32MX_MPLAB/timertest.c
index 17e292d..a25bc47 100644
--- a/FreeRTOS/Demo/PIC32MX_MPLAB/timertest.c
+++ b/FreeRTOS/Demo/PIC32MX_MPLAB/timertest.c
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Demo/PIC32MX_MPLAB/timertest.h b/FreeRTOS/Demo/PIC32MX_MPLAB/timertest.h
index a5d264c..3326d3d 100644
--- a/FreeRTOS/Demo/PIC32MX_MPLAB/timertest.h
+++ b/FreeRTOS/Demo/PIC32MX_MPLAB/timertest.h
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Demo/PIC32MX_MPLAB/timertest_isr.S b/FreeRTOS/Demo/PIC32MX_MPLAB/timertest_isr.S
index a30e619..30b4f28 100644
--- a/FreeRTOS/Demo/PIC32MX_MPLAB/timertest_isr.S
+++ b/FreeRTOS/Demo/PIC32MX_MPLAB/timertest_isr.S
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Demo/PIC32MZ_MPLAB/ConfigPerformance.c b/FreeRTOS/Demo/PIC32MZ_MPLAB/ConfigPerformance.c
index 814a94a..7fb1956 100644
--- a/FreeRTOS/Demo/PIC32MZ_MPLAB/ConfigPerformance.c
+++ b/FreeRTOS/Demo/PIC32MZ_MPLAB/ConfigPerformance.c
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Demo/PIC32MZ_MPLAB/ConfigPerformance.h b/FreeRTOS/Demo/PIC32MZ_MPLAB/ConfigPerformance.h
index 627e1b9..003f9c7 100644
--- a/FreeRTOS/Demo/PIC32MZ_MPLAB/ConfigPerformance.h
+++ b/FreeRTOS/Demo/PIC32MZ_MPLAB/ConfigPerformance.h
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Demo/PIC32MZ_MPLAB/FreeRTOSConfig.h b/FreeRTOS/Demo/PIC32MZ_MPLAB/FreeRTOSConfig.h
index e0382b3..894321b 100644
--- a/FreeRTOS/Demo/PIC32MZ_MPLAB/FreeRTOSConfig.h
+++ b/FreeRTOS/Demo/PIC32MZ_MPLAB/FreeRTOSConfig.h
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Demo/PIC32MZ_MPLAB/ISRTriggeredTask.c b/FreeRTOS/Demo/PIC32MZ_MPLAB/ISRTriggeredTask.c
index 95481f2..2ef0eb0 100644
--- a/FreeRTOS/Demo/PIC32MZ_MPLAB/ISRTriggeredTask.c
+++ b/FreeRTOS/Demo/PIC32MZ_MPLAB/ISRTriggeredTask.c
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Demo/PIC32MZ_MPLAB/ISRTriggeredTask_isr.S b/FreeRTOS/Demo/PIC32MZ_MPLAB/ISRTriggeredTask_isr.S
index 1141b78..3f5671a 100644
--- a/FreeRTOS/Demo/PIC32MZ_MPLAB/ISRTriggeredTask_isr.S
+++ b/FreeRTOS/Demo/PIC32MZ_MPLAB/ISRTriggeredTask_isr.S
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Demo/PIC32MZ_MPLAB/IntQueueTimer.c b/FreeRTOS/Demo/PIC32MZ_MPLAB/IntQueueTimer.c
index 11e73b0..8abd62e 100644
--- a/FreeRTOS/Demo/PIC32MZ_MPLAB/IntQueueTimer.c
+++ b/FreeRTOS/Demo/PIC32MZ_MPLAB/IntQueueTimer.c
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Demo/PIC32MZ_MPLAB/IntQueueTimer.h b/FreeRTOS/Demo/PIC32MZ_MPLAB/IntQueueTimer.h
index 77de772..fcf9f8c 100644
--- a/FreeRTOS/Demo/PIC32MZ_MPLAB/IntQueueTimer.h
+++ b/FreeRTOS/Demo/PIC32MZ_MPLAB/IntQueueTimer.h
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Demo/PIC32MZ_MPLAB/IntQueueTimer_isr.S b/FreeRTOS/Demo/PIC32MZ_MPLAB/IntQueueTimer_isr.S
index 48ed1a9..4dd944b 100644
--- a/FreeRTOS/Demo/PIC32MZ_MPLAB/IntQueueTimer_isr.S
+++ b/FreeRTOS/Demo/PIC32MZ_MPLAB/IntQueueTimer_isr.S
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Demo/PIC32MZ_MPLAB/ParTest/ParTest.c b/FreeRTOS/Demo/PIC32MZ_MPLAB/ParTest/ParTest.c
index b8eb2fc..f296d32 100644
--- a/FreeRTOS/Demo/PIC32MZ_MPLAB/ParTest/ParTest.c
+++ b/FreeRTOS/Demo/PIC32MZ_MPLAB/ParTest/ParTest.c
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Demo/PIC32MZ_MPLAB/RegisterTestTasks.S b/FreeRTOS/Demo/PIC32MZ_MPLAB/RegisterTestTasks.S
index 27ac940..a46e016 100644
--- a/FreeRTOS/Demo/PIC32MZ_MPLAB/RegisterTestTasks.S
+++ b/FreeRTOS/Demo/PIC32MZ_MPLAB/RegisterTestTasks.S
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Demo/PIC32MZ_MPLAB/main.c b/FreeRTOS/Demo/PIC32MZ_MPLAB/main.c
index e9b72d7..64ca067 100644
--- a/FreeRTOS/Demo/PIC32MZ_MPLAB/main.c
+++ b/FreeRTOS/Demo/PIC32MZ_MPLAB/main.c
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Demo/PIC32MZ_MPLAB/main_blinky.c b/FreeRTOS/Demo/PIC32MZ_MPLAB/main_blinky.c
index 31e3e3a..10c3ade 100644
--- a/FreeRTOS/Demo/PIC32MZ_MPLAB/main_blinky.c
+++ b/FreeRTOS/Demo/PIC32MZ_MPLAB/main_blinky.c
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Demo/PIC32MZ_MPLAB/main_full.c b/FreeRTOS/Demo/PIC32MZ_MPLAB/main_full.c
index c96e124..384807e 100644
--- a/FreeRTOS/Demo/PIC32MZ_MPLAB/main_full.c
+++ b/FreeRTOS/Demo/PIC32MZ_MPLAB/main_full.c
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Demo/PIC32MZ_MPLAB/timertest.c b/FreeRTOS/Demo/PIC32MZ_MPLAB/timertest.c
index 5c02bbd..b2f7dfb 100644
--- a/FreeRTOS/Demo/PIC32MZ_MPLAB/timertest.c
+++ b/FreeRTOS/Demo/PIC32MZ_MPLAB/timertest.c
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Demo/PIC32MZ_MPLAB/timertest.h b/FreeRTOS/Demo/PIC32MZ_MPLAB/timertest.h
index a5d264c..3326d3d 100644
--- a/FreeRTOS/Demo/PIC32MZ_MPLAB/timertest.h
+++ b/FreeRTOS/Demo/PIC32MZ_MPLAB/timertest.h
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Demo/PIC32MZ_MPLAB/timertest_isr.S b/FreeRTOS/Demo/PIC32MZ_MPLAB/timertest_isr.S
index ace1839..ced4221 100644
--- a/FreeRTOS/Demo/PIC32MZ_MPLAB/timertest_isr.S
+++ b/FreeRTOS/Demo/PIC32MZ_MPLAB/timertest_isr.S
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Demo/PPC405_FPU_Xilinx_Virtex4_GCC/RTOSDemo/FreeRTOSConfig.h b/FreeRTOS/Demo/PPC405_FPU_Xilinx_Virtex4_GCC/RTOSDemo/FreeRTOSConfig.h
index 0eee3c0..0f11919 100644
--- a/FreeRTOS/Demo/PPC405_FPU_Xilinx_Virtex4_GCC/RTOSDemo/FreeRTOSConfig.h
+++ b/FreeRTOS/Demo/PPC405_FPU_Xilinx_Virtex4_GCC/RTOSDemo/FreeRTOSConfig.h
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Demo/PPC405_FPU_Xilinx_Virtex4_GCC/RTOSDemo/flop/flop-reg-test.c b/FreeRTOS/Demo/PPC405_FPU_Xilinx_Virtex4_GCC/RTOSDemo/flop/flop-reg-test.c
index f0f5b1b..376cacb 100644
--- a/FreeRTOS/Demo/PPC405_FPU_Xilinx_Virtex4_GCC/RTOSDemo/flop/flop-reg-test.c
+++ b/FreeRTOS/Demo/PPC405_FPU_Xilinx_Virtex4_GCC/RTOSDemo/flop/flop-reg-test.c
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Demo/PPC405_FPU_Xilinx_Virtex4_GCC/RTOSDemo/flop/flop-reg-test.h b/FreeRTOS/Demo/PPC405_FPU_Xilinx_Virtex4_GCC/RTOSDemo/flop/flop-reg-test.h
index 09f105a..94f9247 100644
--- a/FreeRTOS/Demo/PPC405_FPU_Xilinx_Virtex4_GCC/RTOSDemo/flop/flop-reg-test.h
+++ b/FreeRTOS/Demo/PPC405_FPU_Xilinx_Virtex4_GCC/RTOSDemo/flop/flop-reg-test.h
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Demo/PPC405_FPU_Xilinx_Virtex4_GCC/RTOSDemo/flop/flop.c b/FreeRTOS/Demo/PPC405_FPU_Xilinx_Virtex4_GCC/RTOSDemo/flop/flop.c
index 2b75669..a7b9027 100644
--- a/FreeRTOS/Demo/PPC405_FPU_Xilinx_Virtex4_GCC/RTOSDemo/flop/flop.c
+++ b/FreeRTOS/Demo/PPC405_FPU_Xilinx_Virtex4_GCC/RTOSDemo/flop/flop.c
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Demo/PPC405_FPU_Xilinx_Virtex4_GCC/RTOSDemo/main.c b/FreeRTOS/Demo/PPC405_FPU_Xilinx_Virtex4_GCC/RTOSDemo/main.c
index d82d7d8..55e5f5f 100644
--- a/FreeRTOS/Demo/PPC405_FPU_Xilinx_Virtex4_GCC/RTOSDemo/main.c
+++ b/FreeRTOS/Demo/PPC405_FPU_Xilinx_Virtex4_GCC/RTOSDemo/main.c
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Demo/PPC405_FPU_Xilinx_Virtex4_GCC/RTOSDemo/partest/partest.c b/FreeRTOS/Demo/PPC405_FPU_Xilinx_Virtex4_GCC/RTOSDemo/partest/partest.c
index 2bfa95e..327fed1 100644
--- a/FreeRTOS/Demo/PPC405_FPU_Xilinx_Virtex4_GCC/RTOSDemo/partest/partest.c
+++ b/FreeRTOS/Demo/PPC405_FPU_Xilinx_Virtex4_GCC/RTOSDemo/partest/partest.c
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Demo/PPC405_FPU_Xilinx_Virtex4_GCC/RTOSDemo/serial/serial.c b/FreeRTOS/Demo/PPC405_FPU_Xilinx_Virtex4_GCC/RTOSDemo/serial/serial.c
index 2d70410..200efce 100644
--- a/FreeRTOS/Demo/PPC405_FPU_Xilinx_Virtex4_GCC/RTOSDemo/serial/serial.c
+++ b/FreeRTOS/Demo/PPC405_FPU_Xilinx_Virtex4_GCC/RTOSDemo/serial/serial.c
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Demo/PPC405_Xilinx_Virtex4_GCC/RTOSDemo/FreeRTOSConfig.h b/FreeRTOS/Demo/PPC405_Xilinx_Virtex4_GCC/RTOSDemo/FreeRTOSConfig.h
index 274bc1c..ce02e8a 100644
--- a/FreeRTOS/Demo/PPC405_Xilinx_Virtex4_GCC/RTOSDemo/FreeRTOSConfig.h
+++ b/FreeRTOS/Demo/PPC405_Xilinx_Virtex4_GCC/RTOSDemo/FreeRTOSConfig.h
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Demo/PPC405_Xilinx_Virtex4_GCC/RTOSDemo/flop/flop-reg-test.c b/FreeRTOS/Demo/PPC405_Xilinx_Virtex4_GCC/RTOSDemo/flop/flop-reg-test.c
index f0f5b1b..376cacb 100644
--- a/FreeRTOS/Demo/PPC405_Xilinx_Virtex4_GCC/RTOSDemo/flop/flop-reg-test.c
+++ b/FreeRTOS/Demo/PPC405_Xilinx_Virtex4_GCC/RTOSDemo/flop/flop-reg-test.c
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Demo/PPC405_Xilinx_Virtex4_GCC/RTOSDemo/flop/flop-reg-test.h b/FreeRTOS/Demo/PPC405_Xilinx_Virtex4_GCC/RTOSDemo/flop/flop-reg-test.h
index 09f105a..94f9247 100644
--- a/FreeRTOS/Demo/PPC405_Xilinx_Virtex4_GCC/RTOSDemo/flop/flop-reg-test.h
+++ b/FreeRTOS/Demo/PPC405_Xilinx_Virtex4_GCC/RTOSDemo/flop/flop-reg-test.h
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Demo/PPC405_Xilinx_Virtex4_GCC/RTOSDemo/flop/flop.c b/FreeRTOS/Demo/PPC405_Xilinx_Virtex4_GCC/RTOSDemo/flop/flop.c
index 2b75669..a7b9027 100644
--- a/FreeRTOS/Demo/PPC405_Xilinx_Virtex4_GCC/RTOSDemo/flop/flop.c
+++ b/FreeRTOS/Demo/PPC405_Xilinx_Virtex4_GCC/RTOSDemo/flop/flop.c
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Demo/PPC405_Xilinx_Virtex4_GCC/RTOSDemo/main.c b/FreeRTOS/Demo/PPC405_Xilinx_Virtex4_GCC/RTOSDemo/main.c
index 9482f85..2126e65 100644
--- a/FreeRTOS/Demo/PPC405_Xilinx_Virtex4_GCC/RTOSDemo/main.c
+++ b/FreeRTOS/Demo/PPC405_Xilinx_Virtex4_GCC/RTOSDemo/main.c
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Demo/PPC405_Xilinx_Virtex4_GCC/RTOSDemo/partest/partest.c b/FreeRTOS/Demo/PPC405_Xilinx_Virtex4_GCC/RTOSDemo/partest/partest.c
index 2bfa95e..327fed1 100644
--- a/FreeRTOS/Demo/PPC405_Xilinx_Virtex4_GCC/RTOSDemo/partest/partest.c
+++ b/FreeRTOS/Demo/PPC405_Xilinx_Virtex4_GCC/RTOSDemo/partest/partest.c
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Demo/PPC405_Xilinx_Virtex4_GCC/RTOSDemo/serial/serial.c b/FreeRTOS/Demo/PPC405_Xilinx_Virtex4_GCC/RTOSDemo/serial/serial.c
index 2d70410..200efce 100644
--- a/FreeRTOS/Demo/PPC405_Xilinx_Virtex4_GCC/RTOSDemo/serial/serial.c
+++ b/FreeRTOS/Demo/PPC405_Xilinx_Virtex4_GCC/RTOSDemo/serial/serial.c
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

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 5d889bd..1a2d4d3 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,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

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 73097fa..cff2c7a 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,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

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 09f105a..94f9247 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,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

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 0b61aa3..eca2f83 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,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

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 e953061..2e8b3d5 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,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

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 f2692ff..9b7f9d0 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,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

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 449e82a..a60be7e 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,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

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 5d889bd..1a2d4d3 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,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

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 f0f5b1b..376cacb 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,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

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 09f105a..94f9247 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,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

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 2b75669..a7b9027 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,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

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 d82d7d8..55e5f5f 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,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

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 f2692ff..9b7f9d0 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,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

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 449e82a..a60be7e 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,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Demo/PPC440_Xilinx_Virtex5_GCC/RTOSDemo/FreeRTOSConfig.h b/FreeRTOS/Demo/PPC440_Xilinx_Virtex5_GCC/RTOSDemo/FreeRTOSConfig.h
index 8888779..36104fa 100644
--- a/FreeRTOS/Demo/PPC440_Xilinx_Virtex5_GCC/RTOSDemo/FreeRTOSConfig.h
+++ b/FreeRTOS/Demo/PPC440_Xilinx_Virtex5_GCC/RTOSDemo/FreeRTOSConfig.h
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

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 f0f5b1b..376cacb 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,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

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 09f105a..94f9247 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,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

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 2b75669..a7b9027 100644
--- a/FreeRTOS/Demo/PPC440_Xilinx_Virtex5_GCC/RTOSDemo/flop/flop.c
+++ b/FreeRTOS/Demo/PPC440_Xilinx_Virtex5_GCC/RTOSDemo/flop/flop.c
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Demo/PPC440_Xilinx_Virtex5_GCC/RTOSDemo/main.c b/FreeRTOS/Demo/PPC440_Xilinx_Virtex5_GCC/RTOSDemo/main.c
index 9482f85..2126e65 100644
--- a/FreeRTOS/Demo/PPC440_Xilinx_Virtex5_GCC/RTOSDemo/main.c
+++ b/FreeRTOS/Demo/PPC440_Xilinx_Virtex5_GCC/RTOSDemo/main.c
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

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 7b13fb7..5cd8a21 100644
--- a/FreeRTOS/Demo/PPC440_Xilinx_Virtex5_GCC/RTOSDemo/partest/partest.c
+++ b/FreeRTOS/Demo/PPC440_Xilinx_Virtex5_GCC/RTOSDemo/partest/partest.c
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

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 449e82a..a60be7e 100644
--- a/FreeRTOS/Demo/PPC440_Xilinx_Virtex5_GCC/RTOSDemo/serial/serial.c
+++ b/FreeRTOS/Demo/PPC440_Xilinx_Virtex5_GCC/RTOSDemo/serial/serial.c
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Demo/RL78_RL78G13_Promo_Board_IAR/FreeRTOSConfig.h b/FreeRTOS/Demo/RL78_RL78G13_Promo_Board_IAR/FreeRTOSConfig.h
index 8125db8..95f372e 100644
--- a/FreeRTOS/Demo/RL78_RL78G13_Promo_Board_IAR/FreeRTOSConfig.h
+++ b/FreeRTOS/Demo/RL78_RL78G13_Promo_Board_IAR/FreeRTOSConfig.h
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Demo/RL78_RL78G13_Promo_Board_IAR/RegTest.s87 b/FreeRTOS/Demo/RL78_RL78G13_Promo_Board_IAR/RegTest.s87
index 7e39fda..dbb20bf 100644
--- a/FreeRTOS/Demo/RL78_RL78G13_Promo_Board_IAR/RegTest.s87
+++ b/FreeRTOS/Demo/RL78_RL78G13_Promo_Board_IAR/RegTest.s87
@@ -1,5 +1,5 @@
 ;/*

-;    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+;    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

 ;	

 ;

 ;    ***************************************************************************

diff --git a/FreeRTOS/Demo/RL78_RL78G13_Promo_Board_IAR/main.c b/FreeRTOS/Demo/RL78_RL78G13_Promo_Board_IAR/main.c
index b6a6bd2..802a7c2 100644
--- a/FreeRTOS/Demo/RL78_RL78G13_Promo_Board_IAR/main.c
+++ b/FreeRTOS/Demo/RL78_RL78G13_Promo_Board_IAR/main.c
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Demo/RL78_multiple_IAR/ExampleISR.s87 b/FreeRTOS/Demo/RL78_multiple_IAR/ExampleISR.s87
index 579be64..0f70fc6 100644
--- a/FreeRTOS/Demo/RL78_multiple_IAR/ExampleISR.s87
+++ b/FreeRTOS/Demo/RL78_multiple_IAR/ExampleISR.s87
@@ -1,4 +1,4 @@
-;    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+;    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

 ;

 ;    FEATURES AND PORTS ARE ADDED TO FREERTOS ALL THE TIME.  PLEASE VISIT

 ;    http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Demo/RL78_multiple_IAR/FreeRTOSConfig.h b/FreeRTOS/Demo/RL78_multiple_IAR/FreeRTOSConfig.h
index a097e76..eb9a224 100644
--- a/FreeRTOS/Demo/RL78_multiple_IAR/FreeRTOSConfig.h
+++ b/FreeRTOS/Demo/RL78_multiple_IAR/FreeRTOSConfig.h
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Demo/RL78_multiple_IAR/RegTest.s87 b/FreeRTOS/Demo/RL78_multiple_IAR/RegTest.s87
index cdd5803..a935803 100644
--- a/FreeRTOS/Demo/RL78_multiple_IAR/RegTest.s87
+++ b/FreeRTOS/Demo/RL78_multiple_IAR/RegTest.s87
@@ -1,5 +1,5 @@
 ;/*

-;    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+;    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

 ;

 ;

 ;    ***************************************************************************

diff --git a/FreeRTOS/Demo/RL78_multiple_IAR/demo_specific_io.h b/FreeRTOS/Demo/RL78_multiple_IAR/demo_specific_io.h
index de21e25..1839401 100644
--- a/FreeRTOS/Demo/RL78_multiple_IAR/demo_specific_io.h
+++ b/FreeRTOS/Demo/RL78_multiple_IAR/demo_specific_io.h
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Demo/RL78_multiple_IAR/main.c b/FreeRTOS/Demo/RL78_multiple_IAR/main.c
index 74593b7..45d1334 100644
--- a/FreeRTOS/Demo/RL78_multiple_IAR/main.c
+++ b/FreeRTOS/Demo/RL78_multiple_IAR/main.c
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Demo/RL78_multiple_IAR/main_blinky.c b/FreeRTOS/Demo/RL78_multiple_IAR/main_blinky.c
index ed15afa..c2f985c 100644
--- a/FreeRTOS/Demo/RL78_multiple_IAR/main_blinky.c
+++ b/FreeRTOS/Demo/RL78_multiple_IAR/main_blinky.c
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Demo/RL78_multiple_IAR/main_full.c b/FreeRTOS/Demo/RL78_multiple_IAR/main_full.c
index 8fbeb51..241376a 100644
--- a/FreeRTOS/Demo/RL78_multiple_IAR/main_full.c
+++ b/FreeRTOS/Demo/RL78_multiple_IAR/main_full.c
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Demo/RX100-RSK_GCC_e2studio/RTOSDemo/FreeRTOSConfig.h b/FreeRTOS/Demo/RX100-RSK_GCC_e2studio/RTOSDemo/FreeRTOSConfig.h
index 2d71200..4e2fcaf 100644
--- a/FreeRTOS/Demo/RX100-RSK_GCC_e2studio/RTOSDemo/FreeRTOSConfig.h
+++ b/FreeRTOS/Demo/RX100-RSK_GCC_e2studio/RTOSDemo/FreeRTOSConfig.h
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Demo/RX100-RSK_GCC_e2studio/RTOSDemo/ParTest.c b/FreeRTOS/Demo/RX100-RSK_GCC_e2studio/RTOSDemo/ParTest.c
index de19f71..c854d6a 100644
--- a/FreeRTOS/Demo/RX100-RSK_GCC_e2studio/RTOSDemo/ParTest.c
+++ b/FreeRTOS/Demo/RX100-RSK_GCC_e2studio/RTOSDemo/ParTest.c
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Demo/RX100-RSK_GCC_e2studio/RTOSDemo/main.c b/FreeRTOS/Demo/RX100-RSK_GCC_e2studio/RTOSDemo/main.c
index c81f0a6..e171ae7 100644
--- a/FreeRTOS/Demo/RX100-RSK_GCC_e2studio/RTOSDemo/main.c
+++ b/FreeRTOS/Demo/RX100-RSK_GCC_e2studio/RTOSDemo/main.c
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

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 a077e57..f6ba73a 100644
--- a/FreeRTOS/Demo/RX100-RSK_GCC_e2studio/RTOSDemo/main_full.c
+++ b/FreeRTOS/Demo/RX100-RSK_GCC_e2studio/RTOSDemo/main_full.c
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

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 8cbe0ea..1dbdc0e 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,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Demo/RX100-RSK_IAR/FreeRTOSConfig.h b/FreeRTOS/Demo/RX100-RSK_IAR/FreeRTOSConfig.h
index 9a821f1..022dabe 100644
--- a/FreeRTOS/Demo/RX100-RSK_IAR/FreeRTOSConfig.h
+++ b/FreeRTOS/Demo/RX100-RSK_IAR/FreeRTOSConfig.h
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Demo/RX100-RSK_IAR/ParTest.c b/FreeRTOS/Demo/RX100-RSK_IAR/ParTest.c
index de19f71..c854d6a 100644
--- a/FreeRTOS/Demo/RX100-RSK_IAR/ParTest.c
+++ b/FreeRTOS/Demo/RX100-RSK_IAR/ParTest.c
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Demo/RX100-RSK_IAR/PriorityDefinitions.h b/FreeRTOS/Demo/RX100-RSK_IAR/PriorityDefinitions.h
index 32a822e..39879df 100644
--- a/FreeRTOS/Demo/RX100-RSK_IAR/PriorityDefinitions.h
+++ b/FreeRTOS/Demo/RX100-RSK_IAR/PriorityDefinitions.h
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Demo/RX100-RSK_IAR/main.c b/FreeRTOS/Demo/RX100-RSK_IAR/main.c
index bd466fe..4ec283e 100644
--- a/FreeRTOS/Demo/RX100-RSK_IAR/main.c
+++ b/FreeRTOS/Demo/RX100-RSK_IAR/main.c
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Demo/RX100-RSK_IAR/main_full.c b/FreeRTOS/Demo/RX100-RSK_IAR/main_full.c
index 4664dcd..52e6c62 100644
--- a/FreeRTOS/Demo/RX100-RSK_IAR/main_full.c
+++ b/FreeRTOS/Demo/RX100-RSK_IAR/main_full.c
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Demo/RX100-RSK_IAR/main_low_power.c b/FreeRTOS/Demo/RX100-RSK_IAR/main_low_power.c
index 658540c..a1e8186 100644
--- a/FreeRTOS/Demo/RX100-RSK_IAR/main_low_power.c
+++ b/FreeRTOS/Demo/RX100-RSK_IAR/main_low_power.c
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Demo/RX100-RSK_IAR/reg_test.s b/FreeRTOS/Demo/RX100-RSK_IAR/reg_test.s
index 96e5940..b5e790f 100644
--- a/FreeRTOS/Demo/RX100-RSK_IAR/reg_test.s
+++ b/FreeRTOS/Demo/RX100-RSK_IAR/reg_test.s
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Demo/RX100-RSK_Renesas_e2studio/RTOSDemo/FreeRTOSConfig.h b/FreeRTOS/Demo/RX100-RSK_Renesas_e2studio/RTOSDemo/FreeRTOSConfig.h
index 6fc20c6..911623b 100644
--- a/FreeRTOS/Demo/RX100-RSK_Renesas_e2studio/RTOSDemo/FreeRTOSConfig.h
+++ b/FreeRTOS/Demo/RX100-RSK_Renesas_e2studio/RTOSDemo/FreeRTOSConfig.h
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Demo/RX100-RSK_Renesas_e2studio/RTOSDemo/ParTest.c b/FreeRTOS/Demo/RX100-RSK_Renesas_e2studio/RTOSDemo/ParTest.c
index de19f71..c854d6a 100644
--- a/FreeRTOS/Demo/RX100-RSK_Renesas_e2studio/RTOSDemo/ParTest.c
+++ b/FreeRTOS/Demo/RX100-RSK_Renesas_e2studio/RTOSDemo/ParTest.c
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Demo/RX100-RSK_Renesas_e2studio/RTOSDemo/main.c b/FreeRTOS/Demo/RX100-RSK_Renesas_e2studio/RTOSDemo/main.c
index 5833d50..26b49a7 100644
--- a/FreeRTOS/Demo/RX100-RSK_Renesas_e2studio/RTOSDemo/main.c
+++ b/FreeRTOS/Demo/RX100-RSK_Renesas_e2studio/RTOSDemo/main.c
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

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 0a5b7aa..6013f89 100644
--- a/FreeRTOS/Demo/RX100-RSK_Renesas_e2studio/RTOSDemo/main_full.c
+++ b/FreeRTOS/Demo/RX100-RSK_Renesas_e2studio/RTOSDemo/main_full.c
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

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 b0e79ed..f903a52 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,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Demo/RX200_RX210-RSK_Renesas/RTOSDemo/ButtonAndLCD.c b/FreeRTOS/Demo/RX200_RX210-RSK_Renesas/RTOSDemo/ButtonAndLCD.c
index 691cbba..929d004 100644
--- a/FreeRTOS/Demo/RX200_RX210-RSK_Renesas/RTOSDemo/ButtonAndLCD.c
+++ b/FreeRTOS/Demo/RX200_RX210-RSK_Renesas/RTOSDemo/ButtonAndLCD.c
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Demo/RX200_RX210-RSK_Renesas/RTOSDemo/FreeRTOSConfig.h b/FreeRTOS/Demo/RX200_RX210-RSK_Renesas/RTOSDemo/FreeRTOSConfig.h
index 3f12713..6234b1d 100644
--- a/FreeRTOS/Demo/RX200_RX210-RSK_Renesas/RTOSDemo/FreeRTOSConfig.h
+++ b/FreeRTOS/Demo/RX200_RX210-RSK_Renesas/RTOSDemo/FreeRTOSConfig.h
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Demo/RX200_RX210-RSK_Renesas/RTOSDemo/HighFrequencyTimerTest.c b/FreeRTOS/Demo/RX200_RX210-RSK_Renesas/RTOSDemo/HighFrequencyTimerTest.c
index ac98cc1..fb38c93 100644
--- a/FreeRTOS/Demo/RX200_RX210-RSK_Renesas/RTOSDemo/HighFrequencyTimerTest.c
+++ b/FreeRTOS/Demo/RX200_RX210-RSK_Renesas/RTOSDemo/HighFrequencyTimerTest.c
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Demo/RX200_RX210-RSK_Renesas/RTOSDemo/IntQueueTimer.c b/FreeRTOS/Demo/RX200_RX210-RSK_Renesas/RTOSDemo/IntQueueTimer.c
index 40eb0b9..a0810fc 100644
--- a/FreeRTOS/Demo/RX200_RX210-RSK_Renesas/RTOSDemo/IntQueueTimer.c
+++ b/FreeRTOS/Demo/RX200_RX210-RSK_Renesas/RTOSDemo/IntQueueTimer.c
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Demo/RX200_RX210-RSK_Renesas/RTOSDemo/ParTest.c b/FreeRTOS/Demo/RX200_RX210-RSK_Renesas/RTOSDemo/ParTest.c
index 0533e29..60e75a0 100644
--- a/FreeRTOS/Demo/RX200_RX210-RSK_Renesas/RTOSDemo/ParTest.c
+++ b/FreeRTOS/Demo/RX200_RX210-RSK_Renesas/RTOSDemo/ParTest.c
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

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 111e49c..fb394af 100644
--- a/FreeRTOS/Demo/RX200_RX210-RSK_Renesas/RTOSDemo/include/ButtonAndLCD.h
+++ b/FreeRTOS/Demo/RX200_RX210-RSK_Renesas/RTOSDemo/include/ButtonAndLCD.h
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

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 77de772..fcf9f8c 100644
--- a/FreeRTOS/Demo/RX200_RX210-RSK_Renesas/RTOSDemo/include/IntQueueTimer.h
+++ b/FreeRTOS/Demo/RX200_RX210-RSK_Renesas/RTOSDemo/include/IntQueueTimer.h
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

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 8c26462..c4556bb 100644
--- a/FreeRTOS/Demo/RX200_RX210-RSK_Renesas/RTOSDemo/main-blinky.c
+++ b/FreeRTOS/Demo/RX200_RX210-RSK_Renesas/RTOSDemo/main-blinky.c
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

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 880dcf5..d43c180 100644
--- a/FreeRTOS/Demo/RX200_RX210-RSK_Renesas/RTOSDemo/main-full.c
+++ b/FreeRTOS/Demo/RX200_RX210-RSK_Renesas/RTOSDemo/main-full.c
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Demo/RX600_RX62N-RDK_GNURX/RTOSDemo/FreeRTOSConfig.h b/FreeRTOS/Demo/RX600_RX62N-RDK_GNURX/RTOSDemo/FreeRTOSConfig.h
index ed3db84..912f0d7 100644
--- a/FreeRTOS/Demo/RX600_RX62N-RDK_GNURX/RTOSDemo/FreeRTOSConfig.h
+++ b/FreeRTOS/Demo/RX600_RX62N-RDK_GNURX/RTOSDemo/FreeRTOSConfig.h
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Demo/RX600_RX62N-RDK_GNURX/RTOSDemo/HighFrequencyTimerTest.c b/FreeRTOS/Demo/RX600_RX62N-RDK_GNURX/RTOSDemo/HighFrequencyTimerTest.c
index 9f2c2d3..642f12f 100644
--- a/FreeRTOS/Demo/RX600_RX62N-RDK_GNURX/RTOSDemo/HighFrequencyTimerTest.c
+++ b/FreeRTOS/Demo/RX600_RX62N-RDK_GNURX/RTOSDemo/HighFrequencyTimerTest.c
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Demo/RX600_RX62N-RDK_GNURX/RTOSDemo/IntQueueTimer.c b/FreeRTOS/Demo/RX600_RX62N-RDK_GNURX/RTOSDemo/IntQueueTimer.c
index a47f90d..49ee0f2 100644
--- a/FreeRTOS/Demo/RX600_RX62N-RDK_GNURX/RTOSDemo/IntQueueTimer.c
+++ b/FreeRTOS/Demo/RX600_RX62N-RDK_GNURX/RTOSDemo/IntQueueTimer.c
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Demo/RX600_RX62N-RDK_GNURX/RTOSDemo/ParTest.c b/FreeRTOS/Demo/RX600_RX62N-RDK_GNURX/RTOSDemo/ParTest.c
index bb9e71b..c208ce3 100644
--- a/FreeRTOS/Demo/RX600_RX62N-RDK_GNURX/RTOSDemo/ParTest.c
+++ b/FreeRTOS/Demo/RX600_RX62N-RDK_GNURX/RTOSDemo/ParTest.c
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

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 77de772..fcf9f8c 100644
--- a/FreeRTOS/Demo/RX600_RX62N-RDK_GNURX/RTOSDemo/include/IntQueueTimer.h
+++ b/FreeRTOS/Demo/RX600_RX62N-RDK_GNURX/RTOSDemo/include/IntQueueTimer.h
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

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 2960cba..bc39357 100644
--- a/FreeRTOS/Demo/RX600_RX62N-RDK_GNURX/RTOSDemo/main-blinky.c
+++ b/FreeRTOS/Demo/RX600_RX62N-RDK_GNURX/RTOSDemo/main-blinky.c
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

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 2e0feed..08ff298 100644
--- a/FreeRTOS/Demo/RX600_RX62N-RDK_GNURX/RTOSDemo/main-full.c
+++ b/FreeRTOS/Demo/RX600_RX62N-RDK_GNURX/RTOSDemo/main-full.c
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

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 83bbfdb..ab398e1 100644
--- a/FreeRTOS/Demo/RX600_RX62N-RDK_GNURX/RTOSDemo/uIP_Task.c
+++ b/FreeRTOS/Demo/RX600_RX62N-RDK_GNURX/RTOSDemo/uIP_Task.c
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

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 7989187..c4dcc28 100644
--- a/FreeRTOS/Demo/RX600_RX62N-RDK_GNURX/RTOSDemo/webserver/EMAC.c
+++ b/FreeRTOS/Demo/RX600_RX62N-RDK_GNURX/RTOSDemo/webserver/EMAC.c
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Demo/RX600_RX62N-RDK_IAR/FreeRTOSConfig.h b/FreeRTOS/Demo/RX600_RX62N-RDK_IAR/FreeRTOSConfig.h
index 0306135..8671612 100644
--- a/FreeRTOS/Demo/RX600_RX62N-RDK_IAR/FreeRTOSConfig.h
+++ b/FreeRTOS/Demo/RX600_RX62N-RDK_IAR/FreeRTOSConfig.h
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Demo/RX600_RX62N-RDK_IAR/HighFrequencyTimerTest.c b/FreeRTOS/Demo/RX600_RX62N-RDK_IAR/HighFrequencyTimerTest.c
index 77145e6..31d12af 100644
--- a/FreeRTOS/Demo/RX600_RX62N-RDK_IAR/HighFrequencyTimerTest.c
+++ b/FreeRTOS/Demo/RX600_RX62N-RDK_IAR/HighFrequencyTimerTest.c
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Demo/RX600_RX62N-RDK_IAR/IntQueueTimer.c b/FreeRTOS/Demo/RX600_RX62N-RDK_IAR/IntQueueTimer.c
index bfaefb6..28a7867 100644
--- a/FreeRTOS/Demo/RX600_RX62N-RDK_IAR/IntQueueTimer.c
+++ b/FreeRTOS/Demo/RX600_RX62N-RDK_IAR/IntQueueTimer.c
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Demo/RX600_RX62N-RDK_IAR/ParTest.c b/FreeRTOS/Demo/RX600_RX62N-RDK_IAR/ParTest.c
index f185636..9ea1e80 100644
--- a/FreeRTOS/Demo/RX600_RX62N-RDK_IAR/ParTest.c
+++ b/FreeRTOS/Demo/RX600_RX62N-RDK_IAR/ParTest.c
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Demo/RX600_RX62N-RDK_IAR/PriorityDefinitions.h b/FreeRTOS/Demo/RX600_RX62N-RDK_IAR/PriorityDefinitions.h
index 64671d9..b38c8cc 100644
--- a/FreeRTOS/Demo/RX600_RX62N-RDK_IAR/PriorityDefinitions.h
+++ b/FreeRTOS/Demo/RX600_RX62N-RDK_IAR/PriorityDefinitions.h
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Demo/RX600_RX62N-RDK_IAR/RegTest.s b/FreeRTOS/Demo/RX600_RX62N-RDK_IAR/RegTest.s
index 48bee10..4f9a3ee 100644
--- a/FreeRTOS/Demo/RX600_RX62N-RDK_IAR/RegTest.s
+++ b/FreeRTOS/Demo/RX600_RX62N-RDK_IAR/RegTest.s
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Demo/RX600_RX62N-RDK_IAR/include/IntQueueTimer.h b/FreeRTOS/Demo/RX600_RX62N-RDK_IAR/include/IntQueueTimer.h
index 77de772..fcf9f8c 100644
--- a/FreeRTOS/Demo/RX600_RX62N-RDK_IAR/include/IntQueueTimer.h
+++ b/FreeRTOS/Demo/RX600_RX62N-RDK_IAR/include/IntQueueTimer.h
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Demo/RX600_RX62N-RDK_IAR/main-blinky.c b/FreeRTOS/Demo/RX600_RX62N-RDK_IAR/main-blinky.c
index ecb8d1a..253b147 100644
--- a/FreeRTOS/Demo/RX600_RX62N-RDK_IAR/main-blinky.c
+++ b/FreeRTOS/Demo/RX600_RX62N-RDK_IAR/main-blinky.c
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Demo/RX600_RX62N-RDK_IAR/main-full.c b/FreeRTOS/Demo/RX600_RX62N-RDK_IAR/main-full.c
index 958d8ae..4137f46 100644
--- a/FreeRTOS/Demo/RX600_RX62N-RDK_IAR/main-full.c
+++ b/FreeRTOS/Demo/RX600_RX62N-RDK_IAR/main-full.c
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Demo/RX600_RX62N-RDK_IAR/uIP_Task.c b/FreeRTOS/Demo/RX600_RX62N-RDK_IAR/uIP_Task.c
index c56e1cd..8ca6276 100644
--- a/FreeRTOS/Demo/RX600_RX62N-RDK_IAR/uIP_Task.c
+++ b/FreeRTOS/Demo/RX600_RX62N-RDK_IAR/uIP_Task.c
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Demo/RX600_RX62N-RDK_IAR/webserver/EMAC.c b/FreeRTOS/Demo/RX600_RX62N-RDK_IAR/webserver/EMAC.c
index 182aed7..ef4dac2 100644
--- a/FreeRTOS/Demo/RX600_RX62N-RDK_IAR/webserver/EMAC.c
+++ b/FreeRTOS/Demo/RX600_RX62N-RDK_IAR/webserver/EMAC.c
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Demo/RX600_RX62N-RDK_Renesas/RTOSDemo/FreeRTOSConfig.h b/FreeRTOS/Demo/RX600_RX62N-RDK_Renesas/RTOSDemo/FreeRTOSConfig.h
index 7f61fb3..1ffd31a 100644
--- a/FreeRTOS/Demo/RX600_RX62N-RDK_Renesas/RTOSDemo/FreeRTOSConfig.h
+++ b/FreeRTOS/Demo/RX600_RX62N-RDK_Renesas/RTOSDemo/FreeRTOSConfig.h
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Demo/RX600_RX62N-RDK_Renesas/RTOSDemo/HighFrequencyTimerTest.c b/FreeRTOS/Demo/RX600_RX62N-RDK_Renesas/RTOSDemo/HighFrequencyTimerTest.c
index ac98cc1..fb38c93 100644
--- a/FreeRTOS/Demo/RX600_RX62N-RDK_Renesas/RTOSDemo/HighFrequencyTimerTest.c
+++ b/FreeRTOS/Demo/RX600_RX62N-RDK_Renesas/RTOSDemo/HighFrequencyTimerTest.c
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Demo/RX600_RX62N-RDK_Renesas/RTOSDemo/IntQueueTimer.c b/FreeRTOS/Demo/RX600_RX62N-RDK_Renesas/RTOSDemo/IntQueueTimer.c
index 40eb0b9..a0810fc 100644
--- a/FreeRTOS/Demo/RX600_RX62N-RDK_Renesas/RTOSDemo/IntQueueTimer.c
+++ b/FreeRTOS/Demo/RX600_RX62N-RDK_Renesas/RTOSDemo/IntQueueTimer.c
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Demo/RX600_RX62N-RDK_Renesas/RTOSDemo/ParTest.c b/FreeRTOS/Demo/RX600_RX62N-RDK_Renesas/RTOSDemo/ParTest.c
index 018d805..28aabc6 100644
--- a/FreeRTOS/Demo/RX600_RX62N-RDK_Renesas/RTOSDemo/ParTest.c
+++ b/FreeRTOS/Demo/RX600_RX62N-RDK_Renesas/RTOSDemo/ParTest.c
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

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 77de772..fcf9f8c 100644
--- a/FreeRTOS/Demo/RX600_RX62N-RDK_Renesas/RTOSDemo/include/IntQueueTimer.h
+++ b/FreeRTOS/Demo/RX600_RX62N-RDK_Renesas/RTOSDemo/include/IntQueueTimer.h
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

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 2376631..0f93266 100644
--- a/FreeRTOS/Demo/RX600_RX62N-RDK_Renesas/RTOSDemo/main-blinky.c
+++ b/FreeRTOS/Demo/RX600_RX62N-RDK_Renesas/RTOSDemo/main-blinky.c
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

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 b0ce2d1..5a6d5e8 100644
--- a/FreeRTOS/Demo/RX600_RX62N-RDK_Renesas/RTOSDemo/main-full.c
+++ b/FreeRTOS/Demo/RX600_RX62N-RDK_Renesas/RTOSDemo/main-full.c
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

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 83bbfdb..ab398e1 100644
--- a/FreeRTOS/Demo/RX600_RX62N-RDK_Renesas/RTOSDemo/uIP_Task.c
+++ b/FreeRTOS/Demo/RX600_RX62N-RDK_Renesas/RTOSDemo/uIP_Task.c
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

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 dd2f62c..83d8660 100644
--- a/FreeRTOS/Demo/RX600_RX62N-RDK_Renesas/RTOSDemo/webserver/EMAC.c
+++ b/FreeRTOS/Demo/RX600_RX62N-RDK_Renesas/RTOSDemo/webserver/EMAC.c
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Demo/RX600_RX62N-RSK_GNURX/RTOSDemo/FreeRTOSConfig.h b/FreeRTOS/Demo/RX600_RX62N-RSK_GNURX/RTOSDemo/FreeRTOSConfig.h
index 45d7c3a..9610738 100644
--- a/FreeRTOS/Demo/RX600_RX62N-RSK_GNURX/RTOSDemo/FreeRTOSConfig.h
+++ b/FreeRTOS/Demo/RX600_RX62N-RSK_GNURX/RTOSDemo/FreeRTOSConfig.h
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Demo/RX600_RX62N-RSK_GNURX/RTOSDemo/HighFrequencyTimerTest.c b/FreeRTOS/Demo/RX600_RX62N-RSK_GNURX/RTOSDemo/HighFrequencyTimerTest.c
index 9f2c2d3..642f12f 100644
--- a/FreeRTOS/Demo/RX600_RX62N-RSK_GNURX/RTOSDemo/HighFrequencyTimerTest.c
+++ b/FreeRTOS/Demo/RX600_RX62N-RSK_GNURX/RTOSDemo/HighFrequencyTimerTest.c
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Demo/RX600_RX62N-RSK_GNURX/RTOSDemo/IntQueueTimer.c b/FreeRTOS/Demo/RX600_RX62N-RSK_GNURX/RTOSDemo/IntQueueTimer.c
index a47f90d..49ee0f2 100644
--- a/FreeRTOS/Demo/RX600_RX62N-RSK_GNURX/RTOSDemo/IntQueueTimer.c
+++ b/FreeRTOS/Demo/RX600_RX62N-RSK_GNURX/RTOSDemo/IntQueueTimer.c
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Demo/RX600_RX62N-RSK_GNURX/RTOSDemo/ParTest.c b/FreeRTOS/Demo/RX600_RX62N-RSK_GNURX/RTOSDemo/ParTest.c
index de7f5e8..32b855b 100644
--- a/FreeRTOS/Demo/RX600_RX62N-RSK_GNURX/RTOSDemo/ParTest.c
+++ b/FreeRTOS/Demo/RX600_RX62N-RSK_GNURX/RTOSDemo/ParTest.c
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

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 77de772..fcf9f8c 100644
--- a/FreeRTOS/Demo/RX600_RX62N-RSK_GNURX/RTOSDemo/include/IntQueueTimer.h
+++ b/FreeRTOS/Demo/RX600_RX62N-RSK_GNURX/RTOSDemo/include/IntQueueTimer.h
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

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 2960cba..bc39357 100644
--- a/FreeRTOS/Demo/RX600_RX62N-RSK_GNURX/RTOSDemo/main-blinky.c
+++ b/FreeRTOS/Demo/RX600_RX62N-RSK_GNURX/RTOSDemo/main-blinky.c
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

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 2e0feed..08ff298 100644
--- a/FreeRTOS/Demo/RX600_RX62N-RSK_GNURX/RTOSDemo/main-full.c
+++ b/FreeRTOS/Demo/RX600_RX62N-RSK_GNURX/RTOSDemo/main-full.c
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

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 83bbfdb..ab398e1 100644
--- a/FreeRTOS/Demo/RX600_RX62N-RSK_GNURX/RTOSDemo/uIP_Task.c
+++ b/FreeRTOS/Demo/RX600_RX62N-RSK_GNURX/RTOSDemo/uIP_Task.c
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

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 7989187..c4dcc28 100644
--- a/FreeRTOS/Demo/RX600_RX62N-RSK_GNURX/RTOSDemo/webserver/EMAC.c
+++ b/FreeRTOS/Demo/RX600_RX62N-RSK_GNURX/RTOSDemo/webserver/EMAC.c
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Demo/RX600_RX62N-RSK_IAR/FreeRTOSConfig.h b/FreeRTOS/Demo/RX600_RX62N-RSK_IAR/FreeRTOSConfig.h
index d98753f..d786f41 100644
--- a/FreeRTOS/Demo/RX600_RX62N-RSK_IAR/FreeRTOSConfig.h
+++ b/FreeRTOS/Demo/RX600_RX62N-RSK_IAR/FreeRTOSConfig.h
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Demo/RX600_RX62N-RSK_IAR/HighFrequencyTimerTest.c b/FreeRTOS/Demo/RX600_RX62N-RSK_IAR/HighFrequencyTimerTest.c
index 77145e6..31d12af 100644
--- a/FreeRTOS/Demo/RX600_RX62N-RSK_IAR/HighFrequencyTimerTest.c
+++ b/FreeRTOS/Demo/RX600_RX62N-RSK_IAR/HighFrequencyTimerTest.c
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Demo/RX600_RX62N-RSK_IAR/IntQueueTimer.c b/FreeRTOS/Demo/RX600_RX62N-RSK_IAR/IntQueueTimer.c
index bfaefb6..28a7867 100644
--- a/FreeRTOS/Demo/RX600_RX62N-RSK_IAR/IntQueueTimer.c
+++ b/FreeRTOS/Demo/RX600_RX62N-RSK_IAR/IntQueueTimer.c
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Demo/RX600_RX62N-RSK_IAR/ParTest.c b/FreeRTOS/Demo/RX600_RX62N-RSK_IAR/ParTest.c
index b043ace..6538b1b 100644
--- a/FreeRTOS/Demo/RX600_RX62N-RSK_IAR/ParTest.c
+++ b/FreeRTOS/Demo/RX600_RX62N-RSK_IAR/ParTest.c
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Demo/RX600_RX62N-RSK_IAR/PriorityDefinitions.h b/FreeRTOS/Demo/RX600_RX62N-RSK_IAR/PriorityDefinitions.h
index 64671d9..b38c8cc 100644
--- a/FreeRTOS/Demo/RX600_RX62N-RSK_IAR/PriorityDefinitions.h
+++ b/FreeRTOS/Demo/RX600_RX62N-RSK_IAR/PriorityDefinitions.h
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Demo/RX600_RX62N-RSK_IAR/RegTest.s b/FreeRTOS/Demo/RX600_RX62N-RSK_IAR/RegTest.s
index 48bee10..4f9a3ee 100644
--- a/FreeRTOS/Demo/RX600_RX62N-RSK_IAR/RegTest.s
+++ b/FreeRTOS/Demo/RX600_RX62N-RSK_IAR/RegTest.s
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Demo/RX600_RX62N-RSK_IAR/include/IntQueueTimer.h b/FreeRTOS/Demo/RX600_RX62N-RSK_IAR/include/IntQueueTimer.h
index 77de772..fcf9f8c 100644
--- a/FreeRTOS/Demo/RX600_RX62N-RSK_IAR/include/IntQueueTimer.h
+++ b/FreeRTOS/Demo/RX600_RX62N-RSK_IAR/include/IntQueueTimer.h
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Demo/RX600_RX62N-RSK_IAR/main-blinky.c b/FreeRTOS/Demo/RX600_RX62N-RSK_IAR/main-blinky.c
index bb1a91c..76311e3 100644
--- a/FreeRTOS/Demo/RX600_RX62N-RSK_IAR/main-blinky.c
+++ b/FreeRTOS/Demo/RX600_RX62N-RSK_IAR/main-blinky.c
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Demo/RX600_RX62N-RSK_IAR/main-full.c b/FreeRTOS/Demo/RX600_RX62N-RSK_IAR/main-full.c
index 00c1dfb..f866ac2 100644
--- a/FreeRTOS/Demo/RX600_RX62N-RSK_IAR/main-full.c
+++ b/FreeRTOS/Demo/RX600_RX62N-RSK_IAR/main-full.c
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Demo/RX600_RX62N-RSK_IAR/uIP_Task.c b/FreeRTOS/Demo/RX600_RX62N-RSK_IAR/uIP_Task.c
index c56e1cd..8ca6276 100644
--- a/FreeRTOS/Demo/RX600_RX62N-RSK_IAR/uIP_Task.c
+++ b/FreeRTOS/Demo/RX600_RX62N-RSK_IAR/uIP_Task.c
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Demo/RX600_RX62N-RSK_IAR/webserver/EMAC.c b/FreeRTOS/Demo/RX600_RX62N-RSK_IAR/webserver/EMAC.c
index 182aed7..ef4dac2 100644
--- a/FreeRTOS/Demo/RX600_RX62N-RSK_IAR/webserver/EMAC.c
+++ b/FreeRTOS/Demo/RX600_RX62N-RSK_IAR/webserver/EMAC.c
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Demo/RX600_RX62N-RSK_Renesas/RTOSDemo/FreeRTOSConfig.h b/FreeRTOS/Demo/RX600_RX62N-RSK_Renesas/RTOSDemo/FreeRTOSConfig.h
index 2e34a69..a176b67 100644
--- a/FreeRTOS/Demo/RX600_RX62N-RSK_Renesas/RTOSDemo/FreeRTOSConfig.h
+++ b/FreeRTOS/Demo/RX600_RX62N-RSK_Renesas/RTOSDemo/FreeRTOSConfig.h
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Demo/RX600_RX62N-RSK_Renesas/RTOSDemo/HighFrequencyTimerTest.c b/FreeRTOS/Demo/RX600_RX62N-RSK_Renesas/RTOSDemo/HighFrequencyTimerTest.c
index ac98cc1..fb38c93 100644
--- a/FreeRTOS/Demo/RX600_RX62N-RSK_Renesas/RTOSDemo/HighFrequencyTimerTest.c
+++ b/FreeRTOS/Demo/RX600_RX62N-RSK_Renesas/RTOSDemo/HighFrequencyTimerTest.c
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Demo/RX600_RX62N-RSK_Renesas/RTOSDemo/IntQueueTimer.c b/FreeRTOS/Demo/RX600_RX62N-RSK_Renesas/RTOSDemo/IntQueueTimer.c
index 40eb0b9..a0810fc 100644
--- a/FreeRTOS/Demo/RX600_RX62N-RSK_Renesas/RTOSDemo/IntQueueTimer.c
+++ b/FreeRTOS/Demo/RX600_RX62N-RSK_Renesas/RTOSDemo/IntQueueTimer.c
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Demo/RX600_RX62N-RSK_Renesas/RTOSDemo/ParTest.c b/FreeRTOS/Demo/RX600_RX62N-RSK_Renesas/RTOSDemo/ParTest.c
index de7f5e8..32b855b 100644
--- a/FreeRTOS/Demo/RX600_RX62N-RSK_Renesas/RTOSDemo/ParTest.c
+++ b/FreeRTOS/Demo/RX600_RX62N-RSK_Renesas/RTOSDemo/ParTest.c
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

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 77de772..fcf9f8c 100644
--- a/FreeRTOS/Demo/RX600_RX62N-RSK_Renesas/RTOSDemo/include/IntQueueTimer.h
+++ b/FreeRTOS/Demo/RX600_RX62N-RSK_Renesas/RTOSDemo/include/IntQueueTimer.h
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

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 2376631..0f93266 100644
--- a/FreeRTOS/Demo/RX600_RX62N-RSK_Renesas/RTOSDemo/main-blinky.c
+++ b/FreeRTOS/Demo/RX600_RX62N-RSK_Renesas/RTOSDemo/main-blinky.c
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

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 2096cd9..9232b74 100644
--- a/FreeRTOS/Demo/RX600_RX62N-RSK_Renesas/RTOSDemo/main-full.c
+++ b/FreeRTOS/Demo/RX600_RX62N-RSK_Renesas/RTOSDemo/main-full.c
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

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 83bbfdb..ab398e1 100644
--- a/FreeRTOS/Demo/RX600_RX62N-RSK_Renesas/RTOSDemo/uIP_Task.c
+++ b/FreeRTOS/Demo/RX600_RX62N-RSK_Renesas/RTOSDemo/uIP_Task.c
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

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 4bd6191..b92d38e 100644
--- a/FreeRTOS/Demo/RX600_RX62N-RSK_Renesas/RTOSDemo/webserver/EMAC.c
+++ b/FreeRTOS/Demo/RX600_RX62N-RSK_Renesas/RTOSDemo/webserver/EMAC.c
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Demo/RX600_RX630-RSK_Renesas/RTOSDemo/FreeRTOSConfig.h b/FreeRTOS/Demo/RX600_RX630-RSK_Renesas/RTOSDemo/FreeRTOSConfig.h
index 9e44a56..db4930c 100644
--- a/FreeRTOS/Demo/RX600_RX630-RSK_Renesas/RTOSDemo/FreeRTOSConfig.h
+++ b/FreeRTOS/Demo/RX600_RX630-RSK_Renesas/RTOSDemo/FreeRTOSConfig.h
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Demo/RX600_RX630-RSK_Renesas/RTOSDemo/HighFrequencyTimerTest.c b/FreeRTOS/Demo/RX600_RX630-RSK_Renesas/RTOSDemo/HighFrequencyTimerTest.c
index ac98cc1..fb38c93 100644
--- a/FreeRTOS/Demo/RX600_RX630-RSK_Renesas/RTOSDemo/HighFrequencyTimerTest.c
+++ b/FreeRTOS/Demo/RX600_RX630-RSK_Renesas/RTOSDemo/HighFrequencyTimerTest.c
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Demo/RX600_RX630-RSK_Renesas/RTOSDemo/IntQueueTimer.c b/FreeRTOS/Demo/RX600_RX630-RSK_Renesas/RTOSDemo/IntQueueTimer.c
index 40eb0b9..a0810fc 100644
--- a/FreeRTOS/Demo/RX600_RX630-RSK_Renesas/RTOSDemo/IntQueueTimer.c
+++ b/FreeRTOS/Demo/RX600_RX630-RSK_Renesas/RTOSDemo/IntQueueTimer.c
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Demo/RX600_RX630-RSK_Renesas/RTOSDemo/ParTest.c b/FreeRTOS/Demo/RX600_RX630-RSK_Renesas/RTOSDemo/ParTest.c
index 0533e29..60e75a0 100644
--- a/FreeRTOS/Demo/RX600_RX630-RSK_Renesas/RTOSDemo/ParTest.c
+++ b/FreeRTOS/Demo/RX600_RX630-RSK_Renesas/RTOSDemo/ParTest.c
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

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 77de772..fcf9f8c 100644
--- a/FreeRTOS/Demo/RX600_RX630-RSK_Renesas/RTOSDemo/include/IntQueueTimer.h
+++ b/FreeRTOS/Demo/RX600_RX630-RSK_Renesas/RTOSDemo/include/IntQueueTimer.h
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

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 0c4a311..d770974 100644
--- a/FreeRTOS/Demo/RX600_RX630-RSK_Renesas/RTOSDemo/main-blinky.c
+++ b/FreeRTOS/Demo/RX600_RX630-RSK_Renesas/RTOSDemo/main-blinky.c
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

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 a456ca4..73c01e6 100644
--- a/FreeRTOS/Demo/RX600_RX630-RSK_Renesas/RTOSDemo/main-full.c
+++ b/FreeRTOS/Demo/RX600_RX630-RSK_Renesas/RTOSDemo/main-full.c
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Demo/RX600_RX63N-RDK_Renesas/RTOSDemo/FreeRTOSConfig.h b/FreeRTOS/Demo/RX600_RX63N-RDK_Renesas/RTOSDemo/FreeRTOSConfig.h
index 434587d..f116e78 100644
--- a/FreeRTOS/Demo/RX600_RX63N-RDK_Renesas/RTOSDemo/FreeRTOSConfig.h
+++ b/FreeRTOS/Demo/RX600_RX63N-RDK_Renesas/RTOSDemo/FreeRTOSConfig.h
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Demo/RX600_RX63N-RDK_Renesas/RTOSDemo/HighFrequencyTimerTest.c b/FreeRTOS/Demo/RX600_RX63N-RDK_Renesas/RTOSDemo/HighFrequencyTimerTest.c
index c810a1e..7f2601e 100644
--- a/FreeRTOS/Demo/RX600_RX63N-RDK_Renesas/RTOSDemo/HighFrequencyTimerTest.c
+++ b/FreeRTOS/Demo/RX600_RX63N-RDK_Renesas/RTOSDemo/HighFrequencyTimerTest.c
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Demo/RX600_RX63N-RDK_Renesas/RTOSDemo/IntQueueTimer.c b/FreeRTOS/Demo/RX600_RX63N-RDK_Renesas/RTOSDemo/IntQueueTimer.c
index 271a837..edbfdfa 100644
--- a/FreeRTOS/Demo/RX600_RX63N-RDK_Renesas/RTOSDemo/IntQueueTimer.c
+++ b/FreeRTOS/Demo/RX600_RX63N-RDK_Renesas/RTOSDemo/IntQueueTimer.c
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Demo/RX600_RX63N-RDK_Renesas/RTOSDemo/IntQueueTimer.h b/FreeRTOS/Demo/RX600_RX63N-RDK_Renesas/RTOSDemo/IntQueueTimer.h
index 77de772..fcf9f8c 100644
--- a/FreeRTOS/Demo/RX600_RX63N-RDK_Renesas/RTOSDemo/IntQueueTimer.h
+++ b/FreeRTOS/Demo/RX600_RX63N-RDK_Renesas/RTOSDemo/IntQueueTimer.h
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Demo/RX600_RX63N-RDK_Renesas/RTOSDemo/ParTest.c b/FreeRTOS/Demo/RX600_RX63N-RDK_Renesas/RTOSDemo/ParTest.c
index 16e1721..ee353bf 100644
--- a/FreeRTOS/Demo/RX600_RX63N-RDK_Renesas/RTOSDemo/ParTest.c
+++ b/FreeRTOS/Demo/RX600_RX63N-RDK_Renesas/RTOSDemo/ParTest.c
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

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 6ba6522..57cc8d9 100644
--- a/FreeRTOS/Demo/RX600_RX63N-RDK_Renesas/RTOSDemo/main-blinky.c
+++ b/FreeRTOS/Demo/RX600_RX63N-RDK_Renesas/RTOSDemo/main-blinky.c
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

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 ea36cef..f5db0e8 100644
--- a/FreeRTOS/Demo/RX600_RX63N-RDK_Renesas/RTOSDemo/main-full.c
+++ b/FreeRTOS/Demo/RX600_RX63N-RDK_Renesas/RTOSDemo/main-full.c
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

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 83bbfdb..ab398e1 100644
--- a/FreeRTOS/Demo/RX600_RX63N-RDK_Renesas/RTOSDemo/uIP_Task.c
+++ b/FreeRTOS/Demo/RX600_RX63N-RDK_Renesas/RTOSDemo/uIP_Task.c
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

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 6869a1b..3abd315 100644
--- a/FreeRTOS/Demo/RX600_RX63N-RDK_Renesas/RTOSDemo/webserver/EMAC.c
+++ b/FreeRTOS/Demo/RX600_RX63N-RDK_Renesas/RTOSDemo/webserver/EMAC.c
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

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 4907394..ab9542e 100644
--- a/FreeRTOS/Demo/RX600_RX64M_RSK_GCC_e2studio/src/FreeRTOSConfig.h
+++ b/FreeRTOS/Demo/RX600_RX64M_RSK_GCC_e2studio/src/FreeRTOSConfig.h
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

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 d6452a2..0bf78e3 100644
--- a/FreeRTOS/Demo/RX600_RX64M_RSK_GCC_e2studio/src/IntQueueTimer.c
+++ b/FreeRTOS/Demo/RX600_RX64M_RSK_GCC_e2studio/src/IntQueueTimer.c
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

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 77de772..fcf9f8c 100644
--- a/FreeRTOS/Demo/RX600_RX64M_RSK_GCC_e2studio/src/IntQueueTimer.h
+++ b/FreeRTOS/Demo/RX600_RX64M_RSK_GCC_e2studio/src/IntQueueTimer.h
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

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 fcf418c..0ce5574 100644
--- a/FreeRTOS/Demo/RX600_RX64M_RSK_GCC_e2studio/src/ParTest.c
+++ b/FreeRTOS/Demo/RX600_RX64M_RSK_GCC_e2studio/src/ParTest.c
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

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 9f7c3b4..3100797 100644
--- a/FreeRTOS/Demo/RX600_RX64M_RSK_GCC_e2studio/src/RegTest.S
+++ b/FreeRTOS/Demo/RX600_RX64M_RSK_GCC_e2studio/src/RegTest.S
@@ -1,5 +1,5 @@
 ;/*

-;    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+;    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

 ;    All rights reserved

 ;

 ;    VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

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 4caf031..39fab13 100644
--- a/FreeRTOS/Demo/RX600_RX64M_RSK_GCC_e2studio/src/main.c
+++ b/FreeRTOS/Demo/RX600_RX64M_RSK_GCC_e2studio/src/main.c
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

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 623c032..af2e67e 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,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

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 1d8cf36..42360db 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,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

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 4907394..ab9542e 100644
--- a/FreeRTOS/Demo/RX600_RX64M_RSK_Renesas_e2studio/Source/FreeRTOSConfig.h
+++ b/FreeRTOS/Demo/RX600_RX64M_RSK_Renesas_e2studio/Source/FreeRTOSConfig.h
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

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 a40173e..6d8d0b1 100644
--- a/FreeRTOS/Demo/RX600_RX64M_RSK_Renesas_e2studio/Source/IntQueueTimer.c
+++ b/FreeRTOS/Demo/RX600_RX64M_RSK_Renesas_e2studio/Source/IntQueueTimer.c
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

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 77de772..fcf9f8c 100644
--- a/FreeRTOS/Demo/RX600_RX64M_RSK_Renesas_e2studio/Source/IntQueueTimer.h
+++ b/FreeRTOS/Demo/RX600_RX64M_RSK_Renesas_e2studio/Source/IntQueueTimer.h
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

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 d24048c..6e45b13 100644
--- a/FreeRTOS/Demo/RX600_RX64M_RSK_Renesas_e2studio/Source/ParTest.c
+++ b/FreeRTOS/Demo/RX600_RX64M_RSK_Renesas_e2studio/Source/ParTest.c
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

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 6cf29c4..60eed56 100644
--- a/FreeRTOS/Demo/RX600_RX64M_RSK_Renesas_e2studio/Source/RegTest.src
+++ b/FreeRTOS/Demo/RX600_RX64M_RSK_Renesas_e2studio/Source/RegTest.src
@@ -1,5 +1,5 @@
 ;/*

-;    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+;    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

 ;    All rights reserved

 ;

 ;    VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

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 0d6f896..c30ac5f 100644
--- a/FreeRTOS/Demo/RX600_RX64M_RSK_Renesas_e2studio/Source/main.c
+++ b/FreeRTOS/Demo/RX600_RX64M_RSK_Renesas_e2studio/Source/main.c
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

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 623c032..af2e67e 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,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

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 cfbc989..2e71ca3 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,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Demo/SuperH_SH7216_Renesas/RTOSDemo/FreeRTOSConfig.h b/FreeRTOS/Demo/SuperH_SH7216_Renesas/RTOSDemo/FreeRTOSConfig.h
index 78ec054..ba945a3 100644
--- a/FreeRTOS/Demo/SuperH_SH7216_Renesas/RTOSDemo/FreeRTOSConfig.h
+++ b/FreeRTOS/Demo/SuperH_SH7216_Renesas/RTOSDemo/FreeRTOSConfig.h
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Demo/SuperH_SH7216_Renesas/RTOSDemo/ParTest/ParTest.c b/FreeRTOS/Demo/SuperH_SH7216_Renesas/RTOSDemo/ParTest/ParTest.c
index 2c10bc1..aadfd3f 100644
--- a/FreeRTOS/Demo/SuperH_SH7216_Renesas/RTOSDemo/ParTest/ParTest.c
+++ b/FreeRTOS/Demo/SuperH_SH7216_Renesas/RTOSDemo/ParTest/ParTest.c
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Demo/SuperH_SH7216_Renesas/RTOSDemo/flop.c b/FreeRTOS/Demo/SuperH_SH7216_Renesas/RTOSDemo/flop.c
index 1fe30d4..6e00f13 100644
--- a/FreeRTOS/Demo/SuperH_SH7216_Renesas/RTOSDemo/flop.c
+++ b/FreeRTOS/Demo/SuperH_SH7216_Renesas/RTOSDemo/flop.c
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Demo/SuperH_SH7216_Renesas/RTOSDemo/main.c b/FreeRTOS/Demo/SuperH_SH7216_Renesas/RTOSDemo/main.c
index 02b8917..14d0271 100644
--- a/FreeRTOS/Demo/SuperH_SH7216_Renesas/RTOSDemo/main.c
+++ b/FreeRTOS/Demo/SuperH_SH7216_Renesas/RTOSDemo/main.c
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Demo/SuperH_SH7216_Renesas/RTOSDemo/regtest.src b/FreeRTOS/Demo/SuperH_SH7216_Renesas/RTOSDemo/regtest.src
index c49c7da..e6b1a0a 100644
--- a/FreeRTOS/Demo/SuperH_SH7216_Renesas/RTOSDemo/regtest.src
+++ b/FreeRTOS/Demo/SuperH_SH7216_Renesas/RTOSDemo/regtest.src
@@ -1,5 +1,5 @@
 ;/*

-;    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+;    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

 ;	

 ;

 ;    ***************************************************************************

diff --git a/FreeRTOS/Demo/SuperH_SH7216_Renesas/RTOSDemo/uIP_Task.c b/FreeRTOS/Demo/SuperH_SH7216_Renesas/RTOSDemo/uIP_Task.c
index 982202c..0336708 100644
--- a/FreeRTOS/Demo/SuperH_SH7216_Renesas/RTOSDemo/uIP_Task.c
+++ b/FreeRTOS/Demo/SuperH_SH7216_Renesas/RTOSDemo/uIP_Task.c
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Demo/SuperH_SH7216_Renesas/RTOSDemo/webserver/EMAC.c b/FreeRTOS/Demo/SuperH_SH7216_Renesas/RTOSDemo/webserver/EMAC.c
index af50593..bd429e8 100644
--- a/FreeRTOS/Demo/SuperH_SH7216_Renesas/RTOSDemo/webserver/EMAC.c
+++ b/FreeRTOS/Demo/SuperH_SH7216_Renesas/RTOSDemo/webserver/EMAC.c
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

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 621e878..551cb68 100644
--- a/FreeRTOS/Demo/SuperH_SH7216_Renesas/RTOSDemo/webserver/EMAC_ISR.src
+++ b/FreeRTOS/Demo/SuperH_SH7216_Renesas/RTOSDemo/webserver/EMAC_ISR.src
@@ -1,5 +1,5 @@
 ;/*

-;    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+;    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

 ;	

 ;

 ;    ***************************************************************************

diff --git a/FreeRTOS/Demo/TriCore_TC1782_TriBoard_GCC/RTOSDemo/FreeRTOSConfig.h b/FreeRTOS/Demo/TriCore_TC1782_TriBoard_GCC/RTOSDemo/FreeRTOSConfig.h
index 83ee697..fabb6c5 100644
--- a/FreeRTOS/Demo/TriCore_TC1782_TriBoard_GCC/RTOSDemo/FreeRTOSConfig.h
+++ b/FreeRTOS/Demo/TriCore_TC1782_TriBoard_GCC/RTOSDemo/FreeRTOSConfig.h
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Demo/TriCore_TC1782_TriBoard_GCC/RTOSDemo/InterruptNestTest.c b/FreeRTOS/Demo/TriCore_TC1782_TriBoard_GCC/RTOSDemo/InterruptNestTest.c
index 494f580..a3dcbe4 100644
--- a/FreeRTOS/Demo/TriCore_TC1782_TriBoard_GCC/RTOSDemo/InterruptNestTest.c
+++ b/FreeRTOS/Demo/TriCore_TC1782_TriBoard_GCC/RTOSDemo/InterruptNestTest.c
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Demo/TriCore_TC1782_TriBoard_GCC/RTOSDemo/InterruptNestTest.h b/FreeRTOS/Demo/TriCore_TC1782_TriBoard_GCC/RTOSDemo/InterruptNestTest.h
index 76222eb..16cca29 100644
--- a/FreeRTOS/Demo/TriCore_TC1782_TriBoard_GCC/RTOSDemo/InterruptNestTest.h
+++ b/FreeRTOS/Demo/TriCore_TC1782_TriBoard_GCC/RTOSDemo/InterruptNestTest.h
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Demo/TriCore_TC1782_TriBoard_GCC/RTOSDemo/ParTest.c b/FreeRTOS/Demo/TriCore_TC1782_TriBoard_GCC/RTOSDemo/ParTest.c
index dfbb686..aa2bcbf 100644
--- a/FreeRTOS/Demo/TriCore_TC1782_TriBoard_GCC/RTOSDemo/ParTest.c
+++ b/FreeRTOS/Demo/TriCore_TC1782_TriBoard_GCC/RTOSDemo/ParTest.c
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Demo/TriCore_TC1782_TriBoard_GCC/RTOSDemo/main.c b/FreeRTOS/Demo/TriCore_TC1782_TriBoard_GCC/RTOSDemo/main.c
index 6961153..3db36a1 100644
--- a/FreeRTOS/Demo/TriCore_TC1782_TriBoard_GCC/RTOSDemo/main.c
+++ b/FreeRTOS/Demo/TriCore_TC1782_TriBoard_GCC/RTOSDemo/main.c
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Demo/TriCore_TC1782_TriBoard_GCC/RTOSDemo/serial.c b/FreeRTOS/Demo/TriCore_TC1782_TriBoard_GCC/RTOSDemo/serial.c
index c3dd70b..64a9e2a 100644
--- a/FreeRTOS/Demo/TriCore_TC1782_TriBoard_GCC/RTOSDemo/serial.c
+++ b/FreeRTOS/Demo/TriCore_TC1782_TriBoard_GCC/RTOSDemo/serial.c
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Demo/WIN32-MSVC/DemosModifiedForLowTickRate/recmutex.c b/FreeRTOS/Demo/WIN32-MSVC/DemosModifiedForLowTickRate/recmutex.c
index d784200..5be6ec9 100644
--- a/FreeRTOS/Demo/WIN32-MSVC/DemosModifiedForLowTickRate/recmutex.c
+++ b/FreeRTOS/Demo/WIN32-MSVC/DemosModifiedForLowTickRate/recmutex.c
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Demo/WIN32-MSVC/FreeRTOSConfig.h b/FreeRTOS/Demo/WIN32-MSVC/FreeRTOSConfig.h
index 0a86eb4..5f4b9ee 100644
--- a/FreeRTOS/Demo/WIN32-MSVC/FreeRTOSConfig.h
+++ b/FreeRTOS/Demo/WIN32-MSVC/FreeRTOSConfig.h
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Demo/WIN32-MSVC/Run-time-stats-utils.c b/FreeRTOS/Demo/WIN32-MSVC/Run-time-stats-utils.c
index 9f04deb..5a7899d 100644
--- a/FreeRTOS/Demo/WIN32-MSVC/Run-time-stats-utils.c
+++ b/FreeRTOS/Demo/WIN32-MSVC/Run-time-stats-utils.c
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Demo/WIN32-MSVC/main.c b/FreeRTOS/Demo/WIN32-MSVC/main.c
index f6cc6df..13690ec 100644
--- a/FreeRTOS/Demo/WIN32-MSVC/main.c
+++ b/FreeRTOS/Demo/WIN32-MSVC/main.c
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Demo/WIN32-MSVC/main_blinky.c b/FreeRTOS/Demo/WIN32-MSVC/main_blinky.c
index d2048f4..a7a50be 100644
--- a/FreeRTOS/Demo/WIN32-MSVC/main_blinky.c
+++ b/FreeRTOS/Demo/WIN32-MSVC/main_blinky.c
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Demo/WIN32-MSVC/main_full.c b/FreeRTOS/Demo/WIN32-MSVC/main_full.c
index f166a29..6823ed4 100644
--- a/FreeRTOS/Demo/WIN32-MSVC/main_full.c
+++ b/FreeRTOS/Demo/WIN32-MSVC/main_full.c
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Demo/WIN32-MingW/DemosModifiedForLowTickRate/recmutex.c b/FreeRTOS/Demo/WIN32-MingW/DemosModifiedForLowTickRate/recmutex.c
index d784200..5be6ec9 100644
--- a/FreeRTOS/Demo/WIN32-MingW/DemosModifiedForLowTickRate/recmutex.c
+++ b/FreeRTOS/Demo/WIN32-MingW/DemosModifiedForLowTickRate/recmutex.c
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Demo/WIN32-MingW/FreeRTOSConfig.h b/FreeRTOS/Demo/WIN32-MingW/FreeRTOSConfig.h
index 29f3312..ece7a14 100644
--- a/FreeRTOS/Demo/WIN32-MingW/FreeRTOSConfig.h
+++ b/FreeRTOS/Demo/WIN32-MingW/FreeRTOSConfig.h
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Demo/WIN32-MingW/Run-time-stats-utils.c b/FreeRTOS/Demo/WIN32-MingW/Run-time-stats-utils.c
index 9f04deb..5a7899d 100644
--- a/FreeRTOS/Demo/WIN32-MingW/Run-time-stats-utils.c
+++ b/FreeRTOS/Demo/WIN32-MingW/Run-time-stats-utils.c
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Demo/WIN32-MingW/main.c b/FreeRTOS/Demo/WIN32-MingW/main.c
index f5871db..ee2a3d0 100644
--- a/FreeRTOS/Demo/WIN32-MingW/main.c
+++ b/FreeRTOS/Demo/WIN32-MingW/main.c
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Demo/WIN32-MingW/main_blinky.c b/FreeRTOS/Demo/WIN32-MingW/main_blinky.c
index cc9eae5..cf7d5f5 100644
--- a/FreeRTOS/Demo/WIN32-MingW/main_blinky.c
+++ b/FreeRTOS/Demo/WIN32-MingW/main_blinky.c
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Demo/WIN32-MingW/main_full.c b/FreeRTOS/Demo/WIN32-MingW/main_full.c
index adec022..126db0d 100644
--- a/FreeRTOS/Demo/WIN32-MingW/main_full.c
+++ b/FreeRTOS/Demo/WIN32-MingW/main_full.c
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Demo/WizNET_DEMO_GCC_ARM7/FreeRTOSConfig.h b/FreeRTOS/Demo/WizNET_DEMO_GCC_ARM7/FreeRTOSConfig.h
index b892ca6..e36f9b7 100644
--- a/FreeRTOS/Demo/WizNET_DEMO_GCC_ARM7/FreeRTOSConfig.h
+++ b/FreeRTOS/Demo/WizNET_DEMO_GCC_ARM7/FreeRTOSConfig.h
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Demo/WizNET_DEMO_GCC_ARM7/HTTP_Serv.c b/FreeRTOS/Demo/WizNET_DEMO_GCC_ARM7/HTTP_Serv.c
index ec9ad48..c8377e1 100644
--- a/FreeRTOS/Demo/WizNET_DEMO_GCC_ARM7/HTTP_Serv.c
+++ b/FreeRTOS/Demo/WizNET_DEMO_GCC_ARM7/HTTP_Serv.c
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Demo/WizNET_DEMO_GCC_ARM7/HTTP_Serv.h b/FreeRTOS/Demo/WizNET_DEMO_GCC_ARM7/HTTP_Serv.h
index f33d14c..1e2c8c0 100644
--- a/FreeRTOS/Demo/WizNET_DEMO_GCC_ARM7/HTTP_Serv.h
+++ b/FreeRTOS/Demo/WizNET_DEMO_GCC_ARM7/HTTP_Serv.h
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Demo/WizNET_DEMO_GCC_ARM7/Makefile b/FreeRTOS/Demo/WizNET_DEMO_GCC_ARM7/Makefile
index e292084..6ebacad 100644
--- a/FreeRTOS/Demo/WizNET_DEMO_GCC_ARM7/Makefile
+++ b/FreeRTOS/Demo/WizNET_DEMO_GCC_ARM7/Makefile
@@ -1,5 +1,5 @@
 #/*

-#    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+#    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

 #	

 #

 #    ***************************************************************************

diff --git a/FreeRTOS/Demo/WizNET_DEMO_GCC_ARM7/TCP.c b/FreeRTOS/Demo/WizNET_DEMO_GCC_ARM7/TCP.c
index 30d2be4..6e04ddf 100644
--- a/FreeRTOS/Demo/WizNET_DEMO_GCC_ARM7/TCP.c
+++ b/FreeRTOS/Demo/WizNET_DEMO_GCC_ARM7/TCP.c
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Demo/WizNET_DEMO_GCC_ARM7/TCP.h b/FreeRTOS/Demo/WizNET_DEMO_GCC_ARM7/TCP.h
index e3cbc83..e99a84e 100644
--- a/FreeRTOS/Demo/WizNET_DEMO_GCC_ARM7/TCP.h
+++ b/FreeRTOS/Demo/WizNET_DEMO_GCC_ARM7/TCP.h
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Demo/WizNET_DEMO_GCC_ARM7/TCPISR.c b/FreeRTOS/Demo/WizNET_DEMO_GCC_ARM7/TCPISR.c
index b809c85..8bcd119 100644
--- a/FreeRTOS/Demo/WizNET_DEMO_GCC_ARM7/TCPISR.c
+++ b/FreeRTOS/Demo/WizNET_DEMO_GCC_ARM7/TCPISR.c
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Demo/WizNET_DEMO_GCC_ARM7/html_pages.h b/FreeRTOS/Demo/WizNET_DEMO_GCC_ARM7/html_pages.h
index 6a35f1d..bc20f82 100644
--- a/FreeRTOS/Demo/WizNET_DEMO_GCC_ARM7/html_pages.h
+++ b/FreeRTOS/Demo/WizNET_DEMO_GCC_ARM7/html_pages.h
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Demo/WizNET_DEMO_GCC_ARM7/i2c.c b/FreeRTOS/Demo/WizNET_DEMO_GCC_ARM7/i2c.c
index e7d8180..bca04dd 100644
--- a/FreeRTOS/Demo/WizNET_DEMO_GCC_ARM7/i2c.c
+++ b/FreeRTOS/Demo/WizNET_DEMO_GCC_ARM7/i2c.c
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Demo/WizNET_DEMO_GCC_ARM7/i2c.h b/FreeRTOS/Demo/WizNET_DEMO_GCC_ARM7/i2c.h
index 1c7d580..9d99cd7 100644
--- a/FreeRTOS/Demo/WizNET_DEMO_GCC_ARM7/i2c.h
+++ b/FreeRTOS/Demo/WizNET_DEMO_GCC_ARM7/i2c.h
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Demo/WizNET_DEMO_GCC_ARM7/i2cISR.c b/FreeRTOS/Demo/WizNET_DEMO_GCC_ARM7/i2cISR.c
index 5a54dce..b280318 100644
--- a/FreeRTOS/Demo/WizNET_DEMO_GCC_ARM7/i2cISR.c
+++ b/FreeRTOS/Demo/WizNET_DEMO_GCC_ARM7/i2cISR.c
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Demo/WizNET_DEMO_GCC_ARM7/main.c b/FreeRTOS/Demo/WizNET_DEMO_GCC_ARM7/main.c
index d2372f2..d1706a9 100644
--- a/FreeRTOS/Demo/WizNET_DEMO_GCC_ARM7/main.c
+++ b/FreeRTOS/Demo/WizNET_DEMO_GCC_ARM7/main.c
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Demo/WizNET_DEMO_TERN_186/FreeRTOSConfig.h b/FreeRTOS/Demo/WizNET_DEMO_TERN_186/FreeRTOSConfig.h
index 2731d66..357848c 100644
--- a/FreeRTOS/Demo/WizNET_DEMO_TERN_186/FreeRTOSConfig.h
+++ b/FreeRTOS/Demo/WizNET_DEMO_TERN_186/FreeRTOSConfig.h
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Demo/WizNET_DEMO_TERN_186/HTTPTask.c b/FreeRTOS/Demo/WizNET_DEMO_TERN_186/HTTPTask.c
index 8f1b5c5..89dbc3b 100644
--- a/FreeRTOS/Demo/WizNET_DEMO_TERN_186/HTTPTask.c
+++ b/FreeRTOS/Demo/WizNET_DEMO_TERN_186/HTTPTask.c
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Demo/WizNET_DEMO_TERN_186/HTTPTask.h b/FreeRTOS/Demo/WizNET_DEMO_TERN_186/HTTPTask.h
index eb0ab67..380de88 100644
--- a/FreeRTOS/Demo/WizNET_DEMO_TERN_186/HTTPTask.h
+++ b/FreeRTOS/Demo/WizNET_DEMO_TERN_186/HTTPTask.h
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Demo/WizNET_DEMO_TERN_186/main.c b/FreeRTOS/Demo/WizNET_DEMO_TERN_186/main.c
index a1ae7ba..fb14679 100644
--- a/FreeRTOS/Demo/WizNET_DEMO_TERN_186/main.c
+++ b/FreeRTOS/Demo/WizNET_DEMO_TERN_186/main.c
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Demo/WizNET_DEMO_TERN_186/serial/serial.c b/FreeRTOS/Demo/WizNET_DEMO_TERN_186/serial/serial.c
index 916fabc..e5cffce 100644
--- a/FreeRTOS/Demo/WizNET_DEMO_TERN_186/serial/serial.c
+++ b/FreeRTOS/Demo/WizNET_DEMO_TERN_186/serial/serial.c
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Demo/Xilinx_FreeRTOS_BSP/repo/bsp/freertos822_xilinx_v1_0/src/Source/include/FreeRTOS.h b/FreeRTOS/Demo/Xilinx_FreeRTOS_BSP/repo/bsp/freertos822_xilinx_v1_0/src/Source/include/FreeRTOS.h
deleted file mode 100644
index 9b8bae2..0000000
--- a/FreeRTOS/Demo/Xilinx_FreeRTOS_BSP/repo/bsp/freertos822_xilinx_v1_0/src/Source/include/FreeRTOS.h
+++ /dev/null
@@ -1,799 +0,0 @@
-/*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

-    All rights reserved

-

-    VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

-

-    This file is part of the FreeRTOS distribution.

-

-    FreeRTOS is free software; you can redistribute it and/or modify it under

-    the terms of the GNU General Public License (version 2) as published by the

-    Free Software Foundation >>!AND MODIFIED BY!<< the FreeRTOS exception.

-

-    ***************************************************************************

-    >>!   NOTE: The modification to the GPL is included to allow you to     !<<

-    >>!   distribute a combined work that includes FreeRTOS without being   !<<

-    >>!   obliged to provide the source code for proprietary components     !<<

-    >>!   outside of the FreeRTOS kernel.                                   !<<

-    ***************************************************************************

-

-    FreeRTOS is distributed in the hope that it will be useful, but WITHOUT ANY

-    WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS

-    FOR A PARTICULAR PURPOSE.  Full license text is available on the following

-    link: http://www.freertos.org/a00114.html

-

-    ***************************************************************************

-     *                                                                       *

-     *    FreeRTOS provides completely free yet professionally developed,    *

-     *    robust, strictly quality controlled, supported, and cross          *

-     *    platform software that is more than just the market leader, it     *

-     *    is the industry's de facto standard.                               *

-     *                                                                       *

-     *    Help yourself get started quickly while simultaneously helping     *

-     *    to support the FreeRTOS project by purchasing a FreeRTOS           *

-     *    tutorial book, reference manual, or both:                          *

-     *    http://www.FreeRTOS.org/Documentation                              *

-     *                                                                       *

-    ***************************************************************************

-

-    http://www.FreeRTOS.org/FAQHelp.html - Having a problem?  Start by reading

-    the FAQ page "My application does not run, what could be wrong?".  Have you

-    defined configASSERT()?

-

-    http://www.FreeRTOS.org/support - In return for receiving this top quality

-    embedded software for free we request you assist our global community by

-    participating in the support forum.

-

-    http://www.FreeRTOS.org/training - Investing in training allows your team to

-    be as productive as possible as early as possible.  Now you can receive

-    FreeRTOS training directly from Richard Barry, CEO of Real Time Engineers

-    Ltd, and the world's leading authority on the world's leading RTOS.

-

-    http://www.FreeRTOS.org/plus - A selection of FreeRTOS ecosystem products,

-    including FreeRTOS+Trace - an indispensable productivity tool, a DOS

-    compatible FAT file system, and our tiny thread aware UDP/IP stack.

-

-    http://www.FreeRTOS.org/labs - Where new FreeRTOS products go to incubate.

-    Come and try FreeRTOS+TCP, our new open source TCP/IP stack for FreeRTOS.

-

-    http://www.OpenRTOS.com - Real Time Engineers ltd. license FreeRTOS to High

-    Integrity Systems ltd. to sell under the OpenRTOS brand.  Low cost OpenRTOS

-    licenses offer ticketed support, indemnification and commercial middleware.

-

-    http://www.SafeRTOS.com - High Integrity Systems also provide a safety

-    engineered and independently SIL3 certified version for use in safety and

-    mission critical applications that require provable dependability.

-

-    1 tab == 4 spaces!

-*/

-

-#ifndef INC_FREERTOS_H

-#define INC_FREERTOS_H

-

-/*

- * Include the generic headers required for the FreeRTOS port being used.

- */

-#include <stddef.h>

-

-/*

- * If stdint.h cannot be located then:

- *   + If using GCC ensure the -nostdint options is *not* being used.

- *   + Ensure the project's include path includes the directory in which your

- *     compiler stores stdint.h.

- *   + Set any compiler options necessary for it to support C99, as technically

- *     stdint.h is only mandatory with C99 (FreeRTOS does not require C99 in any

- *     other way).

- *   + The FreeRTOS download includes a simple stdint.h definition that can be

- *     used in cases where none is provided by the compiler.  The files only

- *     contains the typedefs required to build FreeRTOS.  Read the instructions

- *     in FreeRTOS/source/stdint.readme for more information.

- */

-#include <stdint.h> /* READ COMMENT ABOVE. */

-

-#ifdef __cplusplus

-extern "C" {

-#endif

-

-/* Application specific configuration options. */

-#include "FreeRTOSConfig.h"

-

-/* Basic FreeRTOS definitions. */

-#include "projdefs.h"

-

-/* Definitions specific to the port being used. */

-#include "portable.h"

-

-/*

- * Check all the required application specific macros have been defined.

- * These macros are application specific and (as downloaded) are defined

- * within FreeRTOSConfig.h.

- */

-

-#ifndef configMINIMAL_STACK_SIZE

-	#error Missing definition:  configMINIMAL_STACK_SIZE must be defined in FreeRTOSConfig.h.  configMINIMAL_STACK_SIZE defines the size (in words) of the stack allocated to the idle task.  Refer to the demo project provided for your port for a suitable value.

-#endif

-

-#ifndef configMAX_PRIORITIES

-	#error Missing definition:  configMAX_PRIORITIES must be defined in FreeRTOSConfig.h.  See the Configuration section of the FreeRTOS API documentation for details.

-#endif

-

-#ifndef configUSE_PREEMPTION

-	#error Missing definition:  configUSE_PREEMPTION must be defined in FreeRTOSConfig.h as either 1 or 0.  See the Configuration section of the FreeRTOS API documentation for details.

-#endif

-

-#ifndef configUSE_IDLE_HOOK

-	#error Missing definition:  configUSE_IDLE_HOOK must be defined in FreeRTOSConfig.h as either 1 or 0.  See the Configuration section of the FreeRTOS API documentation for details.

-#endif

-

-#ifndef configUSE_TICK_HOOK

-	#error Missing definition:  configUSE_TICK_HOOK must be defined in FreeRTOSConfig.h as either 1 or 0.  See the Configuration section of the FreeRTOS API documentation for details.

-#endif

-

-#ifndef INCLUDE_vTaskPrioritySet

-	#error Missing definition:  INCLUDE_vTaskPrioritySet must be defined in FreeRTOSConfig.h as either 1 or 0.  See the Configuration section of the FreeRTOS API documentation for details.

-#endif

-

-#ifndef INCLUDE_uxTaskPriorityGet

-	#error Missing definition:  INCLUDE_uxTaskPriorityGet must be defined in FreeRTOSConfig.h as either 1 or 0.  See the Configuration section of the FreeRTOS API documentation for details.

-#endif

-

-#ifndef INCLUDE_vTaskDelete

-	#error Missing definition:  INCLUDE_vTaskDelete must be defined in FreeRTOSConfig.h as either 1 or 0.  See the Configuration section of the FreeRTOS API documentation for details.

-#endif

-

-#ifndef INCLUDE_vTaskSuspend

-	#error Missing definition:  INCLUDE_vTaskSuspend must be defined in FreeRTOSConfig.h as either 1 or 0.  See the Configuration section of the FreeRTOS API documentation for details.

-#endif

-

-#ifndef INCLUDE_vTaskDelayUntil

-	#error Missing definition:  INCLUDE_vTaskDelayUntil must be defined in FreeRTOSConfig.h as either 1 or 0.  See the Configuration section of the FreeRTOS API documentation for details.

-#endif

-

-#ifndef INCLUDE_vTaskDelay

-	#error Missing definition:  INCLUDE_vTaskDelay must be defined in FreeRTOSConfig.h as either 1 or 0.  See the Configuration section of the FreeRTOS API documentation for details.

-#endif

-

-#ifndef configUSE_16_BIT_TICKS

-	#error Missing definition:  configUSE_16_BIT_TICKS must be defined in FreeRTOSConfig.h as either 1 or 0.  See the Configuration section of the FreeRTOS API documentation for details.

-#endif

-

-#ifndef configMAX_PRIORITIES

-	#error configMAX_PRIORITIES must be defined to be greater than or equal to 1.

-#endif

-

-#ifndef configUSE_CO_ROUTINES

-	#define configUSE_CO_ROUTINES 0

-#endif

-

-#if configUSE_CO_ROUTINES != 0

-	#ifndef configMAX_CO_ROUTINE_PRIORITIES

-		#error configMAX_CO_ROUTINE_PRIORITIES must be greater than or equal to 1.

-	#endif

-#endif

-

-#ifndef INCLUDE_xTaskGetIdleTaskHandle

-	#define INCLUDE_xTaskGetIdleTaskHandle 0

-#endif

-

-#ifndef INCLUDE_xTimerGetTimerDaemonTaskHandle

-	#define INCLUDE_xTimerGetTimerDaemonTaskHandle 0

-#endif

-

-#ifndef INCLUDE_xQueueGetMutexHolder

-	#define INCLUDE_xQueueGetMutexHolder 0

-#endif

-

-#ifndef INCLUDE_xSemaphoreGetMutexHolder

-	#define INCLUDE_xSemaphoreGetMutexHolder INCLUDE_xQueueGetMutexHolder

-#endif

-

-#ifndef INCLUDE_pcTaskGetTaskName

-	#define INCLUDE_pcTaskGetTaskName 0

-#endif

-

-#ifndef configUSE_APPLICATION_TASK_TAG

-	#define configUSE_APPLICATION_TASK_TAG 0

-#endif

-

-#ifndef configNUM_THREAD_LOCAL_STORAGE_POINTERS

-	#define configNUM_THREAD_LOCAL_STORAGE_POINTERS 0

-#endif

-

-#ifndef INCLUDE_uxTaskGetStackHighWaterMark

-	#define INCLUDE_uxTaskGetStackHighWaterMark 0

-#endif

-

-#ifndef INCLUDE_eTaskGetState

-	#define INCLUDE_eTaskGetState 0

-#endif

-

-#ifndef configUSE_RECURSIVE_MUTEXES

-	#define configUSE_RECURSIVE_MUTEXES 0

-#endif

-

-#ifndef configUSE_MUTEXES

-	#define configUSE_MUTEXES 0

-#endif

-

-#ifndef configUSE_TIMERS

-	#define configUSE_TIMERS 0

-#endif

-

-#ifndef configUSE_COUNTING_SEMAPHORES

-	#define configUSE_COUNTING_SEMAPHORES 0

-#endif

-

-#ifndef configUSE_ALTERNATIVE_API

-	#define configUSE_ALTERNATIVE_API 0

-#endif

-

-#ifndef portCRITICAL_NESTING_IN_TCB

-	#define portCRITICAL_NESTING_IN_TCB 0

-#endif

-

-#ifndef configMAX_TASK_NAME_LEN

-	#define configMAX_TASK_NAME_LEN 16

-#endif

-

-#ifndef configIDLE_SHOULD_YIELD

-	#define configIDLE_SHOULD_YIELD		1

-#endif

-

-#if configMAX_TASK_NAME_LEN < 1

-	#error configMAX_TASK_NAME_LEN must be set to a minimum of 1 in FreeRTOSConfig.h

-#endif

-

-#ifndef INCLUDE_xTaskResumeFromISR

-	#define INCLUDE_xTaskResumeFromISR 1

-#endif

-

-#ifndef INCLUDE_xEventGroupSetBitFromISR

-	#define INCLUDE_xEventGroupSetBitFromISR 0

-#endif

-

-#ifndef INCLUDE_xTimerPendFunctionCall

-	#define INCLUDE_xTimerPendFunctionCall 0

-#endif

-

-#ifndef configASSERT

-	#define configASSERT( x )

-	#define configASSERT_DEFINED 0

-#else

-	#define configASSERT_DEFINED 1

-#endif

-

-/* The timers module relies on xTaskGetSchedulerState(). */

-#if configUSE_TIMERS == 1

-

-	#ifndef configTIMER_TASK_PRIORITY

-		#error If configUSE_TIMERS is set to 1 then configTIMER_TASK_PRIORITY must also be defined.

-	#endif /* configTIMER_TASK_PRIORITY */

-

-	#ifndef configTIMER_QUEUE_LENGTH

-		#error If configUSE_TIMERS is set to 1 then configTIMER_QUEUE_LENGTH must also be defined.

-	#endif /* configTIMER_QUEUE_LENGTH */

-

-	#ifndef configTIMER_TASK_STACK_DEPTH

-		#error If configUSE_TIMERS is set to 1 then configTIMER_TASK_STACK_DEPTH must also be defined.

-	#endif /* configTIMER_TASK_STACK_DEPTH */

-

-#endif /* configUSE_TIMERS */

-

-#ifndef INCLUDE_xTaskGetSchedulerState

-	#define INCLUDE_xTaskGetSchedulerState 0

-#endif

-

-#ifndef INCLUDE_xTaskGetCurrentTaskHandle

-	#define INCLUDE_xTaskGetCurrentTaskHandle 0

-#endif

-

-

-#ifndef portSET_INTERRUPT_MASK_FROM_ISR

-	#define portSET_INTERRUPT_MASK_FROM_ISR() 0

-#endif

-

-#ifndef portCLEAR_INTERRUPT_MASK_FROM_ISR

-	#define portCLEAR_INTERRUPT_MASK_FROM_ISR( uxSavedStatusValue ) ( void ) uxSavedStatusValue

-#endif

-

-#ifndef portCLEAN_UP_TCB

-	#define portCLEAN_UP_TCB( pxTCB ) ( void ) pxTCB

-#endif

-

-#ifndef portPRE_TASK_DELETE_HOOK

-	#define portPRE_TASK_DELETE_HOOK( pvTaskToDelete, pxYieldPending )

-#endif

-

-#ifndef portSETUP_TCB

-	#define portSETUP_TCB( pxTCB ) ( void ) pxTCB

-#endif

-

-#ifndef configQUEUE_REGISTRY_SIZE

-	#define configQUEUE_REGISTRY_SIZE 0U

-#endif

-

-#if ( configQUEUE_REGISTRY_SIZE < 1 )

-	#define vQueueAddToRegistry( xQueue, pcName )

-	#define vQueueUnregisterQueue( xQueue )

-#endif

-

-#ifndef portPOINTER_SIZE_TYPE

-	#define portPOINTER_SIZE_TYPE uint32_t

-#endif

-

-/* Remove any unused trace macros. */

-#ifndef traceSTART

-	/* Used to perform any necessary initialisation - for example, open a file

-	into which trace is to be written. */

-	#define traceSTART()

-#endif

-

-#ifndef traceEND

-	/* Use to close a trace, for example close a file into which trace has been

-	written. */

-	#define traceEND()

-#endif

-

-#ifndef traceTASK_SWITCHED_IN

-	/* Called after a task has been selected to run.  pxCurrentTCB holds a pointer

-	to the task control block of the selected task. */

-	#define traceTASK_SWITCHED_IN()

-#endif

-

-#ifndef traceINCREASE_TICK_COUNT

-	/* Called before stepping the tick count after waking from tickless idle

-	sleep. */

-	#define traceINCREASE_TICK_COUNT( x )

-#endif

-

-#ifndef traceLOW_POWER_IDLE_BEGIN

-	/* Called immediately before entering tickless idle. */

-	#define traceLOW_POWER_IDLE_BEGIN()

-#endif

-

-#ifndef	traceLOW_POWER_IDLE_END

-	/* Called when returning to the Idle task after a tickless idle. */

-	#define traceLOW_POWER_IDLE_END()

-#endif

-

-#ifndef traceTASK_SWITCHED_OUT

-	/* Called before a task has been selected to run.  pxCurrentTCB holds a pointer

-	to the task control block of the task being switched out. */

-	#define traceTASK_SWITCHED_OUT()

-#endif

-

-#ifndef traceTASK_PRIORITY_INHERIT

-	/* Called when a task attempts to take a mutex that is already held by a

-	lower priority task.  pxTCBOfMutexHolder is a pointer to the TCB of the task

-	that holds the mutex.  uxInheritedPriority is the priority the mutex holder

-	will inherit (the priority of the task that is attempting to obtain the

-	muted. */

-	#define traceTASK_PRIORITY_INHERIT( pxTCBOfMutexHolder, uxInheritedPriority )

-#endif

-

-#ifndef traceTASK_PRIORITY_DISINHERIT

-	/* Called when a task releases a mutex, the holding of which had resulted in

-	the task inheriting the priority of a higher priority task.

-	pxTCBOfMutexHolder is a pointer to the TCB of the task that is releasing the

-	mutex.  uxOriginalPriority is the task's configured (base) priority. */

-	#define traceTASK_PRIORITY_DISINHERIT( pxTCBOfMutexHolder, uxOriginalPriority )

-#endif

-

-#ifndef traceBLOCKING_ON_QUEUE_RECEIVE

-	/* Task is about to block because it cannot read from a

-	queue/mutex/semaphore.  pxQueue is a pointer to the queue/mutex/semaphore

-	upon which the read was attempted.  pxCurrentTCB points to the TCB of the

-	task that attempted the read. */

-	#define traceBLOCKING_ON_QUEUE_RECEIVE( pxQueue )

-#endif

-

-#ifndef traceBLOCKING_ON_QUEUE_SEND

-	/* Task is about to block because it cannot write to a

-	queue/mutex/semaphore.  pxQueue is a pointer to the queue/mutex/semaphore

-	upon which the write was attempted.  pxCurrentTCB points to the TCB of the

-	task that attempted the write. */

-	#define traceBLOCKING_ON_QUEUE_SEND( pxQueue )

-#endif

-

-#ifndef configCHECK_FOR_STACK_OVERFLOW

-	#define configCHECK_FOR_STACK_OVERFLOW 0

-#endif

-

-/* The following event macros are embedded in the kernel API calls. */

-

-#ifndef traceMOVED_TASK_TO_READY_STATE

-	#define traceMOVED_TASK_TO_READY_STATE( pxTCB )

-#endif

-

-#ifndef traceQUEUE_CREATE

-	#define traceQUEUE_CREATE( pxNewQueue )

-#endif

-

-#ifndef traceQUEUE_CREATE_FAILED

-	#define traceQUEUE_CREATE_FAILED( ucQueueType )

-#endif

-

-#ifndef traceCREATE_MUTEX

-	#define traceCREATE_MUTEX( pxNewQueue )

-#endif

-

-#ifndef traceCREATE_MUTEX_FAILED

-	#define traceCREATE_MUTEX_FAILED()

-#endif

-

-#ifndef traceGIVE_MUTEX_RECURSIVE

-	#define traceGIVE_MUTEX_RECURSIVE( pxMutex )

-#endif

-

-#ifndef traceGIVE_MUTEX_RECURSIVE_FAILED

-	#define traceGIVE_MUTEX_RECURSIVE_FAILED( pxMutex )

-#endif

-

-#ifndef traceTAKE_MUTEX_RECURSIVE

-	#define traceTAKE_MUTEX_RECURSIVE( pxMutex )

-#endif

-

-#ifndef traceTAKE_MUTEX_RECURSIVE_FAILED

-	#define traceTAKE_MUTEX_RECURSIVE_FAILED( pxMutex )

-#endif

-

-#ifndef traceCREATE_COUNTING_SEMAPHORE

-	#define traceCREATE_COUNTING_SEMAPHORE()

-#endif

-

-#ifndef traceCREATE_COUNTING_SEMAPHORE_FAILED

-	#define traceCREATE_COUNTING_SEMAPHORE_FAILED()

-#endif

-

-#ifndef traceQUEUE_SEND

-	#define traceQUEUE_SEND( pxQueue )

-#endif

-

-#ifndef traceQUEUE_SEND_FAILED

-	#define traceQUEUE_SEND_FAILED( pxQueue )

-#endif

-

-#ifndef traceQUEUE_RECEIVE

-	#define traceQUEUE_RECEIVE( pxQueue )

-#endif

-

-#ifndef traceQUEUE_PEEK

-	#define traceQUEUE_PEEK( pxQueue )

-#endif

-

-#ifndef traceQUEUE_PEEK_FROM_ISR

-	#define traceQUEUE_PEEK_FROM_ISR( pxQueue )

-#endif

-

-#ifndef traceQUEUE_RECEIVE_FAILED

-	#define traceQUEUE_RECEIVE_FAILED( pxQueue )

-#endif

-

-#ifndef traceQUEUE_SEND_FROM_ISR

-	#define traceQUEUE_SEND_FROM_ISR( pxQueue )

-#endif

-

-#ifndef traceQUEUE_SEND_FROM_ISR_FAILED

-	#define traceQUEUE_SEND_FROM_ISR_FAILED( pxQueue )

-#endif

-

-#ifndef traceQUEUE_RECEIVE_FROM_ISR

-	#define traceQUEUE_RECEIVE_FROM_ISR( pxQueue )

-#endif

-

-#ifndef traceQUEUE_RECEIVE_FROM_ISR_FAILED

-	#define traceQUEUE_RECEIVE_FROM_ISR_FAILED( pxQueue )

-#endif

-

-#ifndef traceQUEUE_PEEK_FROM_ISR_FAILED

-	#define traceQUEUE_PEEK_FROM_ISR_FAILED( pxQueue )

-#endif

-

-#ifndef traceQUEUE_DELETE

-	#define traceQUEUE_DELETE( pxQueue )

-#endif

-

-#ifndef traceTASK_CREATE

-	#define traceTASK_CREATE( pxNewTCB )

-#endif

-

-#ifndef traceTASK_CREATE_FAILED

-	#define traceTASK_CREATE_FAILED()

-#endif

-

-#ifndef traceTASK_DELETE

-	#define traceTASK_DELETE( pxTaskToDelete )

-#endif

-

-#ifndef traceTASK_DELAY_UNTIL

-	#define traceTASK_DELAY_UNTIL()

-#endif

-

-#ifndef traceTASK_DELAY

-	#define traceTASK_DELAY()

-#endif

-

-#ifndef traceTASK_PRIORITY_SET

-	#define traceTASK_PRIORITY_SET( pxTask, uxNewPriority )

-#endif

-

-#ifndef traceTASK_SUSPEND

-	#define traceTASK_SUSPEND( pxTaskToSuspend )

-#endif

-

-#ifndef traceTASK_RESUME

-	#define traceTASK_RESUME( pxTaskToResume )

-#endif

-

-#ifndef traceTASK_RESUME_FROM_ISR

-	#define traceTASK_RESUME_FROM_ISR( pxTaskToResume )

-#endif

-

-#ifndef traceTASK_INCREMENT_TICK

-	#define traceTASK_INCREMENT_TICK( xTickCount )

-#endif

-

-#ifndef traceTIMER_CREATE

-	#define traceTIMER_CREATE( pxNewTimer )

-#endif

-

-#ifndef traceTIMER_CREATE_FAILED

-	#define traceTIMER_CREATE_FAILED()

-#endif

-

-#ifndef traceTIMER_COMMAND_SEND

-	#define traceTIMER_COMMAND_SEND( xTimer, xMessageID, xMessageValueValue, xReturn )

-#endif

-

-#ifndef traceTIMER_EXPIRED

-	#define traceTIMER_EXPIRED( pxTimer )

-#endif

-

-#ifndef traceTIMER_COMMAND_RECEIVED

-	#define traceTIMER_COMMAND_RECEIVED( pxTimer, xMessageID, xMessageValue )

-#endif

-

-#ifndef traceMALLOC

-    #define traceMALLOC( pvAddress, uiSize )

-#endif

-

-#ifndef traceFREE

-    #define traceFREE( pvAddress, uiSize )

-#endif

-

-#ifndef traceEVENT_GROUP_CREATE

-	#define traceEVENT_GROUP_CREATE( xEventGroup )

-#endif

-

-#ifndef traceEVENT_GROUP_CREATE_FAILED

-	#define traceEVENT_GROUP_CREATE_FAILED()

-#endif

-

-#ifndef traceEVENT_GROUP_SYNC_BLOCK

-	#define traceEVENT_GROUP_SYNC_BLOCK( xEventGroup, uxBitsToSet, uxBitsToWaitFor )

-#endif

-

-#ifndef traceEVENT_GROUP_SYNC_END

-	#define traceEVENT_GROUP_SYNC_END( xEventGroup, uxBitsToSet, uxBitsToWaitFor, xTimeoutOccurred ) ( void ) xTimeoutOccurred

-#endif

-

-#ifndef traceEVENT_GROUP_WAIT_BITS_BLOCK

-	#define traceEVENT_GROUP_WAIT_BITS_BLOCK( xEventGroup, uxBitsToWaitFor )

-#endif

-

-#ifndef traceEVENT_GROUP_WAIT_BITS_END

-	#define traceEVENT_GROUP_WAIT_BITS_END( xEventGroup, uxBitsToWaitFor, xTimeoutOccurred ) ( void ) xTimeoutOccurred

-#endif

-

-#ifndef traceEVENT_GROUP_CLEAR_BITS

-	#define traceEVENT_GROUP_CLEAR_BITS( xEventGroup, uxBitsToClear )

-#endif

-

-#ifndef traceEVENT_GROUP_CLEAR_BITS_FROM_ISR

-	#define traceEVENT_GROUP_CLEAR_BITS_FROM_ISR( xEventGroup, uxBitsToClear )

-#endif

-

-#ifndef traceEVENT_GROUP_SET_BITS

-	#define traceEVENT_GROUP_SET_BITS( xEventGroup, uxBitsToSet )

-#endif

-

-#ifndef traceEVENT_GROUP_SET_BITS_FROM_ISR

-	#define traceEVENT_GROUP_SET_BITS_FROM_ISR( xEventGroup, uxBitsToSet )

-#endif

-

-#ifndef traceEVENT_GROUP_DELETE

-	#define traceEVENT_GROUP_DELETE( xEventGroup )

-#endif

-

-#ifndef tracePEND_FUNC_CALL

-	#define tracePEND_FUNC_CALL(xFunctionToPend, pvParameter1, ulParameter2, ret)

-#endif

-

-#ifndef tracePEND_FUNC_CALL_FROM_ISR

-	#define tracePEND_FUNC_CALL_FROM_ISR(xFunctionToPend, pvParameter1, ulParameter2, ret)

-#endif

-

-#ifndef traceQUEUE_REGISTRY_ADD

-	#define traceQUEUE_REGISTRY_ADD(xQueue, pcQueueName)

-#endif

-

-#ifndef configGENERATE_RUN_TIME_STATS

-	#define configGENERATE_RUN_TIME_STATS 0

-#endif

-

-#if ( configGENERATE_RUN_TIME_STATS == 1 )

-

-	#ifndef portCONFIGURE_TIMER_FOR_RUN_TIME_STATS

-		#error If configGENERATE_RUN_TIME_STATS is defined then portCONFIGURE_TIMER_FOR_RUN_TIME_STATS must also be defined.  portCONFIGURE_TIMER_FOR_RUN_TIME_STATS should call a port layer function to setup a peripheral timer/counter that can then be used as the run time counter time base.

-	#endif /* portCONFIGURE_TIMER_FOR_RUN_TIME_STATS */

-

-	#ifndef portGET_RUN_TIME_COUNTER_VALUE

-		#ifndef portALT_GET_RUN_TIME_COUNTER_VALUE

-			#error If configGENERATE_RUN_TIME_STATS is defined then either portGET_RUN_TIME_COUNTER_VALUE or portALT_GET_RUN_TIME_COUNTER_VALUE must also be defined.  See the examples provided and the FreeRTOS web site for more information.

-		#endif /* portALT_GET_RUN_TIME_COUNTER_VALUE */

-	#endif /* portGET_RUN_TIME_COUNTER_VALUE */

-

-#endif /* configGENERATE_RUN_TIME_STATS */

-

-#ifndef portCONFIGURE_TIMER_FOR_RUN_TIME_STATS

-	#define portCONFIGURE_TIMER_FOR_RUN_TIME_STATS()

-#endif

-

-#ifndef configUSE_MALLOC_FAILED_HOOK

-	#define configUSE_MALLOC_FAILED_HOOK 0

-#endif

-

-#ifndef portPRIVILEGE_BIT

-	#define portPRIVILEGE_BIT ( ( UBaseType_t ) 0x00 )

-#endif

-

-#ifndef portYIELD_WITHIN_API

-	#define portYIELD_WITHIN_API portYIELD

-#endif

-

-#ifndef pvPortMallocAligned

-	#define pvPortMallocAligned( x, puxStackBuffer ) ( ( ( puxStackBuffer ) == NULL ) ? ( pvPortMalloc( ( x ) ) ) : ( puxStackBuffer ) )

-#endif

-

-#ifndef vPortFreeAligned

-	#define vPortFreeAligned( pvBlockToFree ) vPortFree( pvBlockToFree )

-#endif

-

-#ifndef portSUPPRESS_TICKS_AND_SLEEP

-	#define portSUPPRESS_TICKS_AND_SLEEP( xExpectedIdleTime )

-#endif

-

-#ifndef configEXPECTED_IDLE_TIME_BEFORE_SLEEP

-	#define configEXPECTED_IDLE_TIME_BEFORE_SLEEP 2

-#endif

-

-#if configEXPECTED_IDLE_TIME_BEFORE_SLEEP < 2

-	#error configEXPECTED_IDLE_TIME_BEFORE_SLEEP must not be less than 2

-#endif

-

-#ifndef configUSE_TICKLESS_IDLE

-	#define configUSE_TICKLESS_IDLE 0

-#endif

-

-#ifndef configPRE_SLEEP_PROCESSING

-	#define configPRE_SLEEP_PROCESSING( x )

-#endif

-

-#ifndef configPOST_SLEEP_PROCESSING

-	#define configPOST_SLEEP_PROCESSING( x )

-#endif

-

-#ifndef configUSE_QUEUE_SETS

-	#define configUSE_QUEUE_SETS 0

-#endif

-

-#ifndef portTASK_USES_FLOATING_POINT

-	#define portTASK_USES_FLOATING_POINT()

-#endif

-

-#ifndef configUSE_TIME_SLICING

-	#define configUSE_TIME_SLICING 1

-#endif

-

-#ifndef configINCLUDE_APPLICATION_DEFINED_PRIVILEGED_FUNCTIONS

-	#define configINCLUDE_APPLICATION_DEFINED_PRIVILEGED_FUNCTIONS 0

-#endif

-

-#ifndef configUSE_NEWLIB_REENTRANT

-	#define configUSE_NEWLIB_REENTRANT 0

-#endif

-

-#ifndef configUSE_STATS_FORMATTING_FUNCTIONS

-	#define configUSE_STATS_FORMATTING_FUNCTIONS 0

-#endif

-

-#ifndef portASSERT_IF_INTERRUPT_PRIORITY_INVALID

-	#define portASSERT_IF_INTERRUPT_PRIORITY_INVALID()

-#endif

-

-#ifndef configUSE_TRACE_FACILITY

-	#define configUSE_TRACE_FACILITY 0

-#endif

-

-#ifndef mtCOVERAGE_TEST_MARKER

-	#define mtCOVERAGE_TEST_MARKER()

-#endif

-

-#ifndef mtCOVERAGE_TEST_DELAY

-	#define mtCOVERAGE_TEST_DELAY()

-#endif

-

-#ifndef portASSERT_IF_IN_ISR

-	#define portASSERT_IF_IN_ISR()

-#endif

-

-#ifndef configUSE_PORT_OPTIMISED_TASK_SELECTION

-	#define configUSE_PORT_OPTIMISED_TASK_SELECTION 0

-#endif

-

-#ifndef configAPPLICATION_ALLOCATED_HEAP

-	#define configAPPLICATION_ALLOCATED_HEAP 0

-#endif

-

-#ifndef configUSE_TASK_NOTIFICATIONS

-	#define configUSE_TASK_NOTIFICATIONS 1

-#endif

-

-#ifndef portTICK_TYPE_IS_ATOMIC

-	#define portTICK_TYPE_IS_ATOMIC 0

-#endif

-

-#if( portTICK_TYPE_IS_ATOMIC == 0 )

-	/* Either variables of tick type cannot be read atomically, or

-	portTICK_TYPE_IS_ATOMIC was not set - map the critical sections used when

-	the tick count is returned to the standard critical section macros. */

-	#define portTICK_TYPE_ENTER_CRITICAL() portENTER_CRITICAL()

-	#define portTICK_TYPE_EXIT_CRITICAL() portEXIT_CRITICAL()

-	#define portTICK_TYPE_SET_INTERRUPT_MASK_FROM_ISR() portSET_INTERRUPT_MASK_FROM_ISR()

-	#define portTICK_TYPE_CLEAR_INTERRUPT_MASK_FROM_ISR( x ) portCLEAR_INTERRUPT_MASK_FROM_ISR( ( x ) )

-#else

-	/* The tick type can be read atomically, so critical sections used when the

-	tick count is returned can be defined away. */

-	#define portTICK_TYPE_ENTER_CRITICAL()

-	#define portTICK_TYPE_EXIT_CRITICAL()

-	#define portTICK_TYPE_SET_INTERRUPT_MASK_FROM_ISR() 0

-	#define portTICK_TYPE_CLEAR_INTERRUPT_MASK_FROM_ISR( x ) ( void ) x

-#endif

-

-/* Definitions to allow backward compatibility with FreeRTOS versions prior to

-V8 if desired. */

-#ifndef configENABLE_BACKWARD_COMPATIBILITY

-	#define configENABLE_BACKWARD_COMPATIBILITY 1

-#endif

-

-#if configENABLE_BACKWARD_COMPATIBILITY == 1

-	#define eTaskStateGet eTaskGetState

-	#define portTickType TickType_t

-	#define xTaskHandle TaskHandle_t

-	#define xQueueHandle QueueHandle_t

-	#define xSemaphoreHandle SemaphoreHandle_t

-	#define xQueueSetHandle QueueSetHandle_t

-	#define xQueueSetMemberHandle QueueSetMemberHandle_t

-	#define xTimeOutType TimeOut_t

-	#define xMemoryRegion MemoryRegion_t

-	#define xTaskParameters TaskParameters_t

-	#define xTaskStatusType	TaskStatus_t

-	#define xTimerHandle TimerHandle_t

-	#define xCoRoutineHandle CoRoutineHandle_t

-	#define pdTASK_HOOK_CODE TaskHookFunction_t

-	#define portTICK_RATE_MS portTICK_PERIOD_MS

-

-	/* Backward compatibility within the scheduler code only - these definitions

-	are not really required but are included for completeness. */

-	#define tmrTIMER_CALLBACK TimerCallbackFunction_t

-	#define pdTASK_CODE TaskFunction_t

-	#define xListItem ListItem_t

-	#define xList List_t

-#endif /* configENABLE_BACKWARD_COMPATIBILITY */

-

-#ifdef __cplusplus

-}

-#endif

-

-#endif /* INC_FREERTOS_H */

-

diff --git a/FreeRTOS/Demo/Xilinx_FreeRTOS_BSP/repo/bsp/freertos822_xilinx_v1_0/src/Source/include/StackMacros.h b/FreeRTOS/Demo/Xilinx_FreeRTOS_BSP/repo/bsp/freertos822_xilinx_v1_0/src/Source/include/StackMacros.h
deleted file mode 100644
index 18c6a7f..0000000
--- a/FreeRTOS/Demo/Xilinx_FreeRTOS_BSP/repo/bsp/freertos822_xilinx_v1_0/src/Source/include/StackMacros.h
+++ /dev/null
@@ -1,184 +0,0 @@
-/*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

-    All rights reserved

-

-    VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

-

-    This file is part of the FreeRTOS distribution.

-

-    FreeRTOS is free software; you can redistribute it and/or modify it under

-    the terms of the GNU General Public License (version 2) as published by the

-    Free Software Foundation >>!AND MODIFIED BY!<< the FreeRTOS exception.

-

-    ***************************************************************************

-    >>!   NOTE: The modification to the GPL is included to allow you to     !<<

-    >>!   distribute a combined work that includes FreeRTOS without being   !<<

-    >>!   obliged to provide the source code for proprietary components     !<<

-    >>!   outside of the FreeRTOS kernel.                                   !<<

-    ***************************************************************************

-

-    FreeRTOS is distributed in the hope that it will be useful, but WITHOUT ANY

-    WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS

-    FOR A PARTICULAR PURPOSE.  Full license text is available on the following

-    link: http://www.freertos.org/a00114.html

-

-    ***************************************************************************

-     *                                                                       *

-     *    FreeRTOS provides completely free yet professionally developed,    *

-     *    robust, strictly quality controlled, supported, and cross          *

-     *    platform software that is more than just the market leader, it     *

-     *    is the industry's de facto standard.                               *

-     *                                                                       *

-     *    Help yourself get started quickly while simultaneously helping     *

-     *    to support the FreeRTOS project by purchasing a FreeRTOS           *

-     *    tutorial book, reference manual, or both:                          *

-     *    http://www.FreeRTOS.org/Documentation                              *

-     *                                                                       *

-    ***************************************************************************

-

-    http://www.FreeRTOS.org/FAQHelp.html - Having a problem?  Start by reading

-    the FAQ page "My application does not run, what could be wrong?".  Have you

-    defined configASSERT()?

-

-    http://www.FreeRTOS.org/support - In return for receiving this top quality

-    embedded software for free we request you assist our global community by

-    participating in the support forum.

-

-    http://www.FreeRTOS.org/training - Investing in training allows your team to

-    be as productive as possible as early as possible.  Now you can receive

-    FreeRTOS training directly from Richard Barry, CEO of Real Time Engineers

-    Ltd, and the world's leading authority on the world's leading RTOS.

-

-    http://www.FreeRTOS.org/plus - A selection of FreeRTOS ecosystem products,

-    including FreeRTOS+Trace - an indispensable productivity tool, a DOS

-    compatible FAT file system, and our tiny thread aware UDP/IP stack.

-

-    http://www.FreeRTOS.org/labs - Where new FreeRTOS products go to incubate.

-    Come and try FreeRTOS+TCP, our new open source TCP/IP stack for FreeRTOS.

-

-    http://www.OpenRTOS.com - Real Time Engineers ltd. license FreeRTOS to High

-    Integrity Systems ltd. to sell under the OpenRTOS brand.  Low cost OpenRTOS

-    licenses offer ticketed support, indemnification and commercial middleware.

-

-    http://www.SafeRTOS.com - High Integrity Systems also provide a safety

-    engineered and independently SIL3 certified version for use in safety and

-    mission critical applications that require provable dependability.

-

-    1 tab == 4 spaces!

-*/

-

-#ifndef STACK_MACROS_H

-#define STACK_MACROS_H

-

-/*

- * Call the stack overflow hook function if the stack of the task being swapped

- * out is currently overflowed, or looks like it might have overflowed in the

- * past.

- *

- * Setting configCHECK_FOR_STACK_OVERFLOW to 1 will cause the macro to check

- * the current stack state only - comparing the current top of stack value to

- * the stack limit.  Setting configCHECK_FOR_STACK_OVERFLOW to greater than 1

- * will also cause the last few stack bytes to be checked to ensure the value

- * to which the bytes were set when the task was created have not been

- * overwritten.  Note this second test does not guarantee that an overflowed

- * stack will always be recognised.

- */

-

-/*-----------------------------------------------------------*/

-

-#if( configCHECK_FOR_STACK_OVERFLOW == 0 )

-

-	/* FreeRTOSConfig.h is not set to check for stack overflows. */

-	#define taskFIRST_CHECK_FOR_STACK_OVERFLOW()

-	#define taskSECOND_CHECK_FOR_STACK_OVERFLOW()

-

-#endif /* configCHECK_FOR_STACK_OVERFLOW == 0 */

-/*-----------------------------------------------------------*/

-

-#if( configCHECK_FOR_STACK_OVERFLOW == 1 )

-

-	/* FreeRTOSConfig.h is only set to use the first method of

-	overflow checking. */

-	#define taskSECOND_CHECK_FOR_STACK_OVERFLOW()

-

-#endif

-/*-----------------------------------------------------------*/

-

-#if( ( configCHECK_FOR_STACK_OVERFLOW > 0 ) && ( portSTACK_GROWTH < 0 ) )

-

-	/* Only the current stack state is to be checked. */

-	#define taskFIRST_CHECK_FOR_STACK_OVERFLOW()														\

-	{																									\

-		/* Is the currently saved stack pointer within the stack limit? */								\

-		if( pxCurrentTCB->pxTopOfStack <= pxCurrentTCB->pxStack )										\

-		{																								\

-			vApplicationStackOverflowHook( ( TaskHandle_t ) pxCurrentTCB, pxCurrentTCB->pcTaskName );	\

-		}																								\

-	}

-

-#endif /* configCHECK_FOR_STACK_OVERFLOW > 0 */

-/*-----------------------------------------------------------*/

-

-#if( ( configCHECK_FOR_STACK_OVERFLOW > 0 ) && ( portSTACK_GROWTH > 0 ) )

-

-	/* Only the current stack state is to be checked. */

-	#define taskFIRST_CHECK_FOR_STACK_OVERFLOW()														\

-	{																									\

-																										\

-		/* Is the currently saved stack pointer within the stack limit? */								\

-		if( pxCurrentTCB->pxTopOfStack >= pxCurrentTCB->pxEndOfStack )									\

-		{																								\

-			vApplicationStackOverflowHook( ( TaskHandle_t ) pxCurrentTCB, pxCurrentTCB->pcTaskName );	\

-		}																								\

-	}

-

-#endif /* configCHECK_FOR_STACK_OVERFLOW == 1 */

-/*-----------------------------------------------------------*/

-

-#if( ( configCHECK_FOR_STACK_OVERFLOW > 1 ) && ( portSTACK_GROWTH < 0 ) )

-

-	#define taskSECOND_CHECK_FOR_STACK_OVERFLOW()																						\

-	{																																	\

-	static const uint8_t ucExpectedStackBytes[] = {	tskSTACK_FILL_BYTE, tskSTACK_FILL_BYTE, tskSTACK_FILL_BYTE, tskSTACK_FILL_BYTE,		\

-													tskSTACK_FILL_BYTE, tskSTACK_FILL_BYTE, tskSTACK_FILL_BYTE, tskSTACK_FILL_BYTE,		\

-													tskSTACK_FILL_BYTE, tskSTACK_FILL_BYTE, tskSTACK_FILL_BYTE, tskSTACK_FILL_BYTE,		\

-													tskSTACK_FILL_BYTE, tskSTACK_FILL_BYTE, tskSTACK_FILL_BYTE, tskSTACK_FILL_BYTE,		\

-													tskSTACK_FILL_BYTE, tskSTACK_FILL_BYTE, tskSTACK_FILL_BYTE, tskSTACK_FILL_BYTE };	\

-																																		\

-																																		\

-		/* Has the extremity of the task stack ever been written over? */																\

-		if( memcmp( ( void * ) pxCurrentTCB->pxStack, ( void * ) ucExpectedStackBytes, sizeof( ucExpectedStackBytes ) ) != 0 )			\

-		{																																\

-			vApplicationStackOverflowHook( ( TaskHandle_t ) pxCurrentTCB, pxCurrentTCB->pcTaskName );									\

-		}																																\

-	}

-

-#endif /* #if( configCHECK_FOR_STACK_OVERFLOW > 1 ) */

-/*-----------------------------------------------------------*/

-

-#if( ( configCHECK_FOR_STACK_OVERFLOW > 1 ) && ( portSTACK_GROWTH > 0 ) )

-

-	#define taskSECOND_CHECK_FOR_STACK_OVERFLOW()																						\

-	{																																	\

-	int8_t *pcEndOfStack = ( int8_t * ) pxCurrentTCB->pxEndOfStack;																		\

-	static const uint8_t ucExpectedStackBytes[] = {	tskSTACK_FILL_BYTE, tskSTACK_FILL_BYTE, tskSTACK_FILL_BYTE, tskSTACK_FILL_BYTE,		\

-													tskSTACK_FILL_BYTE, tskSTACK_FILL_BYTE, tskSTACK_FILL_BYTE, tskSTACK_FILL_BYTE,		\

-													tskSTACK_FILL_BYTE, tskSTACK_FILL_BYTE, tskSTACK_FILL_BYTE, tskSTACK_FILL_BYTE,		\

-													tskSTACK_FILL_BYTE, tskSTACK_FILL_BYTE, tskSTACK_FILL_BYTE, tskSTACK_FILL_BYTE,		\

-													tskSTACK_FILL_BYTE, tskSTACK_FILL_BYTE, tskSTACK_FILL_BYTE, tskSTACK_FILL_BYTE };	\

-																																		\

-																																		\

-		pcEndOfStack -= sizeof( ucExpectedStackBytes );																					\

-																																		\

-		/* Has the extremity of the task stack ever been written over? */																\

-		if( memcmp( ( void * ) pcEndOfStack, ( void * ) ucExpectedStackBytes, sizeof( ucExpectedStackBytes ) ) != 0 )					\

-		{																																\

-			vApplicationStackOverflowHook( ( TaskHandle_t ) pxCurrentTCB, pxCurrentTCB->pcTaskName );									\

-		}																																\

-	}

-

-#endif /* #if( configCHECK_FOR_STACK_OVERFLOW > 1 ) */

-/*-----------------------------------------------------------*/

-

-#endif /* STACK_MACROS_H */

-

diff --git a/FreeRTOS/Demo/Xilinx_FreeRTOS_BSP/repo/bsp/freertos822_xilinx_v1_0/src/Source/include/croutine.h b/FreeRTOS/Demo/Xilinx_FreeRTOS_BSP/repo/bsp/freertos822_xilinx_v1_0/src/Source/include/croutine.h
deleted file mode 100644
index b833067..0000000
--- a/FreeRTOS/Demo/Xilinx_FreeRTOS_BSP/repo/bsp/freertos822_xilinx_v1_0/src/Source/include/croutine.h
+++ /dev/null
@@ -1,762 +0,0 @@
-/*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

-    All rights reserved

-

-    VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

-

-    This file is part of the FreeRTOS distribution.

-

-    FreeRTOS is free software; you can redistribute it and/or modify it under

-    the terms of the GNU General Public License (version 2) as published by the

-    Free Software Foundation >>!AND MODIFIED BY!<< the FreeRTOS exception.

-

-    ***************************************************************************

-    >>!   NOTE: The modification to the GPL is included to allow you to     !<<

-    >>!   distribute a combined work that includes FreeRTOS without being   !<<

-    >>!   obliged to provide the source code for proprietary components     !<<

-    >>!   outside of the FreeRTOS kernel.                                   !<<

-    ***************************************************************************

-

-    FreeRTOS is distributed in the hope that it will be useful, but WITHOUT ANY

-    WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS

-    FOR A PARTICULAR PURPOSE.  Full license text is available on the following

-    link: http://www.freertos.org/a00114.html

-

-    ***************************************************************************

-     *                                                                       *

-     *    FreeRTOS provides completely free yet professionally developed,    *

-     *    robust, strictly quality controlled, supported, and cross          *

-     *    platform software that is more than just the market leader, it     *

-     *    is the industry's de facto standard.                               *

-     *                                                                       *

-     *    Help yourself get started quickly while simultaneously helping     *

-     *    to support the FreeRTOS project by purchasing a FreeRTOS           *

-     *    tutorial book, reference manual, or both:                          *

-     *    http://www.FreeRTOS.org/Documentation                              *

-     *                                                                       *

-    ***************************************************************************

-

-    http://www.FreeRTOS.org/FAQHelp.html - Having a problem?  Start by reading

-    the FAQ page "My application does not run, what could be wrong?".  Have you

-    defined configASSERT()?

-

-    http://www.FreeRTOS.org/support - In return for receiving this top quality

-    embedded software for free we request you assist our global community by

-    participating in the support forum.

-

-    http://www.FreeRTOS.org/training - Investing in training allows your team to

-    be as productive as possible as early as possible.  Now you can receive

-    FreeRTOS training directly from Richard Barry, CEO of Real Time Engineers

-    Ltd, and the world's leading authority on the world's leading RTOS.

-

-    http://www.FreeRTOS.org/plus - A selection of FreeRTOS ecosystem products,

-    including FreeRTOS+Trace - an indispensable productivity tool, a DOS

-    compatible FAT file system, and our tiny thread aware UDP/IP stack.

-

-    http://www.FreeRTOS.org/labs - Where new FreeRTOS products go to incubate.

-    Come and try FreeRTOS+TCP, our new open source TCP/IP stack for FreeRTOS.

-

-    http://www.OpenRTOS.com - Real Time Engineers ltd. license FreeRTOS to High

-    Integrity Systems ltd. to sell under the OpenRTOS brand.  Low cost OpenRTOS

-    licenses offer ticketed support, indemnification and commercial middleware.

-

-    http://www.SafeRTOS.com - High Integrity Systems also provide a safety

-    engineered and independently SIL3 certified version for use in safety and

-    mission critical applications that require provable dependability.

-

-    1 tab == 4 spaces!

-*/

-

-#ifndef CO_ROUTINE_H

-#define CO_ROUTINE_H

-

-#ifndef INC_FREERTOS_H

-	#error "include FreeRTOS.h must appear in source files before include croutine.h"

-#endif

-

-#include "list.h"

-

-#ifdef __cplusplus

-extern "C" {

-#endif

-

-/* Used to hide the implementation of the co-routine control block.  The

-control block structure however has to be included in the header due to

-the macro implementation of the co-routine functionality. */

-typedef void * CoRoutineHandle_t;

-

-/* Defines the prototype to which co-routine functions must conform. */

-typedef void (*crCOROUTINE_CODE)( CoRoutineHandle_t, UBaseType_t );

-

-typedef struct corCoRoutineControlBlock

-{

-	crCOROUTINE_CODE 	pxCoRoutineFunction;

-	ListItem_t			xGenericListItem;	/*< List item used to place the CRCB in ready and blocked queues. */

-	ListItem_t			xEventListItem;		/*< List item used to place the CRCB in event lists. */

-	UBaseType_t 		uxPriority;			/*< The priority of the co-routine in relation to other co-routines. */

-	UBaseType_t 		uxIndex;			/*< Used to distinguish between co-routines when multiple co-routines use the same co-routine function. */

-	uint16_t 			uxState;			/*< Used internally by the co-routine implementation. */

-} CRCB_t; /* Co-routine control block.  Note must be identical in size down to uxPriority with TCB_t. */

-

-/**

- * croutine. h

- *<pre>

- BaseType_t xCoRoutineCreate(

-                                 crCOROUTINE_CODE pxCoRoutineCode,

-                                 UBaseType_t uxPriority,

-                                 UBaseType_t uxIndex

-                               );</pre>

- *

- * Create a new co-routine and add it to the list of co-routines that are

- * ready to run.

- *

- * @param pxCoRoutineCode Pointer to the co-routine function.  Co-routine

- * functions require special syntax - see the co-routine section of the WEB

- * documentation for more information.

- *

- * @param uxPriority The priority with respect to other co-routines at which

- *  the co-routine will run.

- *

- * @param uxIndex Used to distinguish between different co-routines that

- * execute the same function.  See the example below and the co-routine section

- * of the WEB documentation for further information.

- *

- * @return pdPASS if the co-routine was successfully created and added to a ready

- * list, otherwise an error code defined with ProjDefs.h.

- *

- * Example usage:

-   <pre>

- // Co-routine to be created.

- void vFlashCoRoutine( CoRoutineHandle_t xHandle, UBaseType_t uxIndex )

- {

- // Variables in co-routines must be declared static if they must maintain value across a blocking call.

- // This may not be necessary for const variables.

- static const char cLedToFlash[ 2 ] = { 5, 6 };

- static const TickType_t uxFlashRates[ 2 ] = { 200, 400 };

-

-     // Must start every co-routine with a call to crSTART();

-     crSTART( xHandle );

-

-     for( ;; )

-     {

-         // This co-routine just delays for a fixed period, then toggles

-         // an LED.  Two co-routines are created using this function, so

-         // the uxIndex parameter is used to tell the co-routine which

-         // LED to flash and how int32_t to delay.  This assumes xQueue has

-         // already been created.

-         vParTestToggleLED( cLedToFlash[ uxIndex ] );

-         crDELAY( xHandle, uxFlashRates[ uxIndex ] );

-     }

-

-     // Must end every co-routine with a call to crEND();

-     crEND();

- }

-

- // Function that creates two co-routines.

- void vOtherFunction( void )

- {

- uint8_t ucParameterToPass;

- TaskHandle_t xHandle;

-

-     // Create two co-routines at priority 0.  The first is given index 0

-     // so (from the code above) toggles LED 5 every 200 ticks.  The second

-     // is given index 1 so toggles LED 6 every 400 ticks.

-     for( uxIndex = 0; uxIndex < 2; uxIndex++ )

-     {

-         xCoRoutineCreate( vFlashCoRoutine, 0, uxIndex );

-     }

- }

-   </pre>

- * \defgroup xCoRoutineCreate xCoRoutineCreate

- * \ingroup Tasks

- */

-BaseType_t xCoRoutineCreate( crCOROUTINE_CODE pxCoRoutineCode, UBaseType_t uxPriority, UBaseType_t uxIndex );

-

-

-/**

- * croutine. h

- *<pre>

- void vCoRoutineSchedule( void );</pre>

- *

- * Run a co-routine.

- *

- * vCoRoutineSchedule() executes the highest priority co-routine that is able

- * to run.  The co-routine will execute until it either blocks, yields or is

- * preempted by a task.  Co-routines execute cooperatively so one

- * co-routine cannot be preempted by another, but can be preempted by a task.

- *

- * If an application comprises of both tasks and co-routines then

- * vCoRoutineSchedule should be called from the idle task (in an idle task

- * hook).

- *

- * Example usage:

-   <pre>

- // This idle task hook will schedule a co-routine each time it is called.

- // The rest of the idle task will execute between co-routine calls.

- void vApplicationIdleHook( void )

- {

-	vCoRoutineSchedule();

- }

-

- // Alternatively, if you do not require any other part of the idle task to

- // execute, the idle task hook can call vCoRoutineScheduler() within an

- // infinite loop.

- void vApplicationIdleHook( void )

- {

-    for( ;; )

-    {

-        vCoRoutineSchedule();

-    }

- }

- </pre>

- * \defgroup vCoRoutineSchedule vCoRoutineSchedule

- * \ingroup Tasks

- */

-void vCoRoutineSchedule( void );

-

-/**

- * croutine. h

- * <pre>

- crSTART( CoRoutineHandle_t xHandle );</pre>

- *

- * This macro MUST always be called at the start of a co-routine function.

- *

- * Example usage:

-   <pre>

- // Co-routine to be created.

- void vACoRoutine( CoRoutineHandle_t xHandle, UBaseType_t uxIndex )

- {

- // Variables in co-routines must be declared static if they must maintain value across a blocking call.

- static int32_t ulAVariable;

-

-     // Must start every co-routine with a call to crSTART();

-     crSTART( xHandle );

-

-     for( ;; )

-     {

-          // Co-routine functionality goes here.

-     }

-

-     // Must end every co-routine with a call to crEND();

-     crEND();

- }</pre>

- * \defgroup crSTART crSTART

- * \ingroup Tasks

- */

-#define crSTART( pxCRCB ) switch( ( ( CRCB_t * )( pxCRCB ) )->uxState ) { case 0:

-

-/**

- * croutine. h

- * <pre>

- crEND();</pre>

- *

- * This macro MUST always be called at the end of a co-routine function.

- *

- * Example usage:

-   <pre>

- // Co-routine to be created.

- void vACoRoutine( CoRoutineHandle_t xHandle, UBaseType_t uxIndex )

- {

- // Variables in co-routines must be declared static if they must maintain value across a blocking call.

- static int32_t ulAVariable;

-

-     // Must start every co-routine with a call to crSTART();

-     crSTART( xHandle );

-

-     for( ;; )

-     {

-          // Co-routine functionality goes here.

-     }

-

-     // Must end every co-routine with a call to crEND();

-     crEND();

- }</pre>

- * \defgroup crSTART crSTART

- * \ingroup Tasks

- */

-#define crEND() }

-

-/*

- * These macros are intended for internal use by the co-routine implementation

- * only.  The macros should not be used directly by application writers.

- */

-#define crSET_STATE0( xHandle ) ( ( CRCB_t * )( xHandle ) )->uxState = (__LINE__ * 2); return; case (__LINE__ * 2):

-#define crSET_STATE1( xHandle ) ( ( CRCB_t * )( xHandle ) )->uxState = ((__LINE__ * 2)+1); return; case ((__LINE__ * 2)+1):

-

-/**

- * croutine. h

- *<pre>

- crDELAY( CoRoutineHandle_t xHandle, TickType_t xTicksToDelay );</pre>

- *

- * Delay a co-routine for a fixed period of time.

- *

- * crDELAY can only be called from the co-routine function itself - not

- * from within a function called by the co-routine function.  This is because

- * co-routines do not maintain their own stack.

- *

- * @param xHandle The handle of the co-routine to delay.  This is the xHandle

- * parameter of the co-routine function.

- *

- * @param xTickToDelay The number of ticks that the co-routine should delay

- * for.  The actual amount of time this equates to is defined by

- * configTICK_RATE_HZ (set in FreeRTOSConfig.h).  The constant portTICK_PERIOD_MS

- * can be used to convert ticks to milliseconds.

- *

- * Example usage:

-   <pre>

- // Co-routine to be created.

- void vACoRoutine( CoRoutineHandle_t xHandle, UBaseType_t uxIndex )

- {

- // Variables in co-routines must be declared static if they must maintain value across a blocking call.

- // This may not be necessary for const variables.

- // We are to delay for 200ms.

- static const xTickType xDelayTime = 200 / portTICK_PERIOD_MS;

-

-     // Must start every co-routine with a call to crSTART();

-     crSTART( xHandle );

-

-     for( ;; )

-     {

-        // Delay for 200ms.

-        crDELAY( xHandle, xDelayTime );

-

-        // Do something here.

-     }

-

-     // Must end every co-routine with a call to crEND();

-     crEND();

- }</pre>

- * \defgroup crDELAY crDELAY

- * \ingroup Tasks

- */

-#define crDELAY( xHandle, xTicksToDelay )												\

-	if( ( xTicksToDelay ) > 0 )															\

-	{																					\

-		vCoRoutineAddToDelayedList( ( xTicksToDelay ), NULL );							\

-	}																					\

-	crSET_STATE0( ( xHandle ) );

-

-/**

- * <pre>

- crQUEUE_SEND(

-                  CoRoutineHandle_t xHandle,

-                  QueueHandle_t pxQueue,

-                  void *pvItemToQueue,

-                  TickType_t xTicksToWait,

-                  BaseType_t *pxResult

-             )</pre>

- *

- * The macro's crQUEUE_SEND() and crQUEUE_RECEIVE() are the co-routine

- * equivalent to the xQueueSend() and xQueueReceive() functions used by tasks.

- *

- * crQUEUE_SEND and crQUEUE_RECEIVE can only be used from a co-routine whereas

- * xQueueSend() and xQueueReceive() can only be used from tasks.

- *

- * crQUEUE_SEND can only be called from the co-routine function itself - not

- * from within a function called by the co-routine function.  This is because

- * co-routines do not maintain their own stack.

- *

- * See the co-routine section of the WEB documentation for information on

- * passing data between tasks and co-routines and between ISR's and

- * co-routines.

- *

- * @param xHandle The handle of the calling co-routine.  This is the xHandle

- * parameter of the co-routine function.

- *

- * @param pxQueue The handle of the queue on which the data will be posted.

- * The handle is obtained as the return value when the queue is created using

- * the xQueueCreate() API function.

- *

- * @param pvItemToQueue A pointer to the data being posted onto the queue.

- * The number of bytes of each queued item is specified when the queue is

- * created.  This number of bytes is copied from pvItemToQueue into the queue

- * itself.

- *

- * @param xTickToDelay The number of ticks that the co-routine should block

- * to wait for space to become available on the queue, should space not be

- * available immediately. The actual amount of time this equates to is defined

- * by configTICK_RATE_HZ (set in FreeRTOSConfig.h).  The constant

- * portTICK_PERIOD_MS can be used to convert ticks to milliseconds (see example

- * below).

- *

- * @param pxResult The variable pointed to by pxResult will be set to pdPASS if

- * data was successfully posted onto the queue, otherwise it will be set to an

- * error defined within ProjDefs.h.

- *

- * Example usage:

-   <pre>

- // Co-routine function that blocks for a fixed period then posts a number onto

- // a queue.

- static void prvCoRoutineFlashTask( CoRoutineHandle_t xHandle, UBaseType_t uxIndex )

- {

- // Variables in co-routines must be declared static if they must maintain value across a blocking call.

- static BaseType_t xNumberToPost = 0;

- static BaseType_t xResult;

-

-    // Co-routines must begin with a call to crSTART().

-    crSTART( xHandle );

-

-    for( ;; )

-    {

-        // This assumes the queue has already been created.

-        crQUEUE_SEND( xHandle, xCoRoutineQueue, &xNumberToPost, NO_DELAY, &xResult );

-

-        if( xResult != pdPASS )

-        {

-            // The message was not posted!

-        }

-

-        // Increment the number to be posted onto the queue.

-        xNumberToPost++;

-

-        // Delay for 100 ticks.

-        crDELAY( xHandle, 100 );

-    }

-

-    // Co-routines must end with a call to crEND().

-    crEND();

- }</pre>

- * \defgroup crQUEUE_SEND crQUEUE_SEND

- * \ingroup Tasks

- */

-#define crQUEUE_SEND( xHandle, pxQueue, pvItemToQueue, xTicksToWait, pxResult )			\

-{																						\

-	*( pxResult ) = xQueueCRSend( ( pxQueue) , ( pvItemToQueue) , ( xTicksToWait ) );	\

-	if( *( pxResult ) == errQUEUE_BLOCKED )												\

-	{																					\

-		crSET_STATE0( ( xHandle ) );													\

-		*pxResult = xQueueCRSend( ( pxQueue ), ( pvItemToQueue ), 0 );					\

-	}																					\

-	if( *pxResult == errQUEUE_YIELD )													\

-	{																					\

-		crSET_STATE1( ( xHandle ) );													\

-		*pxResult = pdPASS;																\

-	}																					\

-}

-

-/**

- * croutine. h

- * <pre>

-  crQUEUE_RECEIVE(

-                     CoRoutineHandle_t xHandle,

-                     QueueHandle_t pxQueue,

-                     void *pvBuffer,

-                     TickType_t xTicksToWait,

-                     BaseType_t *pxResult

-                 )</pre>

- *

- * The macro's crQUEUE_SEND() and crQUEUE_RECEIVE() are the co-routine

- * equivalent to the xQueueSend() and xQueueReceive() functions used by tasks.

- *

- * crQUEUE_SEND and crQUEUE_RECEIVE can only be used from a co-routine whereas

- * xQueueSend() and xQueueReceive() can only be used from tasks.

- *

- * crQUEUE_RECEIVE can only be called from the co-routine function itself - not

- * from within a function called by the co-routine function.  This is because

- * co-routines do not maintain their own stack.

- *

- * See the co-routine section of the WEB documentation for information on

- * passing data between tasks and co-routines and between ISR's and

- * co-routines.

- *

- * @param xHandle The handle of the calling co-routine.  This is the xHandle

- * parameter of the co-routine function.

- *

- * @param pxQueue The handle of the queue from which the data will be received.

- * The handle is obtained as the return value when the queue is created using

- * the xQueueCreate() API function.

- *

- * @param pvBuffer The buffer into which the received item is to be copied.

- * The number of bytes of each queued item is specified when the queue is

- * created.  This number of bytes is copied into pvBuffer.

- *

- * @param xTickToDelay The number of ticks that the co-routine should block

- * to wait for data to become available from the queue, should data not be

- * available immediately. The actual amount of time this equates to is defined

- * by configTICK_RATE_HZ (set in FreeRTOSConfig.h).  The constant

- * portTICK_PERIOD_MS can be used to convert ticks to milliseconds (see the

- * crQUEUE_SEND example).

- *

- * @param pxResult The variable pointed to by pxResult will be set to pdPASS if

- * data was successfully retrieved from the queue, otherwise it will be set to

- * an error code as defined within ProjDefs.h.

- *

- * Example usage:

- <pre>

- // A co-routine receives the number of an LED to flash from a queue.  It

- // blocks on the queue until the number is received.

- static void prvCoRoutineFlashWorkTask( CoRoutineHandle_t xHandle, UBaseType_t uxIndex )

- {

- // Variables in co-routines must be declared static if they must maintain value across a blocking call.

- static BaseType_t xResult;

- static UBaseType_t uxLEDToFlash;

-

-    // All co-routines must start with a call to crSTART().

-    crSTART( xHandle );

-

-    for( ;; )

-    {

-        // Wait for data to become available on the queue.

-        crQUEUE_RECEIVE( xHandle, xCoRoutineQueue, &uxLEDToFlash, portMAX_DELAY, &xResult );

-

-        if( xResult == pdPASS )

-        {

-            // We received the LED to flash - flash it!

-            vParTestToggleLED( uxLEDToFlash );

-        }

-    }

-

-    crEND();

- }</pre>

- * \defgroup crQUEUE_RECEIVE crQUEUE_RECEIVE

- * \ingroup Tasks

- */

-#define crQUEUE_RECEIVE( xHandle, pxQueue, pvBuffer, xTicksToWait, pxResult )			\

-{																						\

-	*( pxResult ) = xQueueCRReceive( ( pxQueue) , ( pvBuffer ), ( xTicksToWait ) );		\

-	if( *( pxResult ) == errQUEUE_BLOCKED ) 											\

-	{																					\

-		crSET_STATE0( ( xHandle ) );													\

-		*( pxResult ) = xQueueCRReceive( ( pxQueue) , ( pvBuffer ), 0 );				\

-	}																					\

-	if( *( pxResult ) == errQUEUE_YIELD )												\

-	{																					\

-		crSET_STATE1( ( xHandle ) );													\

-		*( pxResult ) = pdPASS;															\

-	}																					\

-}

-

-/**

- * croutine. h

- * <pre>

-  crQUEUE_SEND_FROM_ISR(

-                            QueueHandle_t pxQueue,

-                            void *pvItemToQueue,

-                            BaseType_t xCoRoutinePreviouslyWoken

-                       )</pre>

- *

- * The macro's crQUEUE_SEND_FROM_ISR() and crQUEUE_RECEIVE_FROM_ISR() are the

- * co-routine equivalent to the xQueueSendFromISR() and xQueueReceiveFromISR()

- * functions used by tasks.

- *

- * crQUEUE_SEND_FROM_ISR() and crQUEUE_RECEIVE_FROM_ISR() can only be used to

- * pass data between a co-routine and and ISR, whereas xQueueSendFromISR() and

- * xQueueReceiveFromISR() can only be used to pass data between a task and and

- * ISR.

- *

- * crQUEUE_SEND_FROM_ISR can only be called from an ISR to send data to a queue

- * that is being used from within a co-routine.

- *

- * See the co-routine section of the WEB documentation for information on

- * passing data between tasks and co-routines and between ISR's and

- * co-routines.

- *

- * @param xQueue The handle to the queue on which the item is to be posted.

- *

- * @param pvItemToQueue A pointer to the item that is to be placed on the

- * queue.  The size of the items the queue will hold was defined when the

- * queue was created, so this many bytes will be copied from pvItemToQueue

- * into the queue storage area.

- *

- * @param xCoRoutinePreviouslyWoken This is included so an ISR can post onto

- * the same queue multiple times from a single interrupt.  The first call

- * should always pass in pdFALSE.  Subsequent calls should pass in

- * the value returned from the previous call.

- *

- * @return pdTRUE if a co-routine was woken by posting onto the queue.  This is

- * used by the ISR to determine if a context switch may be required following

- * the ISR.

- *

- * Example usage:

- <pre>

- // A co-routine that blocks on a queue waiting for characters to be received.

- static void vReceivingCoRoutine( CoRoutineHandle_t xHandle, UBaseType_t uxIndex )

- {

- char cRxedChar;

- BaseType_t xResult;

-

-     // All co-routines must start with a call to crSTART().

-     crSTART( xHandle );

-

-     for( ;; )

-     {

-         // Wait for data to become available on the queue.  This assumes the

-         // queue xCommsRxQueue has already been created!

-         crQUEUE_RECEIVE( xHandle, xCommsRxQueue, &uxLEDToFlash, portMAX_DELAY, &xResult );

-

-         // Was a character received?

-         if( xResult == pdPASS )

-         {

-             // Process the character here.

-         }

-     }

-

-     // All co-routines must end with a call to crEND().

-     crEND();

- }

-

- // An ISR that uses a queue to send characters received on a serial port to

- // a co-routine.

- void vUART_ISR( void )

- {

- char cRxedChar;

- BaseType_t xCRWokenByPost = pdFALSE;

-

-     // We loop around reading characters until there are none left in the UART.

-     while( UART_RX_REG_NOT_EMPTY() )

-     {

-         // Obtain the character from the UART.

-         cRxedChar = UART_RX_REG;

-

-         // Post the character onto a queue.  xCRWokenByPost will be pdFALSE

-         // the first time around the loop.  If the post causes a co-routine

-         // to be woken (unblocked) then xCRWokenByPost will be set to pdTRUE.

-         // In this manner we can ensure that if more than one co-routine is

-         // blocked on the queue only one is woken by this ISR no matter how

-         // many characters are posted to the queue.

-         xCRWokenByPost = crQUEUE_SEND_FROM_ISR( xCommsRxQueue, &cRxedChar, xCRWokenByPost );

-     }

- }</pre>

- * \defgroup crQUEUE_SEND_FROM_ISR crQUEUE_SEND_FROM_ISR

- * \ingroup Tasks

- */

-#define crQUEUE_SEND_FROM_ISR( pxQueue, pvItemToQueue, xCoRoutinePreviouslyWoken ) xQueueCRSendFromISR( ( pxQueue ), ( pvItemToQueue ), ( xCoRoutinePreviouslyWoken ) )

-

-

-/**

- * croutine. h

- * <pre>

-  crQUEUE_SEND_FROM_ISR(

-                            QueueHandle_t pxQueue,

-                            void *pvBuffer,

-                            BaseType_t * pxCoRoutineWoken

-                       )</pre>

- *

- * The macro's crQUEUE_SEND_FROM_ISR() and crQUEUE_RECEIVE_FROM_ISR() are the

- * co-routine equivalent to the xQueueSendFromISR() and xQueueReceiveFromISR()

- * functions used by tasks.

- *

- * crQUEUE_SEND_FROM_ISR() and crQUEUE_RECEIVE_FROM_ISR() can only be used to

- * pass data between a co-routine and and ISR, whereas xQueueSendFromISR() and

- * xQueueReceiveFromISR() can only be used to pass data between a task and and

- * ISR.

- *

- * crQUEUE_RECEIVE_FROM_ISR can only be called from an ISR to receive data

- * from a queue that is being used from within a co-routine (a co-routine

- * posted to the queue).

- *

- * See the co-routine section of the WEB documentation for information on

- * passing data between tasks and co-routines and between ISR's and

- * co-routines.

- *

- * @param xQueue The handle to the queue on which the item is to be posted.

- *

- * @param pvBuffer A pointer to a buffer into which the received item will be

- * placed.  The size of the items the queue will hold was defined when the

- * queue was created, so this many bytes will be copied from the queue into

- * pvBuffer.

- *

- * @param pxCoRoutineWoken A co-routine may be blocked waiting for space to become

- * available on the queue.  If crQUEUE_RECEIVE_FROM_ISR causes such a

- * co-routine to unblock *pxCoRoutineWoken will get set to pdTRUE, otherwise

- * *pxCoRoutineWoken will remain unchanged.

- *

- * @return pdTRUE an item was successfully received from the queue, otherwise

- * pdFALSE.

- *

- * Example usage:

- <pre>

- // A co-routine that posts a character to a queue then blocks for a fixed

- // period.  The character is incremented each time.

- static void vSendingCoRoutine( CoRoutineHandle_t xHandle, UBaseType_t uxIndex )

- {

- // cChar holds its value while this co-routine is blocked and must therefore

- // be declared static.

- static char cCharToTx = 'a';

- BaseType_t xResult;

-

-     // All co-routines must start with a call to crSTART().

-     crSTART( xHandle );

-

-     for( ;; )

-     {

-         // Send the next character to the queue.

-         crQUEUE_SEND( xHandle, xCoRoutineQueue, &cCharToTx, NO_DELAY, &xResult );

-

-         if( xResult == pdPASS )

-         {

-             // The character was successfully posted to the queue.

-         }

-		 else

-		 {

-			// Could not post the character to the queue.

-		 }

-

-         // Enable the UART Tx interrupt to cause an interrupt in this

-		 // hypothetical UART.  The interrupt will obtain the character

-		 // from the queue and send it.

-		 ENABLE_RX_INTERRUPT();

-

-		 // Increment to the next character then block for a fixed period.

-		 // cCharToTx will maintain its value across the delay as it is

-		 // declared static.

-		 cCharToTx++;

-		 if( cCharToTx > 'x' )

-		 {

-			cCharToTx = 'a';

-		 }

-		 crDELAY( 100 );

-     }

-

-     // All co-routines must end with a call to crEND().

-     crEND();

- }

-

- // An ISR that uses a queue to receive characters to send on a UART.

- void vUART_ISR( void )

- {

- char cCharToTx;

- BaseType_t xCRWokenByPost = pdFALSE;

-

-     while( UART_TX_REG_EMPTY() )

-     {

-         // Are there any characters in the queue waiting to be sent?

-		 // xCRWokenByPost will automatically be set to pdTRUE if a co-routine

-		 // is woken by the post - ensuring that only a single co-routine is

-		 // woken no matter how many times we go around this loop.

-         if( crQUEUE_RECEIVE_FROM_ISR( pxQueue, &cCharToTx, &xCRWokenByPost ) )

-		 {

-			 SEND_CHARACTER( cCharToTx );

-		 }

-     }

- }</pre>

- * \defgroup crQUEUE_RECEIVE_FROM_ISR crQUEUE_RECEIVE_FROM_ISR

- * \ingroup Tasks

- */

-#define crQUEUE_RECEIVE_FROM_ISR( pxQueue, pvBuffer, pxCoRoutineWoken ) xQueueCRReceiveFromISR( ( pxQueue ), ( pvBuffer ), ( pxCoRoutineWoken ) )

-

-/*

- * This function is intended for internal use by the co-routine macros only.

- * The macro nature of the co-routine implementation requires that the

- * prototype appears here.  The function should not be used by application

- * writers.

- *

- * Removes the current co-routine from its ready list and places it in the

- * appropriate delayed list.

- */

-void vCoRoutineAddToDelayedList( TickType_t xTicksToDelay, List_t *pxEventList );

-

-/*

- * This function is intended for internal use by the queue implementation only.

- * The function should not be used by application writers.

- *

- * Removes the highest priority co-routine from the event list and places it in

- * the pending ready list.

- */

-BaseType_t xCoRoutineRemoveFromEventList( const List_t *pxEventList );

-

-#ifdef __cplusplus

-}

-#endif

-

-#endif /* CO_ROUTINE_H */

diff --git a/FreeRTOS/Demo/Xilinx_FreeRTOS_BSP/repo/bsp/freertos822_xilinx_v1_0/src/Source/include/deprecated_definitions.h b/FreeRTOS/Demo/Xilinx_FreeRTOS_BSP/repo/bsp/freertos822_xilinx_v1_0/src/Source/include/deprecated_definitions.h
deleted file mode 100644
index 83f0931..0000000
--- a/FreeRTOS/Demo/Xilinx_FreeRTOS_BSP/repo/bsp/freertos822_xilinx_v1_0/src/Source/include/deprecated_definitions.h
+++ /dev/null
@@ -1,321 +0,0 @@
-/*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

-    All rights reserved

-

-    VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

-

-    This file is part of the FreeRTOS distribution.

-

-    FreeRTOS is free software; you can redistribute it and/or modify it under

-    the terms of the GNU General Public License (version 2) as published by the

-    Free Software Foundation >>!AND MODIFIED BY!<< the FreeRTOS exception.

-

-    ***************************************************************************

-    >>!   NOTE: The modification to the GPL is included to allow you to     !<<

-    >>!   distribute a combined work that includes FreeRTOS without being   !<<

-    >>!   obliged to provide the source code for proprietary components     !<<

-    >>!   outside of the FreeRTOS kernel.                                   !<<

-    ***************************************************************************

-

-    FreeRTOS is distributed in the hope that it will be useful, but WITHOUT ANY

-    WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS

-    FOR A PARTICULAR PURPOSE.  Full license text is available on the following

-    link: http://www.freertos.org/a00114.html

-

-    ***************************************************************************

-     *                                                                       *

-     *    FreeRTOS provides completely free yet professionally developed,    *

-     *    robust, strictly quality controlled, supported, and cross          *

-     *    platform software that is more than just the market leader, it     *

-     *    is the industry's de facto standard.                               *

-     *                                                                       *

-     *    Help yourself get started quickly while simultaneously helping     *

-     *    to support the FreeRTOS project by purchasing a FreeRTOS           *

-     *    tutorial book, reference manual, or both:                          *

-     *    http://www.FreeRTOS.org/Documentation                              *

-     *                                                                       *

-    ***************************************************************************

-

-    http://www.FreeRTOS.org/FAQHelp.html - Having a problem?  Start by reading

-    the FAQ page "My application does not run, what could be wrong?".  Have you

-    defined configASSERT()?

-

-    http://www.FreeRTOS.org/support - In return for receiving this top quality

-    embedded software for free we request you assist our global community by

-    participating in the support forum.

-

-    http://www.FreeRTOS.org/training - Investing in training allows your team to

-    be as productive as possible as early as possible.  Now you can receive

-    FreeRTOS training directly from Richard Barry, CEO of Real Time Engineers

-    Ltd, and the world's leading authority on the world's leading RTOS.

-

-    http://www.FreeRTOS.org/plus - A selection of FreeRTOS ecosystem products,

-    including FreeRTOS+Trace - an indispensable productivity tool, a DOS

-    compatible FAT file system, and our tiny thread aware UDP/IP stack.

-

-    http://www.FreeRTOS.org/labs - Where new FreeRTOS products go to incubate.

-    Come and try FreeRTOS+TCP, our new open source TCP/IP stack for FreeRTOS.

-

-    http://www.OpenRTOS.com - Real Time Engineers ltd. license FreeRTOS to High

-    Integrity Systems ltd. to sell under the OpenRTOS brand.  Low cost OpenRTOS

-    licenses offer ticketed support, indemnification and commercial middleware.

-

-    http://www.SafeRTOS.com - High Integrity Systems also provide a safety

-    engineered and independently SIL3 certified version for use in safety and

-    mission critical applications that require provable dependability.

-

-    1 tab == 4 spaces!

-*/

-

-#ifndef DEPRECATED_DEFINITIONS_H

-#define DEPRECATED_DEFINITIONS_H

-

-

-/* Each FreeRTOS port has a unique portmacro.h header file.  Originally a

-pre-processor definition was used to ensure the pre-processor found the correct

-portmacro.h file for the port being used.  That scheme was deprecated in favour

-of setting the compiler's include path such that it found the correct

-portmacro.h file - removing the need for the constant and allowing the

-portmacro.h file to be located anywhere in relation to the port being used.  The

-definitions below remain in the code for backward compatibility only.  New

-projects should not use them. */

-

-#ifdef OPEN_WATCOM_INDUSTRIAL_PC_PORT

-	#include "..\..\Source\portable\owatcom\16bitdos\pc\portmacro.h"

-	typedef void ( __interrupt __far *pxISR )();

-#endif

-

-#ifdef OPEN_WATCOM_FLASH_LITE_186_PORT

-	#include "..\..\Source\portable\owatcom\16bitdos\flsh186\portmacro.h"

-	typedef void ( __interrupt __far *pxISR )();

-#endif

-

-#ifdef GCC_MEGA_AVR

-	#include "../portable/GCC/ATMega323/portmacro.h"

-#endif

-

-#ifdef IAR_MEGA_AVR

-	#include "../portable/IAR/ATMega323/portmacro.h"

-#endif

-

-#ifdef MPLAB_PIC24_PORT

-	#include "../../Source/portable/MPLAB/PIC24_dsPIC/portmacro.h"

-#endif

-

-#ifdef MPLAB_DSPIC_PORT

-	#include "../../Source/portable/MPLAB/PIC24_dsPIC/portmacro.h"

-#endif

-

-#ifdef MPLAB_PIC18F_PORT

-	#include "../../Source/portable/MPLAB/PIC18F/portmacro.h"

-#endif

-

-#ifdef MPLAB_PIC32MX_PORT

-	#include "../../Source/portable/MPLAB/PIC32MX/portmacro.h"

-#endif

-

-#ifdef _FEDPICC

-	#include "libFreeRTOS/Include/portmacro.h"

-#endif

-

-#ifdef SDCC_CYGNAL

-	#include "../../Source/portable/SDCC/Cygnal/portmacro.h"

-#endif

-

-#ifdef GCC_ARM7

-	#include "../../Source/portable/GCC/ARM7_LPC2000/portmacro.h"

-#endif

-

-#ifdef GCC_ARM7_ECLIPSE

-	#include "portmacro.h"

-#endif

-

-#ifdef ROWLEY_LPC23xx

-	#include "../../Source/portable/GCC/ARM7_LPC23xx/portmacro.h"

-#endif

-

-#ifdef IAR_MSP430

-	#include "..\..\Source\portable\IAR\MSP430\portmacro.h"

-#endif

-

-#ifdef GCC_MSP430

-	#include "../../Source/portable/GCC/MSP430F449/portmacro.h"

-#endif

-

-#ifdef ROWLEY_MSP430

-	#include "../../Source/portable/Rowley/MSP430F449/portmacro.h"

-#endif

-

-#ifdef ARM7_LPC21xx_KEIL_RVDS

-	#include "..\..\Source\portable\RVDS\ARM7_LPC21xx\portmacro.h"

-#endif

-

-#ifdef SAM7_GCC

-	#include "../../Source/portable/GCC/ARM7_AT91SAM7S/portmacro.h"

-#endif

-

-#ifdef SAM7_IAR

-	#include "..\..\Source\portable\IAR\AtmelSAM7S64\portmacro.h"

-#endif

-

-#ifdef SAM9XE_IAR

-	#include "..\..\Source\portable\IAR\AtmelSAM9XE\portmacro.h"

-#endif

-

-#ifdef LPC2000_IAR

-	#include "..\..\Source\portable\IAR\LPC2000\portmacro.h"

-#endif

-

-#ifdef STR71X_IAR

-	#include "..\..\Source\portable\IAR\STR71x\portmacro.h"

-#endif

-

-#ifdef STR75X_IAR

-	#include "..\..\Source\portable\IAR\STR75x\portmacro.h"

-#endif

-

-#ifdef STR75X_GCC

-	#include "..\..\Source\portable\GCC\STR75x\portmacro.h"

-#endif

-

-#ifdef STR91X_IAR

-	#include "..\..\Source\portable\IAR\STR91x\portmacro.h"

-#endif

-

-#ifdef GCC_H8S

-	#include "../../Source/portable/GCC/H8S2329/portmacro.h"

-#endif

-

-#ifdef GCC_AT91FR40008

-	#include "../../Source/portable/GCC/ARM7_AT91FR40008/portmacro.h"

-#endif

-

-#ifdef RVDS_ARMCM3_LM3S102

-	#include "../../Source/portable/RVDS/ARM_CM3/portmacro.h"

-#endif

-

-#ifdef GCC_ARMCM3_LM3S102

-	#include "../../Source/portable/GCC/ARM_CM3/portmacro.h"

-#endif

-

-#ifdef GCC_ARMCM3

-	#include "../../Source/portable/GCC/ARM_CM3/portmacro.h"

-#endif

-

-#ifdef IAR_ARM_CM3

-	#include "../../Source/portable/IAR/ARM_CM3/portmacro.h"

-#endif

-

-#ifdef IAR_ARMCM3_LM

-	#include "../../Source/portable/IAR/ARM_CM3/portmacro.h"

-#endif

-

-#ifdef HCS12_CODE_WARRIOR

-	#include "../../Source/portable/CodeWarrior/HCS12/portmacro.h"

-#endif

-

-#ifdef MICROBLAZE_GCC

-	#include "../../Source/portable/GCC/MicroBlaze/portmacro.h"

-#endif

-

-#ifdef TERN_EE

-	#include "..\..\Source\portable\Paradigm\Tern_EE\small\portmacro.h"

-#endif

-

-#ifdef GCC_HCS12

-	#include "../../Source/portable/GCC/HCS12/portmacro.h"

-#endif

-

-#ifdef GCC_MCF5235

-    #include "../../Source/portable/GCC/MCF5235/portmacro.h"

-#endif

-

-#ifdef COLDFIRE_V2_GCC

-	#include "../../../Source/portable/GCC/ColdFire_V2/portmacro.h"

-#endif

-

-#ifdef COLDFIRE_V2_CODEWARRIOR

-	#include "../../Source/portable/CodeWarrior/ColdFire_V2/portmacro.h"

-#endif

-

-#ifdef GCC_PPC405

-	#include "../../Source/portable/GCC/PPC405_Xilinx/portmacro.h"

-#endif

-

-#ifdef GCC_PPC440

-	#include "../../Source/portable/GCC/PPC440_Xilinx/portmacro.h"

-#endif

-

-#ifdef _16FX_SOFTUNE

-	#include "..\..\Source\portable\Softune\MB96340\portmacro.h"

-#endif

-

-#ifdef BCC_INDUSTRIAL_PC_PORT

-	/* A short file name has to be used in place of the normal

-	FreeRTOSConfig.h when using the Borland compiler. */

-	#include "frconfig.h"

-	#include "..\portable\BCC\16BitDOS\PC\prtmacro.h"

-    typedef void ( __interrupt __far *pxISR )();

-#endif

-

-#ifdef BCC_FLASH_LITE_186_PORT

-	/* A short file name has to be used in place of the normal

-	FreeRTOSConfig.h when using the Borland compiler. */

-	#include "frconfig.h"

-	#include "..\portable\BCC\16BitDOS\flsh186\prtmacro.h"

-    typedef void ( __interrupt __far *pxISR )();

-#endif

-

-#ifdef __GNUC__

-   #ifdef __AVR32_AVR32A__

-	   #include "portmacro.h"

-   #endif

-#endif

-

-#ifdef __ICCAVR32__

-   #ifdef __CORE__

-      #if __CORE__ == __AVR32A__

-	      #include "portmacro.h"

-      #endif

-   #endif

-#endif

-

-#ifdef __91467D

-	#include "portmacro.h"

-#endif

-

-#ifdef __96340

-	#include "portmacro.h"

-#endif

-

-

-#ifdef __IAR_V850ES_Fx3__

-	#include "../../Source/portable/IAR/V850ES/portmacro.h"

-#endif

-

-#ifdef __IAR_V850ES_Jx3__

-	#include "../../Source/portable/IAR/V850ES/portmacro.h"

-#endif

-

-#ifdef __IAR_V850ES_Jx3_L__

-	#include "../../Source/portable/IAR/V850ES/portmacro.h"

-#endif

-

-#ifdef __IAR_V850ES_Jx2__

-	#include "../../Source/portable/IAR/V850ES/portmacro.h"

-#endif

-

-#ifdef __IAR_V850ES_Hx2__

-	#include "../../Source/portable/IAR/V850ES/portmacro.h"

-#endif

-

-#ifdef __IAR_78K0R_Kx3__

-	#include "../../Source/portable/IAR/78K0R/portmacro.h"

-#endif

-

-#ifdef __IAR_78K0R_Kx3L__

-	#include "../../Source/portable/IAR/78K0R/portmacro.h"

-#endif

-

-#endif /* DEPRECATED_DEFINITIONS_H */

-

diff --git a/FreeRTOS/Demo/Xilinx_FreeRTOS_BSP/repo/bsp/freertos822_xilinx_v1_0/src/Source/include/event_groups.h b/FreeRTOS/Demo/Xilinx_FreeRTOS_BSP/repo/bsp/freertos822_xilinx_v1_0/src/Source/include/event_groups.h
deleted file mode 100644
index 70dc5f2..0000000
--- a/FreeRTOS/Demo/Xilinx_FreeRTOS_BSP/repo/bsp/freertos822_xilinx_v1_0/src/Source/include/event_groups.h
+++ /dev/null
@@ -1,730 +0,0 @@
-/*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

-    All rights reserved

-

-    VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

-

-    This file is part of the FreeRTOS distribution.

-

-    FreeRTOS is free software; you can redistribute it and/or modify it under

-    the terms of the GNU General Public License (version 2) as published by the

-    Free Software Foundation >>!AND MODIFIED BY!<< the FreeRTOS exception.

-

-    ***************************************************************************

-    >>!   NOTE: The modification to the GPL is included to allow you to     !<<

-    >>!   distribute a combined work that includes FreeRTOS without being   !<<

-    >>!   obliged to provide the source code for proprietary components     !<<

-    >>!   outside of the FreeRTOS kernel.                                   !<<

-    ***************************************************************************

-

-    FreeRTOS is distributed in the hope that it will be useful, but WITHOUT ANY

-    WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS

-    FOR A PARTICULAR PURPOSE.  Full license text is available on the following

-    link: http://www.freertos.org/a00114.html

-

-    ***************************************************************************

-     *                                                                       *

-     *    FreeRTOS provides completely free yet professionally developed,    *

-     *    robust, strictly quality controlled, supported, and cross          *

-     *    platform software that is more than just the market leader, it     *

-     *    is the industry's de facto standard.                               *

-     *                                                                       *

-     *    Help yourself get started quickly while simultaneously helping     *

-     *    to support the FreeRTOS project by purchasing a FreeRTOS           *

-     *    tutorial book, reference manual, or both:                          *

-     *    http://www.FreeRTOS.org/Documentation                              *

-     *                                                                       *

-    ***************************************************************************

-

-    http://www.FreeRTOS.org/FAQHelp.html - Having a problem?  Start by reading

-    the FAQ page "My application does not run, what could be wrong?".  Have you

-    defined configASSERT()?

-

-    http://www.FreeRTOS.org/support - In return for receiving this top quality

-    embedded software for free we request you assist our global community by

-    participating in the support forum.

-

-    http://www.FreeRTOS.org/training - Investing in training allows your team to

-    be as productive as possible as early as possible.  Now you can receive

-    FreeRTOS training directly from Richard Barry, CEO of Real Time Engineers

-    Ltd, and the world's leading authority on the world's leading RTOS.

-

-    http://www.FreeRTOS.org/plus - A selection of FreeRTOS ecosystem products,

-    including FreeRTOS+Trace - an indispensable productivity tool, a DOS

-    compatible FAT file system, and our tiny thread aware UDP/IP stack.

-

-    http://www.FreeRTOS.org/labs - Where new FreeRTOS products go to incubate.

-    Come and try FreeRTOS+TCP, our new open source TCP/IP stack for FreeRTOS.

-

-    http://www.OpenRTOS.com - Real Time Engineers ltd. license FreeRTOS to High

-    Integrity Systems ltd. to sell under the OpenRTOS brand.  Low cost OpenRTOS

-    licenses offer ticketed support, indemnification and commercial middleware.

-

-    http://www.SafeRTOS.com - High Integrity Systems also provide a safety

-    engineered and independently SIL3 certified version for use in safety and

-    mission critical applications that require provable dependability.

-

-    1 tab == 4 spaces!

-*/

-

-#ifndef EVENT_GROUPS_H

-#define EVENT_GROUPS_H

-

-#ifndef INC_FREERTOS_H

-	#error "include FreeRTOS.h" must appear in source files before "include event_groups.h"

-#endif

-

-#include "timers.h"

-

-#ifdef __cplusplus

-extern "C" {

-#endif

-

-/**

- * An event group is a collection of bits to which an application can assign a

- * meaning.  For example, an application may create an event group to convey

- * the status of various CAN bus related events in which bit 0 might mean "A CAN

- * message has been received and is ready for processing", bit 1 might mean "The

- * application has queued a message that is ready for sending onto the CAN

- * network", and bit 2 might mean "It is time to send a SYNC message onto the

- * CAN network" etc.  A task can then test the bit values to see which events

- * are active, and optionally enter the Blocked state to wait for a specified

- * bit or a group of specified bits to be active.  To continue the CAN bus

- * example, a CAN controlling task can enter the Blocked state (and therefore

- * not consume any processing time) until either bit 0, bit 1 or bit 2 are

- * active, at which time the bit that was actually active would inform the task

- * which action it had to take (process a received message, send a message, or

- * send a SYNC).

- *

- * The event groups implementation contains intelligence to avoid race

- * conditions that would otherwise occur were an application to use a simple

- * variable for the same purpose.  This is particularly important with respect

- * to when a bit within an event group is to be cleared, and when bits have to

- * be set and then tested atomically - as is the case where event groups are

- * used to create a synchronisation point between multiple tasks (a

- * 'rendezvous').

- *

- * \defgroup EventGroup

- */

-

-

-

-/**

- * event_groups.h

- *

- * Type by which event groups are referenced.  For example, a call to

- * xEventGroupCreate() returns an EventGroupHandle_t variable that can then

- * be used as a parameter to other event group functions.

- *

- * \defgroup EventGroupHandle_t EventGroupHandle_t

- * \ingroup EventGroup

- */

-typedef void * EventGroupHandle_t;

-

-/* 

- * The type that holds event bits always matches TickType_t - therefore the

- * number of bits it holds is set by configUSE_16_BIT_TICKS (16 bits if set to 1,

- * 32 bits if set to 0. 

- *

- * \defgroup EventBits_t EventBits_t

- * \ingroup EventGroup

- */

-typedef TickType_t EventBits_t;

-

-/**

- * event_groups.h

- *<pre>

- EventGroupHandle_t xEventGroupCreate( void );

- </pre>

- *

- * Create a new event group.  This function cannot be called from an interrupt.

- *

- * Although event groups are not related to ticks, for internal implementation

- * reasons the number of bits available for use in an event group is dependent

- * on the configUSE_16_BIT_TICKS setting in FreeRTOSConfig.h.  If

- * configUSE_16_BIT_TICKS is 1 then each event group contains 8 usable bits (bit

- * 0 to bit 7).  If configUSE_16_BIT_TICKS is set to 0 then each event group has

- * 24 usable bits (bit 0 to bit 23).  The EventBits_t type is used to store

- * event bits within an event group.

- *

- * @return If the event group was created then a handle to the event group is

- * returned.  If there was insufficient FreeRTOS heap available to create the

- * event group then NULL is returned.  See http://www.freertos.org/a00111.html

- *

- * Example usage:

-   <pre>

-	// Declare a variable to hold the created event group.

-	EventGroupHandle_t xCreatedEventGroup;

-

-	// Attempt to create the event group.

-	xCreatedEventGroup = xEventGroupCreate();

-

-	// Was the event group created successfully?

-	if( xCreatedEventGroup == NULL )

-	{

-		// The event group was not created because there was insufficient

-		// FreeRTOS heap available.

-	}

-	else

-	{

-		// The event group was created.

-	}

-   </pre>

- * \defgroup xEventGroupCreate xEventGroupCreate

- * \ingroup EventGroup

- */

-EventGroupHandle_t xEventGroupCreate( void ) PRIVILEGED_FUNCTION;

-

-/**

- * event_groups.h

- *<pre>

-	EventBits_t xEventGroupWaitBits( 	EventGroupHandle_t xEventGroup,

-										const EventBits_t uxBitsToWaitFor,

-										const BaseType_t xClearOnExit,

-										const BaseType_t xWaitForAllBits,

-										const TickType_t xTicksToWait );

- </pre>

- *

- * [Potentially] block to wait for one or more bits to be set within a

- * previously created event group.

- *

- * This function cannot be called from an interrupt.

- *

- * @param xEventGroup The event group in which the bits are being tested.  The

- * event group must have previously been created using a call to

- * xEventGroupCreate().

- *

- * @param uxBitsToWaitFor A bitwise value that indicates the bit or bits to test

- * inside the event group.  For example, to wait for bit 0 and/or bit 2 set

- * uxBitsToWaitFor to 0x05.  To wait for bits 0 and/or bit 1 and/or bit 2 set

- * uxBitsToWaitFor to 0x07.  Etc.

- *

- * @param xClearOnExit If xClearOnExit is set to pdTRUE then any bits within

- * uxBitsToWaitFor that are set within the event group will be cleared before

- * xEventGroupWaitBits() returns if the wait condition was met (if the function

- * returns for a reason other than a timeout).  If xClearOnExit is set to

- * pdFALSE then the bits set in the event group are not altered when the call to

- * xEventGroupWaitBits() returns.

- *

- * @param xWaitForAllBits If xWaitForAllBits is set to pdTRUE then

- * xEventGroupWaitBits() will return when either all the bits in uxBitsToWaitFor

- * are set or the specified block time expires.  If xWaitForAllBits is set to

- * pdFALSE then xEventGroupWaitBits() will return when any one of the bits set

- * in uxBitsToWaitFor is set or the specified block time expires.  The block

- * time is specified by the xTicksToWait parameter.

- *

- * @param xTicksToWait The maximum amount of time (specified in 'ticks') to wait

- * for one/all (depending on the xWaitForAllBits value) of the bits specified by

- * uxBitsToWaitFor to become set.

- *

- * @return The value of the event group at the time either the bits being waited

- * for became set, or the block time expired.  Test the return value to know

- * which bits were set.  If xEventGroupWaitBits() returned because its timeout

- * expired then not all the bits being waited for will be set.  If

- * xEventGroupWaitBits() returned because the bits it was waiting for were set

- * then the returned value is the event group value before any bits were

- * automatically cleared in the case that xClearOnExit parameter was set to

- * pdTRUE.

- *

- * Example usage:

-   <pre>

-   #define BIT_0	( 1 << 0 )

-   #define BIT_4	( 1 << 4 )

-

-   void aFunction( EventGroupHandle_t xEventGroup )

-   {

-   EventBits_t uxBits;

-   const TickType_t xTicksToWait = 100 / portTICK_PERIOD_MS;

-

-		// Wait a maximum of 100ms for either bit 0 or bit 4 to be set within

-		// the event group.  Clear the bits before exiting.

-		uxBits = xEventGroupWaitBits(

-					xEventGroup,	// The event group being tested.

-					BIT_0 | BIT_4,	// The bits within the event group to wait for.

-					pdTRUE,			// BIT_0 and BIT_4 should be cleared before returning.

-					pdFALSE,		// Don't wait for both bits, either bit will do.

-					xTicksToWait );	// Wait a maximum of 100ms for either bit to be set.

-

-		if( ( uxBits & ( BIT_0 | BIT_4 ) ) == ( BIT_0 | BIT_4 ) )

-		{

-			// xEventGroupWaitBits() returned because both bits were set.

-		}

-		else if( ( uxBits & BIT_0 ) != 0 )

-		{

-			// xEventGroupWaitBits() returned because just BIT_0 was set.

-		}

-		else if( ( uxBits & BIT_4 ) != 0 )

-		{

-			// xEventGroupWaitBits() returned because just BIT_4 was set.

-		}

-		else

-		{

-			// xEventGroupWaitBits() returned because xTicksToWait ticks passed

-			// without either BIT_0 or BIT_4 becoming set.

-		}

-   }

-   </pre>

- * \defgroup xEventGroupWaitBits xEventGroupWaitBits

- * \ingroup EventGroup

- */

-EventBits_t xEventGroupWaitBits( EventGroupHandle_t xEventGroup, const EventBits_t uxBitsToWaitFor, const BaseType_t xClearOnExit, const BaseType_t xWaitForAllBits, TickType_t xTicksToWait ) PRIVILEGED_FUNCTION;

-

-/**

- * event_groups.h

- *<pre>

-	EventBits_t xEventGroupClearBits( EventGroupHandle_t xEventGroup, const EventBits_t uxBitsToClear );

- </pre>

- *

- * Clear bits within an event group.  This function cannot be called from an

- * interrupt.

- *

- * @param xEventGroup The event group in which the bits are to be cleared.

- *

- * @param uxBitsToClear A bitwise value that indicates the bit or bits to clear

- * in the event group.  For example, to clear bit 3 only, set uxBitsToClear to

- * 0x08.  To clear bit 3 and bit 0 set uxBitsToClear to 0x09.

- *

- * @return The value of the event group before the specified bits were cleared.

- *

- * Example usage:

-   <pre>

-   #define BIT_0	( 1 << 0 )

-   #define BIT_4	( 1 << 4 )

-

-   void aFunction( EventGroupHandle_t xEventGroup )

-   {

-   EventBits_t uxBits;

-

-		// Clear bit 0 and bit 4 in xEventGroup.

-		uxBits = xEventGroupClearBits(

-								xEventGroup,	// The event group being updated.

-								BIT_0 | BIT_4 );// The bits being cleared.

-

-		if( ( uxBits & ( BIT_0 | BIT_4 ) ) == ( BIT_0 | BIT_4 ) )

-		{

-			// Both bit 0 and bit 4 were set before xEventGroupClearBits() was

-			// called.  Both will now be clear (not set).

-		}

-		else if( ( uxBits & BIT_0 ) != 0 )

-		{

-			// Bit 0 was set before xEventGroupClearBits() was called.  It will

-			// now be clear.

-		}

-		else if( ( uxBits & BIT_4 ) != 0 )

-		{

-			// Bit 4 was set before xEventGroupClearBits() was called.  It will

-			// now be clear.

-		}

-		else

-		{

-			// Neither bit 0 nor bit 4 were set in the first place.

-		}

-   }

-   </pre>

- * \defgroup xEventGroupClearBits xEventGroupClearBits

- * \ingroup EventGroup

- */

-EventBits_t xEventGroupClearBits( EventGroupHandle_t xEventGroup, const EventBits_t uxBitsToClear ) PRIVILEGED_FUNCTION;

-

-/**

- * event_groups.h

- *<pre>

-	BaseType_t xEventGroupClearBitsFromISR( EventGroupHandle_t xEventGroup, const EventBits_t uxBitsToSet );

- </pre>

- *

- * A version of xEventGroupClearBits() that can be called from an interrupt.

- *

- * Setting bits in an event group is not a deterministic operation because there

- * are an unknown number of tasks that may be waiting for the bit or bits being

- * set.  FreeRTOS does not allow nondeterministic operations to be performed

- * while interrupts are disabled, so protects event groups that are accessed

- * from tasks by suspending the scheduler rather than disabling interrupts.  As

- * a result event groups cannot be accessed directly from an interrupt service

- * routine.  Therefore xEventGroupClearBitsFromISR() sends a message to the 

- * timer task to have the clear operation performed in the context of the timer 

- * task.

- *

- * @param xEventGroup The event group in which the bits are to be cleared.

- *

- * @param uxBitsToClear A bitwise value that indicates the bit or bits to clear.

- * For example, to clear bit 3 only, set uxBitsToClear to 0x08.  To clear bit 3

- * and bit 0 set uxBitsToClear to 0x09.

- *

- * @return If the request to execute the function was posted successfully then 

- * pdPASS is returned, otherwise pdFALSE is returned.  pdFALSE will be returned 

- * if the timer service queue was full.

- *

- * Example usage:

-   <pre>

-   #define BIT_0	( 1 << 0 )

-   #define BIT_4	( 1 << 4 )

-

-   // An event group which it is assumed has already been created by a call to

-   // xEventGroupCreate().

-   EventGroupHandle_t xEventGroup;

-

-   void anInterruptHandler( void )

-   {

-		// Clear bit 0 and bit 4 in xEventGroup.

-		xResult = xEventGroupClearBitsFromISR(

-							xEventGroup,	 // The event group being updated.

-							BIT_0 | BIT_4 ); // The bits being set.

-

-		if( xResult == pdPASS )

-		{

-			// The message was posted successfully.

-		}

-  }

-   </pre>

- * \defgroup xEventGroupSetBitsFromISR xEventGroupSetBitsFromISR

- * \ingroup EventGroup

- */

-#if( configUSE_TRACE_FACILITY == 1 )

-	BaseType_t xEventGroupClearBitsFromISR( EventGroupHandle_t xEventGroup, const EventBits_t uxBitsToSet ) PRIVILEGED_FUNCTION;

-#else

-	#define xEventGroupClearBitsFromISR( xEventGroup, uxBitsToClear ) xTimerPendFunctionCallFromISR( vEventGroupClearBitsCallback, ( void * ) xEventGroup, ( uint32_t ) uxBitsToClear, NULL )

-#endif

-

-/**

- * event_groups.h

- *<pre>

-	EventBits_t xEventGroupSetBits( EventGroupHandle_t xEventGroup, const EventBits_t uxBitsToSet );

- </pre>

- *

- * Set bits within an event group.

- * This function cannot be called from an interrupt.  xEventGroupSetBitsFromISR()

- * is a version that can be called from an interrupt.

- *

- * Setting bits in an event group will automatically unblock tasks that are

- * blocked waiting for the bits.

- *

- * @param xEventGroup The event group in which the bits are to be set.

- *

- * @param uxBitsToSet A bitwise value that indicates the bit or bits to set.

- * For example, to set bit 3 only, set uxBitsToSet to 0x08.  To set bit 3

- * and bit 0 set uxBitsToSet to 0x09.

- *

- * @return The value of the event group at the time the call to

- * xEventGroupSetBits() returns.  There are two reasons why the returned value

- * might have the bits specified by the uxBitsToSet parameter cleared.  First,

- * if setting a bit results in a task that was waiting for the bit leaving the

- * blocked state then it is possible the bit will be cleared automatically

- * (see the xClearBitOnExit parameter of xEventGroupWaitBits()).  Second, any

- * unblocked (or otherwise Ready state) task that has a priority above that of

- * the task that called xEventGroupSetBits() will execute and may change the

- * event group value before the call to xEventGroupSetBits() returns.

- *

- * Example usage:

-   <pre>

-   #define BIT_0	( 1 << 0 )

-   #define BIT_4	( 1 << 4 )

-

-   void aFunction( EventGroupHandle_t xEventGroup )

-   {

-   EventBits_t uxBits;

-

-		// Set bit 0 and bit 4 in xEventGroup.

-		uxBits = xEventGroupSetBits(

-							xEventGroup,	// The event group being updated.

-							BIT_0 | BIT_4 );// The bits being set.

-

-		if( ( uxBits & ( BIT_0 | BIT_4 ) ) == ( BIT_0 | BIT_4 ) )

-		{

-			// Both bit 0 and bit 4 remained set when the function returned.

-		}

-		else if( ( uxBits & BIT_0 ) != 0 )

-		{

-			// Bit 0 remained set when the function returned, but bit 4 was

-			// cleared.  It might be that bit 4 was cleared automatically as a

-			// task that was waiting for bit 4 was removed from the Blocked

-			// state.

-		}

-		else if( ( uxBits & BIT_4 ) != 0 )

-		{

-			// Bit 4 remained set when the function returned, but bit 0 was

-			// cleared.  It might be that bit 0 was cleared automatically as a

-			// task that was waiting for bit 0 was removed from the Blocked

-			// state.

-		}

-		else

-		{

-			// Neither bit 0 nor bit 4 remained set.  It might be that a task

-			// was waiting for both of the bits to be set, and the bits were

-			// cleared as the task left the Blocked state.

-		}

-   }

-   </pre>

- * \defgroup xEventGroupSetBits xEventGroupSetBits

- * \ingroup EventGroup

- */

-EventBits_t xEventGroupSetBits( EventGroupHandle_t xEventGroup, const EventBits_t uxBitsToSet ) PRIVILEGED_FUNCTION;

-

-/**

- * event_groups.h

- *<pre>

-	BaseType_t xEventGroupSetBitsFromISR( EventGroupHandle_t xEventGroup, const EventBits_t uxBitsToSet, BaseType_t *pxHigherPriorityTaskWoken );

- </pre>

- *

- * A version of xEventGroupSetBits() that can be called from an interrupt.

- *

- * Setting bits in an event group is not a deterministic operation because there

- * are an unknown number of tasks that may be waiting for the bit or bits being

- * set.  FreeRTOS does not allow nondeterministic operations to be performed in

- * interrupts or from critical sections.  Therefore xEventGroupSetBitFromISR()

- * sends a message to the timer task to have the set operation performed in the

- * context of the timer task - where a scheduler lock is used in place of a

- * critical section.

- *

- * @param xEventGroup The event group in which the bits are to be set.

- *

- * @param uxBitsToSet A bitwise value that indicates the bit or bits to set.

- * For example, to set bit 3 only, set uxBitsToSet to 0x08.  To set bit 3

- * and bit 0 set uxBitsToSet to 0x09.

- *

- * @param pxHigherPriorityTaskWoken As mentioned above, calling this function

- * will result in a message being sent to the timer daemon task.  If the

- * priority of the timer daemon task is higher than the priority of the

- * currently running task (the task the interrupt interrupted) then

- * *pxHigherPriorityTaskWoken will be set to pdTRUE by

- * xEventGroupSetBitsFromISR(), indicating that a context switch should be

- * requested before the interrupt exits.  For that reason

- * *pxHigherPriorityTaskWoken must be initialised to pdFALSE.  See the

- * example code below.

- *

- * @return If the request to execute the function was posted successfully then 

- * pdPASS is returned, otherwise pdFALSE is returned.  pdFALSE will be returned 

- * if the timer service queue was full.

- *

- * Example usage:

-   <pre>

-   #define BIT_0	( 1 << 0 )

-   #define BIT_4	( 1 << 4 )

-

-   // An event group which it is assumed has already been created by a call to

-   // xEventGroupCreate().

-   EventGroupHandle_t xEventGroup;

-

-   void anInterruptHandler( void )

-   {

-   BaseType_t xHigherPriorityTaskWoken, xResult;

-

-		// xHigherPriorityTaskWoken must be initialised to pdFALSE.

-		xHigherPriorityTaskWoken = pdFALSE;

-

-		// Set bit 0 and bit 4 in xEventGroup.

-		xResult = xEventGroupSetBitsFromISR(

-							xEventGroup,	// The event group being updated.

-							BIT_0 | BIT_4   // The bits being set.

-							&xHigherPriorityTaskWoken );

-

-		// Was the message posted successfully?

-		if( xResult == pdPASS )

-		{

-			// If xHigherPriorityTaskWoken is now set to pdTRUE then a context

-			// switch should be requested.  The macro used is port specific and 

-			// will be either portYIELD_FROM_ISR() or portEND_SWITCHING_ISR() - 

-			// refer to the documentation page for the port being used.

-			portYIELD_FROM_ISR( xHigherPriorityTaskWoken );

-		}

-  }

-   </pre>

- * \defgroup xEventGroupSetBitsFromISR xEventGroupSetBitsFromISR

- * \ingroup EventGroup

- */

-#if( configUSE_TRACE_FACILITY == 1 )

-	BaseType_t xEventGroupSetBitsFromISR( EventGroupHandle_t xEventGroup, const EventBits_t uxBitsToSet, BaseType_t *pxHigherPriorityTaskWoken ) PRIVILEGED_FUNCTION;

-#else

-	#define xEventGroupSetBitsFromISR( xEventGroup, uxBitsToSet, pxHigherPriorityTaskWoken ) xTimerPendFunctionCallFromISR( vEventGroupSetBitsCallback, ( void * ) xEventGroup, ( uint32_t ) uxBitsToSet, pxHigherPriorityTaskWoken )

-#endif

-

-/**

- * event_groups.h

- *<pre>

-	EventBits_t xEventGroupSync(	EventGroupHandle_t xEventGroup,

-									const EventBits_t uxBitsToSet,

-									const EventBits_t uxBitsToWaitFor,

-									TickType_t xTicksToWait );

- </pre>

- *

- * Atomically set bits within an event group, then wait for a combination of

- * bits to be set within the same event group.  This functionality is typically

- * used to synchronise multiple tasks, where each task has to wait for the other

- * tasks to reach a synchronisation point before proceeding.

- *

- * This function cannot be used from an interrupt.

- *

- * The function will return before its block time expires if the bits specified

- * by the uxBitsToWait parameter are set, or become set within that time.  In

- * this case all the bits specified by uxBitsToWait will be automatically

- * cleared before the function returns.

- *

- * @param xEventGroup The event group in which the bits are being tested.  The

- * event group must have previously been created using a call to

- * xEventGroupCreate().

- *

- * @param uxBitsToSet The bits to set in the event group before determining

- * if, and possibly waiting for, all the bits specified by the uxBitsToWait

- * parameter are set.

- *

- * @param uxBitsToWaitFor A bitwise value that indicates the bit or bits to test

- * inside the event group.  For example, to wait for bit 0 and bit 2 set

- * uxBitsToWaitFor to 0x05.  To wait for bits 0 and bit 1 and bit 2 set

- * uxBitsToWaitFor to 0x07.  Etc.

- *

- * @param xTicksToWait The maximum amount of time (specified in 'ticks') to wait

- * for all of the bits specified by uxBitsToWaitFor to become set.

- *

- * @return The value of the event group at the time either the bits being waited

- * for became set, or the block time expired.  Test the return value to know

- * which bits were set.  If xEventGroupSync() returned because its timeout

- * expired then not all the bits being waited for will be set.  If

- * xEventGroupSync() returned because all the bits it was waiting for were

- * set then the returned value is the event group value before any bits were

- * automatically cleared.

- *

- * Example usage:

- <pre>

- // Bits used by the three tasks.

- #define TASK_0_BIT		( 1 << 0 )

- #define TASK_1_BIT		( 1 << 1 )

- #define TASK_2_BIT		( 1 << 2 )

-

- #define ALL_SYNC_BITS ( TASK_0_BIT | TASK_1_BIT | TASK_2_BIT )

-

- // Use an event group to synchronise three tasks.  It is assumed this event

- // group has already been created elsewhere.

- EventGroupHandle_t xEventBits;

-

- void vTask0( void *pvParameters )

- {

- EventBits_t uxReturn;

- TickType_t xTicksToWait = 100 / portTICK_PERIOD_MS;

-

-	 for( ;; )

-	 {

-		// Perform task functionality here.

-

-		// Set bit 0 in the event flag to note this task has reached the

-		// sync point.  The other two tasks will set the other two bits defined

-		// by ALL_SYNC_BITS.  All three tasks have reached the synchronisation

-		// point when all the ALL_SYNC_BITS are set.  Wait a maximum of 100ms

-		// for this to happen.

-		uxReturn = xEventGroupSync( xEventBits, TASK_0_BIT, ALL_SYNC_BITS, xTicksToWait );

-

-		if( ( uxReturn & ALL_SYNC_BITS ) == ALL_SYNC_BITS )

-		{

-			// All three tasks reached the synchronisation point before the call

-			// to xEventGroupSync() timed out.

-		}

-	}

- }

-

- void vTask1( void *pvParameters )

- {

-	 for( ;; )

-	 {

-		// Perform task functionality here.

-

-		// Set bit 1 in the event flag to note this task has reached the

-		// synchronisation point.  The other two tasks will set the other two

-		// bits defined by ALL_SYNC_BITS.  All three tasks have reached the

-		// synchronisation point when all the ALL_SYNC_BITS are set.  Wait

-		// indefinitely for this to happen.

-		xEventGroupSync( xEventBits, TASK_1_BIT, ALL_SYNC_BITS, portMAX_DELAY );

-

-		// xEventGroupSync() was called with an indefinite block time, so

-		// this task will only reach here if the syncrhonisation was made by all

-		// three tasks, so there is no need to test the return value.

-	 }

- }

-

- void vTask2( void *pvParameters )

- {

-	 for( ;; )

-	 {

-		// Perform task functionality here.

-

-		// Set bit 2 in the event flag to note this task has reached the

-		// synchronisation point.  The other two tasks will set the other two

-		// bits defined by ALL_SYNC_BITS.  All three tasks have reached the

-		// synchronisation point when all the ALL_SYNC_BITS are set.  Wait

-		// indefinitely for this to happen.

-		xEventGroupSync( xEventBits, TASK_2_BIT, ALL_SYNC_BITS, portMAX_DELAY );

-

-		// xEventGroupSync() was called with an indefinite block time, so

-		// this task will only reach here if the syncrhonisation was made by all

-		// three tasks, so there is no need to test the return value.

-	}

- }

-

- </pre>

- * \defgroup xEventGroupSync xEventGroupSync

- * \ingroup EventGroup

- */

-EventBits_t xEventGroupSync( EventGroupHandle_t xEventGroup, const EventBits_t uxBitsToSet, const EventBits_t uxBitsToWaitFor, TickType_t xTicksToWait ) PRIVILEGED_FUNCTION;

-

-

-/**

- * event_groups.h

- *<pre>

-	EventBits_t xEventGroupGetBits( EventGroupHandle_t xEventGroup );

- </pre>

- *

- * Returns the current value of the bits in an event group.  This function

- * cannot be used from an interrupt.

- *

- * @param xEventGroup The event group being queried.

- *

- * @return The event group bits at the time xEventGroupGetBits() was called.

- *

- * \defgroup xEventGroupGetBits xEventGroupGetBits

- * \ingroup EventGroup

- */

-#define xEventGroupGetBits( xEventGroup ) xEventGroupClearBits( xEventGroup, 0 )

-

-/**

- * event_groups.h

- *<pre>

-	EventBits_t xEventGroupGetBitsFromISR( EventGroupHandle_t xEventGroup );

- </pre>

- *

- * A version of xEventGroupGetBits() that can be called from an ISR.

- *

- * @param xEventGroup The event group being queried.

- *

- * @return The event group bits at the time xEventGroupGetBitsFromISR() was called.

- *

- * \defgroup xEventGroupGetBitsFromISR xEventGroupGetBitsFromISR

- * \ingroup EventGroup

- */

-EventBits_t xEventGroupGetBitsFromISR( EventGroupHandle_t xEventGroup ) PRIVILEGED_FUNCTION;

-

-/**

- * event_groups.h

- *<pre>

-	void xEventGroupDelete( EventGroupHandle_t xEventGroup );

- </pre>

- *

- * Delete an event group that was previously created by a call to

- * xEventGroupCreate().  Tasks that are blocked on the event group will be

- * unblocked and obtain 0 as the event group's value.

- *

- * @param xEventGroup The event group being deleted.

- */

-void vEventGroupDelete( EventGroupHandle_t xEventGroup ) PRIVILEGED_FUNCTION;

-

-/* For internal use only. */

-void vEventGroupSetBitsCallback( void *pvEventGroup, const uint32_t ulBitsToSet ) PRIVILEGED_FUNCTION;

-void vEventGroupClearBitsCallback( void *pvEventGroup, const uint32_t ulBitsToClear ) PRIVILEGED_FUNCTION;

-

-#if (configUSE_TRACE_FACILITY == 1)

-	UBaseType_t uxEventGroupGetNumber( void* xEventGroup ) PRIVILEGED_FUNCTION;

-#endif

-

-#ifdef __cplusplus

-}

-#endif

-

-#endif /* EVENT_GROUPS_H */

-

-

diff --git a/FreeRTOS/Demo/Xilinx_FreeRTOS_BSP/repo/bsp/freertos822_xilinx_v1_0/src/Source/include/list.h b/FreeRTOS/Demo/Xilinx_FreeRTOS_BSP/repo/bsp/freertos822_xilinx_v1_0/src/Source/include/list.h
deleted file mode 100644
index 21353f3..0000000
--- a/FreeRTOS/Demo/Xilinx_FreeRTOS_BSP/repo/bsp/freertos822_xilinx_v1_0/src/Source/include/list.h
+++ /dev/null
@@ -1,405 +0,0 @@
-/*

-	OpenRTOS V8.2.1  Copyright (C) 2015 Real Time Engineers Ltd.

-

-	This file is part of the OpenRTOS product.

-

-	OpenRTOS is distributed exclusively by WITTENSTEIN high integrity systems,

-	and is subject to the terms of the License granted to your organization,

-	including its warranties and limitations on use and distribution. It cannot be

-	copied or reproduced in any way except as permitted by the License.

-

-	Licenses authorize use by processor, compiler, business unit, and product.

-	

-	WITTENSTEIN high integrity systems is a trading name of WITTENSTEIN

-	aerospace & simulation ltd, Registered Office: Brown's Court, Long Ashton

-	Business Park, Yanley Lane, Long Ashton, Bristol, BS41 9LB, UK.

-	Tel: +44 (0) 1275 395 600, fax: +44 (0) 1275 393 630.

-	E-mail: info@HighIntegritySystems.com

-

-	http://www.HighIntegritySystems.com

-*/

-

-/*

- * This is the list implementation used by the scheduler.  While it is tailored

- * heavily for the schedulers needs, it is also available for use by

- * application code.

- *

- * list_ts can only store pointers to list_item_ts.  Each ListItem_t contains a

- * numeric value (xItemValue).  Most of the time the lists are sorted in

- * descending item value order.

- *

- * Lists are created already containing one list item.  The value of this

- * item is the maximum possible that can be stored, it is therefore always at

- * the end of the list and acts as a marker.  The list member pxHead always

- * points to this marker - even though it is at the tail of the list.  This

- * is because the tail contains a wrap back pointer to the true head of

- * the list.

- *

- * In addition to it's value, each list item contains a pointer to the next

- * item in the list (pxNext), a pointer to the list it is in (pxContainer)

- * and a pointer to back to the object that contains it.  These later two

- * pointers are included for efficiency of list manipulation.  There is

- * effectively a two way link between the object containing the list item and

- * the list item itself.

- *

- *

- * \page ListIntroduction List Implementation

- * \ingroup FreeRTOSIntro

- */

-

-#ifndef INC_FREERTOS_H

-	#error FreeRTOS.h must be included before list.h

-#endif

-

-#ifndef LIST_H

-#define LIST_H

-

-/*

- * The list structure members are modified from within interrupts, and therefore

- * by rights should be declared volatile.  However, they are only modified in a

- * functionally atomic way (within critical sections of with the scheduler

- * suspended) and are either passed by reference into a function or indexed via

- * a volatile variable.  Therefore, in all use cases tested so far, the volatile

- * qualifier can be omitted in order to provide a moderate performance

- * improvement without adversely affecting functional behaviour.  The assembly

- * instructions generated by the IAR, ARM and GCC compilers when the respective

- * compiler's options were set for maximum optimisation has been inspected and

- * deemed to be as intended.  That said, as compiler technology advances, and

- * especially if aggressive cross module optimisation is used (a use case that

- * has not been exercised to any great extend) then it is feasible that the

- * volatile qualifier will be needed for correct optimisation.  It is expected

- * that a compiler removing essential code because, without the volatile

- * qualifier on the list structure members and with aggressive cross module

- * optimisation, the compiler deemed the code unnecessary will result in

- * complete and obvious failure of the scheduler.  If this is ever experienced

- * then the volatile qualifier can be inserted in the relevant places within the

- * list structures by simply defining configLIST_VOLATILE to volatile in

- * FreeRTOSConfig.h (as per the example at the bottom of this comment block).

- * If configLIST_VOLATILE is not defined then the preprocessor directives below

- * will simply #define configLIST_VOLATILE away completely.

- *

- * To use volatile list structure members then add the following line to

- * FreeRTOSConfig.h (without the quotes):

- * "#define configLIST_VOLATILE volatile"

- */

-#ifndef configLIST_VOLATILE

-	#define configLIST_VOLATILE

-#endif /* configSUPPORT_CROSS_MODULE_OPTIMISATION */

-

-#ifdef __cplusplus

-extern "C" {

-#endif

-

-/* Macros that can be used to place known values within the list structures,

-then check that the known values do not get corrupted during the execution of

-the application.   These may catch the list data structures being overwritten in

-memory.  They will not catch data errors caused by incorrect configuration or

-use of FreeRTOS.*/

-#if( configUSE_LIST_DATA_INTEGRITY_CHECK_BYTES == 0 )

-	/* Define the macros to do nothing. */

-	#define listFIRST_LIST_ITEM_INTEGRITY_CHECK_VALUE

-	#define listSECOND_LIST_ITEM_INTEGRITY_CHECK_VALUE

-	#define listFIRST_LIST_INTEGRITY_CHECK_VALUE

-	#define listSECOND_LIST_INTEGRITY_CHECK_VALUE

-	#define listSET_FIRST_LIST_ITEM_INTEGRITY_CHECK_VALUE( pxItem )

-	#define listSET_SECOND_LIST_ITEM_INTEGRITY_CHECK_VALUE( pxItem )

-	#define listSET_LIST_INTEGRITY_CHECK_1_VALUE( pxList )

-	#define listSET_LIST_INTEGRITY_CHECK_2_VALUE( pxList )

-	#define listTEST_LIST_ITEM_INTEGRITY( pxItem )

-	#define listTEST_LIST_INTEGRITY( pxList )

-#else

-	/* Define macros that add new members into the list structures. */

-	#define listFIRST_LIST_ITEM_INTEGRITY_CHECK_VALUE				TickType_t xListItemIntegrityValue1;

-	#define listSECOND_LIST_ITEM_INTEGRITY_CHECK_VALUE				TickType_t xListItemIntegrityValue2;

-	#define listFIRST_LIST_INTEGRITY_CHECK_VALUE					TickType_t xListIntegrityValue1;

-	#define listSECOND_LIST_INTEGRITY_CHECK_VALUE					TickType_t xListIntegrityValue2;

-

-	/* Define macros that set the new structure members to known values. */

-	#define listSET_FIRST_LIST_ITEM_INTEGRITY_CHECK_VALUE( pxItem )		( pxItem )->xListItemIntegrityValue1 = pdINTEGRITY_CHECK_VALUE

-	#define listSET_SECOND_LIST_ITEM_INTEGRITY_CHECK_VALUE( pxItem )	( pxItem )->xListItemIntegrityValue2 = pdINTEGRITY_CHECK_VALUE

-	#define listSET_LIST_INTEGRITY_CHECK_1_VALUE( pxList )		( pxList )->xListIntegrityValue1 = pdINTEGRITY_CHECK_VALUE

-	#define listSET_LIST_INTEGRITY_CHECK_2_VALUE( pxList )		( pxList )->xListIntegrityValue2 = pdINTEGRITY_CHECK_VALUE

-

-	/* Define macros that will assert if one of the structure members does not

-	contain its expected value. */

-	#define listTEST_LIST_ITEM_INTEGRITY( pxItem )		configASSERT( ( ( pxItem )->xListItemIntegrityValue1 == pdINTEGRITY_CHECK_VALUE ) && ( ( pxItem )->xListItemIntegrityValue2 == pdINTEGRITY_CHECK_VALUE ) )

-	#define listTEST_LIST_INTEGRITY( pxList )			configASSERT( ( ( pxList )->xListIntegrityValue1 == pdINTEGRITY_CHECK_VALUE ) && ( ( pxList )->xListIntegrityValue2 == pdINTEGRITY_CHECK_VALUE ) )

-#endif /* configUSE_LIST_DATA_INTEGRITY_CHECK_BYTES */

-

-

-/*

- * Definition of the only type of object that a list can contain.

- */

-struct xLIST_ITEM

-{

-	listFIRST_LIST_ITEM_INTEGRITY_CHECK_VALUE				/*< Set to a known value if configUSE_LIST_DATA_INTEGRITY_CHECK_BYTES is set to 1. */

-	configLIST_VOLATILE TickType_t xItemValue;			/*< The value being listed.  In most cases this is used to sort the list in descending order. */

-	struct xLIST_ITEM * configLIST_VOLATILE pxNext;		/*< Pointer to the next ListItem_t in the list. */

-	struct xLIST_ITEM * configLIST_VOLATILE pxPrevious;	/*< Pointer to the previous ListItem_t in the list. */

-	void * pvOwner;										/*< Pointer to the object (normally a TCB) that contains the list item.  There is therefore a two way link between the object containing the list item and the list item itself. */

-	void * configLIST_VOLATILE pvContainer;				/*< Pointer to the list in which this list item is placed (if any). */

-	listSECOND_LIST_ITEM_INTEGRITY_CHECK_VALUE				/*< Set to a known value if configUSE_LIST_DATA_INTEGRITY_CHECK_BYTES is set to 1. */

-};

-typedef struct xLIST_ITEM ListItem_t;					/* For some reason lint wants this as two separate definitions. */

-

-struct xMINI_LIST_ITEM

-{

-	listFIRST_LIST_ITEM_INTEGRITY_CHECK_VALUE				/*< Set to a known value if configUSE_LIST_DATA_INTEGRITY_CHECK_BYTES is set to 1. */

-	configLIST_VOLATILE TickType_t xItemValue;

-	struct xLIST_ITEM * configLIST_VOLATILE pxNext;

-	struct xLIST_ITEM * configLIST_VOLATILE pxPrevious;

-};

-typedef struct xMINI_LIST_ITEM MiniListItem_t;

-

-/*

- * Definition of the type of queue used by the scheduler.

- */

-typedef struct xLIST

-{

-	listFIRST_LIST_INTEGRITY_CHECK_VALUE				/*< Set to a known value if configUSE_LIST_DATA_INTEGRITY_CHECK_BYTES is set to 1. */

-	configLIST_VOLATILE UBaseType_t uxNumberOfItems;

-	ListItem_t * configLIST_VOLATILE pxIndex;		/*< Used to walk through the list.  Points to the last item returned by a call to listGET_OWNER_OF_NEXT_ENTRY (). */

-	MiniListItem_t xListEnd;						/*< List item that contains the maximum possible item value meaning it is always at the end of the list and is therefore used as a marker. */

-	listSECOND_LIST_INTEGRITY_CHECK_VALUE				/*< Set to a known value if configUSE_LIST_DATA_INTEGRITY_CHECK_BYTES is set to 1. */

-} List_t;

-

-/*

- * Access macro to set the owner of a list item.  The owner of a list item

- * is the object (usually a TCB) that contains the list item.

- *

- * \page listSET_LIST_ITEM_OWNER listSET_LIST_ITEM_OWNER

- * \ingroup LinkedList

- */

-#define listSET_LIST_ITEM_OWNER( pxListItem, pxOwner )		( ( pxListItem )->pvOwner = ( void * ) ( pxOwner ) )

-

-/*

- * Access macro to get the owner of a list item.  The owner of a list item

- * is the object (usually a TCB) that contains the list item.

- *

- * \page listSET_LIST_ITEM_OWNER listSET_LIST_ITEM_OWNER

- * \ingroup LinkedList

- */

-#define listGET_LIST_ITEM_OWNER( pxListItem )	( ( pxListItem )->pvOwner )

-

-/*

- * Access macro to set the value of the list item.  In most cases the value is

- * used to sort the list in descending order.

- *

- * \page listSET_LIST_ITEM_VALUE listSET_LIST_ITEM_VALUE

- * \ingroup LinkedList

- */

-#define listSET_LIST_ITEM_VALUE( pxListItem, xValue )	( ( pxListItem )->xItemValue = ( xValue ) )

-

-/*

- * Access macro to retrieve the value of the list item.  The value can

- * represent anything - for example the priority of a task, or the time at

- * which a task should be unblocked.

- *

- * \page listGET_LIST_ITEM_VALUE listGET_LIST_ITEM_VALUE

- * \ingroup LinkedList

- */

-#define listGET_LIST_ITEM_VALUE( pxListItem )	( ( pxListItem )->xItemValue )

-

-/*

- * Access macro to retrieve the value of the list item at the head of a given

- * list.

- *

- * \page listGET_LIST_ITEM_VALUE listGET_LIST_ITEM_VALUE

- * \ingroup LinkedList

- */

-#define listGET_ITEM_VALUE_OF_HEAD_ENTRY( pxList )	( ( ( pxList )->xListEnd ).pxNext->xItemValue )

-

-/*

- * Return the list item at the head of the list.

- *

- * \page listGET_HEAD_ENTRY listGET_HEAD_ENTRY

- * \ingroup LinkedList

- */

-#define listGET_HEAD_ENTRY( pxList )	( ( ( pxList )->xListEnd ).pxNext )

-

-/*

- * Return the list item at the head of the list.

- *

- * \page listGET_NEXT listGET_NEXT

- * \ingroup LinkedList

- */

-#define listGET_NEXT( pxListItem )	( ( pxListItem )->pxNext )

-

-/*

- * Return the list item that marks the end of the list

- *

- * \page listGET_END_MARKER listGET_END_MARKER

- * \ingroup LinkedList

- */

-#define listGET_END_MARKER( pxList )	( ( ListItem_t const * ) ( &( ( pxList )->xListEnd ) ) )

-

-/*

- * Access macro to determine if a list contains any items.  The macro will

- * only have the value true if the list is empty.

- *

- * \page listLIST_IS_EMPTY listLIST_IS_EMPTY

- * \ingroup LinkedList

- */

-#define listLIST_IS_EMPTY( pxList )	( ( BaseType_t ) ( ( pxList )->uxNumberOfItems == ( UBaseType_t ) 0 ) )

-

-/*

- * Access macro to return the number of items in the list.

- */

-#define listCURRENT_LIST_LENGTH( pxList )	( ( pxList )->uxNumberOfItems )

-

-/*

- * Access function to obtain the owner of the next entry in a list.

- *

- * The list member pxIndex is used to walk through a list.  Calling

- * listGET_OWNER_OF_NEXT_ENTRY increments pxIndex to the next item in the list

- * and returns that entry's pxOwner parameter.  Using multiple calls to this

- * function it is therefore possible to move through every item contained in

- * a list.

- *

- * The pxOwner parameter of a list item is a pointer to the object that owns

- * the list item.  In the scheduler this is normally a task control block.

- * The pxOwner parameter effectively creates a two way link between the list

- * item and its owner.

- *

- * @param pxTCB pxTCB is set to the address of the owner of the next list item.

- * @param pxList The list from which the next item owner is to be returned.

- *

- * \page listGET_OWNER_OF_NEXT_ENTRY listGET_OWNER_OF_NEXT_ENTRY

- * \ingroup LinkedList

- */

-#define listGET_OWNER_OF_NEXT_ENTRY( pxTCB, pxList )										\

-{																							\

-List_t * const pxConstList = ( pxList );													\

-	/* Increment the index to the next item and return the item, ensuring */				\

-	/* we don't return the marker used at the end of the list.  */							\

-	( pxConstList )->pxIndex = ( pxConstList )->pxIndex->pxNext;							\

-	if( ( void * ) ( pxConstList )->pxIndex == ( void * ) &( ( pxConstList )->xListEnd ) )	\

-	{																						\

-		( pxConstList )->pxIndex = ( pxConstList )->pxIndex->pxNext;						\

-	}																						\

-	( pxTCB ) = ( pxConstList )->pxIndex->pvOwner;											\

-}

-

-

-/*

- * Access function to obtain the owner of the first entry in a list.  Lists

- * are normally sorted in ascending item value order.

- *

- * This function returns the pxOwner member of the first item in the list.

- * The pxOwner parameter of a list item is a pointer to the object that owns

- * the list item.  In the scheduler this is normally a task control block.

- * The pxOwner parameter effectively creates a two way link between the list

- * item and its owner.

- *

- * @param pxList The list from which the owner of the head item is to be

- * returned.

- *

- * \page listGET_OWNER_OF_HEAD_ENTRY listGET_OWNER_OF_HEAD_ENTRY

- * \ingroup LinkedList

- */

-#define listGET_OWNER_OF_HEAD_ENTRY( pxList )  ( (&( ( pxList )->xListEnd ))->pxNext->pvOwner )

-

-/*

- * Check to see if a list item is within a list.  The list item maintains a

- * "container" pointer that points to the list it is in.  All this macro does

- * is check to see if the container and the list match.

- *

- * @param pxList The list we want to know if the list item is within.

- * @param pxListItem The list item we want to know if is in the list.

- * @return pdTRUE if the list item is in the list, otherwise pdFALSE.

- */

-#define listIS_CONTAINED_WITHIN( pxList, pxListItem ) ( ( BaseType_t ) ( ( pxListItem )->pvContainer == ( void * ) ( pxList ) ) )

-

-/*

- * Return the list a list item is contained within (referenced from).

- *

- * @param pxListItem The list item being queried.

- * @return A pointer to the List_t object that references the pxListItem

- */

-#define listLIST_ITEM_CONTAINER( pxListItem ) ( ( pxListItem )->pvContainer )

-

-/*

- * This provides a crude means of knowing if a list has been initialised, as

- * pxList->xListEnd.xItemValue is set to portMAX_DELAY by the vListInitialise()

- * function.

- */

-#define listLIST_IS_INITIALISED( pxList ) ( ( pxList )->xListEnd.xItemValue == portMAX_DELAY )

-

-/*

- * Must be called before a list is used!  This initialises all the members

- * of the list structure and inserts the xListEnd item into the list as a

- * marker to the back of the list.

- *

- * @param pxList Pointer to the list being initialised.

- *

- * \page vListInitialise vListInitialise

- * \ingroup LinkedList

- */

-void vListInitialise( List_t * const pxList ) PRIVILEGED_FUNCTION;

-

-/*

- * Must be called before a list item is used.  This sets the list container to

- * null so the item does not think that it is already contained in a list.

- *

- * @param pxItem Pointer to the list item being initialised.

- *

- * \page vListInitialiseItem vListInitialiseItem

- * \ingroup LinkedList

- */

-void vListInitialiseItem( ListItem_t * const pxItem ) PRIVILEGED_FUNCTION;

-

-/*

- * Insert a list item into a list.  The item will be inserted into the list in

- * a position determined by its item value (descending item value order).

- *

- * @param pxList The list into which the item is to be inserted.

- *

- * @param pxNewListItem The item that is to be placed in the list.

- *

- * \page vListInsert vListInsert

- * \ingroup LinkedList

- */

-void vListInsert( List_t * const pxList, ListItem_t * const pxNewListItem ) PRIVILEGED_FUNCTION;

-

-/*

- * Insert a list item into a list.  The item will be inserted in a position

- * such that it will be the last item within the list returned by multiple

- * calls to listGET_OWNER_OF_NEXT_ENTRY.

- *

- * The list member pvIndex is used to walk through a list.  Calling

- * listGET_OWNER_OF_NEXT_ENTRY increments pvIndex to the next item in the list.

- * Placing an item in a list using vListInsertEnd effectively places the item

- * in the list position pointed to by pvIndex.  This means that every other

- * item within the list will be returned by listGET_OWNER_OF_NEXT_ENTRY before

- * the pvIndex parameter again points to the item being inserted.

- *

- * @param pxList The list into which the item is to be inserted.

- *

- * @param pxNewListItem The list item to be inserted into the list.

- *

- * \page vListInsertEnd vListInsertEnd

- * \ingroup LinkedList

- */

-void vListInsertEnd( List_t * const pxList, ListItem_t * const pxNewListItem ) PRIVILEGED_FUNCTION;

-

-/*

- * Remove an item from a list.  The list item has a pointer to the list that

- * it is in, so only the list item need be passed into the function.

- *

- * @param uxListRemove The item to be removed.  The item will remove itself from

- * the list pointed to by it's pxContainer parameter.

- *

- * @return The number of items that remain in the list after the list item has

- * been removed.

- *

- * \page uxListRemove uxListRemove

- * \ingroup LinkedList

- */

-UBaseType_t uxListRemove( ListItem_t * const pxItemToRemove ) PRIVILEGED_FUNCTION;

-

-#ifdef __cplusplus

-}

-#endif

-

-#endif

-

diff --git a/FreeRTOS/Demo/Xilinx_FreeRTOS_BSP/repo/bsp/freertos822_xilinx_v1_0/src/Source/include/mpu_wrappers.h b/FreeRTOS/Demo/Xilinx_FreeRTOS_BSP/repo/bsp/freertos822_xilinx_v1_0/src/Source/include/mpu_wrappers.h
deleted file mode 100644
index b7073a9..0000000
--- a/FreeRTOS/Demo/Xilinx_FreeRTOS_BSP/repo/bsp/freertos822_xilinx_v1_0/src/Source/include/mpu_wrappers.h
+++ /dev/null
@@ -1,157 +0,0 @@
-/*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

-    All rights reserved

-

-    VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

-

-    This file is part of the FreeRTOS distribution.

-

-    FreeRTOS is free software; you can redistribute it and/or modify it under

-    the terms of the GNU General Public License (version 2) as published by the

-    Free Software Foundation >>!AND MODIFIED BY!<< the FreeRTOS exception.

-

-    ***************************************************************************

-    >>!   NOTE: The modification to the GPL is included to allow you to     !<<

-    >>!   distribute a combined work that includes FreeRTOS without being   !<<

-    >>!   obliged to provide the source code for proprietary components     !<<

-    >>!   outside of the FreeRTOS kernel.                                   !<<

-    ***************************************************************************

-

-    FreeRTOS is distributed in the hope that it will be useful, but WITHOUT ANY

-    WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS

-    FOR A PARTICULAR PURPOSE.  Full license text is available on the following

-    link: http://www.freertos.org/a00114.html

-

-    ***************************************************************************

-     *                                                                       *

-     *    FreeRTOS provides completely free yet professionally developed,    *

-     *    robust, strictly quality controlled, supported, and cross          *

-     *    platform software that is more than just the market leader, it     *

-     *    is the industry's de facto standard.                               *

-     *                                                                       *

-     *    Help yourself get started quickly while simultaneously helping     *

-     *    to support the FreeRTOS project by purchasing a FreeRTOS           *

-     *    tutorial book, reference manual, or both:                          *

-     *    http://www.FreeRTOS.org/Documentation                              *

-     *                                                                       *

-    ***************************************************************************

-

-    http://www.FreeRTOS.org/FAQHelp.html - Having a problem?  Start by reading

-    the FAQ page "My application does not run, what could be wrong?".  Have you

-    defined configASSERT()?

-

-    http://www.FreeRTOS.org/support - In return for receiving this top quality

-    embedded software for free we request you assist our global community by

-    participating in the support forum.

-

-    http://www.FreeRTOS.org/training - Investing in training allows your team to

-    be as productive as possible as early as possible.  Now you can receive

-    FreeRTOS training directly from Richard Barry, CEO of Real Time Engineers

-    Ltd, and the world's leading authority on the world's leading RTOS.

-

-    http://www.FreeRTOS.org/plus - A selection of FreeRTOS ecosystem products,

-    including FreeRTOS+Trace - an indispensable productivity tool, a DOS

-    compatible FAT file system, and our tiny thread aware UDP/IP stack.

-

-    http://www.FreeRTOS.org/labs - Where new FreeRTOS products go to incubate.

-    Come and try FreeRTOS+TCP, our new open source TCP/IP stack for FreeRTOS.

-

-    http://www.OpenRTOS.com - Real Time Engineers ltd. license FreeRTOS to High

-    Integrity Systems ltd. to sell under the OpenRTOS brand.  Low cost OpenRTOS

-    licenses offer ticketed support, indemnification and commercial middleware.

-

-    http://www.SafeRTOS.com - High Integrity Systems also provide a safety

-    engineered and independently SIL3 certified version for use in safety and

-    mission critical applications that require provable dependability.

-

-    1 tab == 4 spaces!

-*/

-

-#ifndef MPU_WRAPPERS_H

-#define MPU_WRAPPERS_H

-

-/* This file redefines API functions to be called through a wrapper macro, but

-only for ports that are using the MPU. */

-#ifdef portUSING_MPU_WRAPPERS

-

-	/* MPU_WRAPPERS_INCLUDED_FROM_API_FILE will be defined when this file is

-	included from queue.c or task.c to prevent it from having an effect within

-	those files. */

-	#ifndef MPU_WRAPPERS_INCLUDED_FROM_API_FILE

-

-		#define xTaskGenericCreate				MPU_xTaskGenericCreate

-		#define vTaskAllocateMPURegions			MPU_vTaskAllocateMPURegions

-		#define vTaskDelete						MPU_vTaskDelete

-		#define vTaskDelayUntil					MPU_vTaskDelayUntil

-		#define vTaskDelay						MPU_vTaskDelay

-		#define uxTaskPriorityGet				MPU_uxTaskPriorityGet

-		#define vTaskPrioritySet				MPU_vTaskPrioritySet

-		#define eTaskGetState					MPU_eTaskGetState

-		#define vTaskSuspend					MPU_vTaskSuspend

-		#define vTaskResume						MPU_vTaskResume

-		#define vTaskSuspendAll					MPU_vTaskSuspendAll

-		#define xTaskResumeAll					MPU_xTaskResumeAll

-		#define xTaskGetTickCount				MPU_xTaskGetTickCount

-		#define uxTaskGetNumberOfTasks			MPU_uxTaskGetNumberOfTasks

-		#define vTaskList						MPU_vTaskList

-		#define vTaskGetRunTimeStats			MPU_vTaskGetRunTimeStats

-		#define vTaskSetApplicationTaskTag		MPU_vTaskSetApplicationTaskTag

-		#define xTaskGetApplicationTaskTag		MPU_xTaskGetApplicationTaskTag

-		#define xTaskCallApplicationTaskHook	MPU_xTaskCallApplicationTaskHook

-		#define uxTaskGetStackHighWaterMark		MPU_uxTaskGetStackHighWaterMark

-		#define xTaskGetCurrentTaskHandle		MPU_xTaskGetCurrentTaskHandle

-		#define xTaskGetSchedulerState			MPU_xTaskGetSchedulerState

-		#define xTaskGetIdleTaskHandle			MPU_xTaskGetIdleTaskHandle

-		#define uxTaskGetSystemState			MPU_uxTaskGetSystemState

-

-		#define xQueueGenericCreate				MPU_xQueueGenericCreate

-		#define xQueueCreateMutex				MPU_xQueueCreateMutex

-		#define xQueueGiveMutexRecursive		MPU_xQueueGiveMutexRecursive

-		#define xQueueTakeMutexRecursive		MPU_xQueueTakeMutexRecursive

-		#define xQueueCreateCountingSemaphore	MPU_xQueueCreateCountingSemaphore

-		#define xQueueGenericSend				MPU_xQueueGenericSend

-		#define xQueueAltGenericSend			MPU_xQueueAltGenericSend

-		#define xQueueAltGenericReceive			MPU_xQueueAltGenericReceive

-		#define xQueueGenericReceive			MPU_xQueueGenericReceive

-		#define uxQueueMessagesWaiting			MPU_uxQueueMessagesWaiting

-		#define vQueueDelete					MPU_vQueueDelete

-		#define xQueueGenericReset				MPU_xQueueGenericReset

-		#define xQueueCreateSet					MPU_xQueueCreateSet

-		#define xQueueSelectFromSet				MPU_xQueueSelectFromSet

-		#define xQueueAddToSet					MPU_xQueueAddToSet

-		#define xQueueRemoveFromSet				MPU_xQueueRemoveFromSet

-		#define xQueuePeekFromISR				MPU_xQueuePeekFromISR

-		#define xQueueGetMutexHolder			MPU_xQueueGetMutexHolder

-

-		#define pvPortMalloc					MPU_pvPortMalloc

-		#define vPortFree						MPU_vPortFree

-		#define xPortGetFreeHeapSize			MPU_xPortGetFreeHeapSize

-		#define vPortInitialiseBlocks			MPU_vPortInitialiseBlocks

-

-		#if configQUEUE_REGISTRY_SIZE > 0

-			#define vQueueAddToRegistry				MPU_vQueueAddToRegistry

-			#define vQueueUnregisterQueue			MPU_vQueueUnregisterQueue

-		#endif

-

-		/* Remove the privileged function macro. */

-		#define PRIVILEGED_FUNCTION

-

-	#else /* MPU_WRAPPERS_INCLUDED_FROM_API_FILE */

-

-		/* Ensure API functions go in the privileged execution section. */

-		#define PRIVILEGED_FUNCTION __attribute__((section("privileged_functions")))

-		#define PRIVILEGED_DATA __attribute__((section("privileged_data")))

-

-	#endif /* MPU_WRAPPERS_INCLUDED_FROM_API_FILE */

-

-#else /* portUSING_MPU_WRAPPERS */

-

-	#define PRIVILEGED_FUNCTION

-	#define PRIVILEGED_DATA

-	#define portUSING_MPU_WRAPPERS 0

-

-#endif /* portUSING_MPU_WRAPPERS */

-

-

-#endif /* MPU_WRAPPERS_H */

-

diff --git a/FreeRTOS/Demo/Xilinx_FreeRTOS_BSP/repo/bsp/freertos822_xilinx_v1_0/src/Source/include/portable.h b/FreeRTOS/Demo/Xilinx_FreeRTOS_BSP/repo/bsp/freertos822_xilinx_v1_0/src/Source/include/portable.h
deleted file mode 100644
index 8e30301..0000000
--- a/FreeRTOS/Demo/Xilinx_FreeRTOS_BSP/repo/bsp/freertos822_xilinx_v1_0/src/Source/include/portable.h
+++ /dev/null
@@ -1,207 +0,0 @@
-/*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

-    All rights reserved

-

-    VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

-

-    This file is part of the FreeRTOS distribution.

-

-    FreeRTOS is free software; you can redistribute it and/or modify it under

-    the terms of the GNU General Public License (version 2) as published by the

-    Free Software Foundation >>!AND MODIFIED BY!<< the FreeRTOS exception.

-

-    ***************************************************************************

-    >>!   NOTE: The modification to the GPL is included to allow you to     !<<

-    >>!   distribute a combined work that includes FreeRTOS without being   !<<

-    >>!   obliged to provide the source code for proprietary components     !<<

-    >>!   outside of the FreeRTOS kernel.                                   !<<

-    ***************************************************************************

-

-    FreeRTOS is distributed in the hope that it will be useful, but WITHOUT ANY

-    WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS

-    FOR A PARTICULAR PURPOSE.  Full license text is available on the following

-    link: http://www.freertos.org/a00114.html

-

-    ***************************************************************************

-     *                                                                       *

-     *    FreeRTOS provides completely free yet professionally developed,    *

-     *    robust, strictly quality controlled, supported, and cross          *

-     *    platform software that is more than just the market leader, it     *

-     *    is the industry's de facto standard.                               *

-     *                                                                       *

-     *    Help yourself get started quickly while simultaneously helping     *

-     *    to support the FreeRTOS project by purchasing a FreeRTOS           *

-     *    tutorial book, reference manual, or both:                          *

-     *    http://www.FreeRTOS.org/Documentation                              *

-     *                                                                       *

-    ***************************************************************************

-

-    http://www.FreeRTOS.org/FAQHelp.html - Having a problem?  Start by reading

-    the FAQ page "My application does not run, what could be wrong?".  Have you

-    defined configASSERT()?

-

-    http://www.FreeRTOS.org/support - In return for receiving this top quality

-    embedded software for free we request you assist our global community by

-    participating in the support forum.

-

-    http://www.FreeRTOS.org/training - Investing in training allows your team to

-    be as productive as possible as early as possible.  Now you can receive

-    FreeRTOS training directly from Richard Barry, CEO of Real Time Engineers

-    Ltd, and the world's leading authority on the world's leading RTOS.

-

-    http://www.FreeRTOS.org/plus - A selection of FreeRTOS ecosystem products,

-    including FreeRTOS+Trace - an indispensable productivity tool, a DOS

-    compatible FAT file system, and our tiny thread aware UDP/IP stack.

-

-    http://www.FreeRTOS.org/labs - Where new FreeRTOS products go to incubate.

-    Come and try FreeRTOS+TCP, our new open source TCP/IP stack for FreeRTOS.

-

-    http://www.OpenRTOS.com - Real Time Engineers ltd. license FreeRTOS to High

-    Integrity Systems ltd. to sell under the OpenRTOS brand.  Low cost OpenRTOS

-    licenses offer ticketed support, indemnification and commercial middleware.

-

-    http://www.SafeRTOS.com - High Integrity Systems also provide a safety

-    engineered and independently SIL3 certified version for use in safety and

-    mission critical applications that require provable dependability.

-

-    1 tab == 4 spaces!

-*/

-

-/*-----------------------------------------------------------

- * Portable layer API.  Each function must be defined for each port.

- *----------------------------------------------------------*/

-

-#ifndef PORTABLE_H

-#define PORTABLE_H

-

-/* Each FreeRTOS port has a unique portmacro.h header file.  Originally a

-pre-processor definition was used to ensure the pre-processor found the correct

-portmacro.h file for the port being used.  That scheme was deprecated in favour

-of setting the compiler's include path such that it found the correct

-portmacro.h file - removing the need for the constant and allowing the

-portmacro.h file to be located anywhere in relation to the port being used.

-Purely for reasons of backward compatibility the old method is still valid, but

-to make it clear that new projects should not use it, support for the port

-specific constants has been moved into the deprecated_definitions.h header

-file. */

-#include "deprecated_definitions.h"

-

-/* If portENTER_CRITICAL is not defined then including deprecated_definitions.h

-did not result in a portmacro.h header file being included - and it should be

-included here.  In this case the path to the correct portmacro.h header file

-must be set in the compiler's include path. */

-#ifndef portENTER_CRITICAL

-	#include "portmacro.h"

-#endif

-

-#if portBYTE_ALIGNMENT == 32

-	#define portBYTE_ALIGNMENT_MASK ( 0x001f )

-#endif

-

-#if portBYTE_ALIGNMENT == 16

-	#define portBYTE_ALIGNMENT_MASK ( 0x000f )

-#endif

-

-#if portBYTE_ALIGNMENT == 8

-	#define portBYTE_ALIGNMENT_MASK ( 0x0007 )

-#endif

-

-#if portBYTE_ALIGNMENT == 4

-	#define portBYTE_ALIGNMENT_MASK	( 0x0003 )

-#endif

-

-#if portBYTE_ALIGNMENT == 2

-	#define portBYTE_ALIGNMENT_MASK	( 0x0001 )

-#endif

-

-#if portBYTE_ALIGNMENT == 1

-	#define portBYTE_ALIGNMENT_MASK	( 0x0000 )

-#endif

-

-#ifndef portBYTE_ALIGNMENT_MASK

-	#error "Invalid portBYTE_ALIGNMENT definition"

-#endif

-

-#ifndef portNUM_CONFIGURABLE_REGIONS

-	#define portNUM_CONFIGURABLE_REGIONS 1

-#endif

-

-#ifdef __cplusplus

-extern "C" {

-#endif

-

-#include "mpu_wrappers.h"

-

-/*

- * Setup the stack of a new task so it is ready to be placed under the

- * scheduler control.  The registers have to be placed on the stack in

- * the order that the port expects to find them.

- *

- */

-#if( portUSING_MPU_WRAPPERS == 1 )

-	StackType_t *pxPortInitialiseStack( StackType_t *pxTopOfStack, TaskFunction_t pxCode, void *pvParameters, BaseType_t xRunPrivileged ) PRIVILEGED_FUNCTION;

-#else

-	StackType_t *pxPortInitialiseStack( StackType_t *pxTopOfStack, TaskFunction_t pxCode, void *pvParameters ) PRIVILEGED_FUNCTION;

-#endif

-

-/* Used by heap_5.c. */

-typedef struct HeapRegion

-{

-	uint8_t *pucStartAddress;

-	size_t xSizeInBytes;

-} HeapRegion_t;

-

-/*

- * Used to define multiple heap regions for use by heap_5.c.  This function

- * must be called before any calls to pvPortMalloc() - not creating a task,

- * queue, semaphore, mutex, software timer, event group, etc. will result in

- * pvPortMalloc being called.

- *

- * pxHeapRegions passes in an array of HeapRegion_t structures - each of which

- * defines a region of memory that can be used as the heap.  The array is

- * terminated by a HeapRegions_t structure that has a size of 0.  The region

- * with the lowest start address must appear first in the array.

- */

-void vPortDefineHeapRegions( const HeapRegion_t * const pxHeapRegions ) PRIVILEGED_FUNCTION;

-

-

-/*

- * Map to the memory management routines required for the port.

- */

-void *pvPortMalloc( size_t xSize ) PRIVILEGED_FUNCTION;

-void vPortFree( void *pv ) PRIVILEGED_FUNCTION;

-void vPortInitialiseBlocks( void ) PRIVILEGED_FUNCTION;

-size_t xPortGetFreeHeapSize( void ) PRIVILEGED_FUNCTION;

-size_t xPortGetMinimumEverFreeHeapSize( void ) PRIVILEGED_FUNCTION;

-

-/*

- * Setup the hardware ready for the scheduler to take control.  This generally

- * sets up a tick interrupt and sets timers for the correct tick frequency.

- */

-BaseType_t xPortStartScheduler( void ) PRIVILEGED_FUNCTION;

-

-/*

- * Undo any hardware/ISR setup that was performed by xPortStartScheduler() so

- * the hardware is left in its original condition after the scheduler stops

- * executing.

- */

-void vPortEndScheduler( void ) PRIVILEGED_FUNCTION;

-

-/*

- * The structures and methods of manipulating the MPU are contained within the

- * port layer.

- *

- * Fills the xMPUSettings structure with the memory region information

- * contained in xRegions.

- */

-#if( portUSING_MPU_WRAPPERS == 1 )

-	struct xMEMORY_REGION;

-	void vPortStoreTaskMPUSettings( xMPU_SETTINGS *xMPUSettings, const struct xMEMORY_REGION * const xRegions, StackType_t *pxBottomOfStack, uint16_t usStackDepth ) PRIVILEGED_FUNCTION;

-#endif

-

-#ifdef __cplusplus

-}

-#endif

-

-#endif /* PORTABLE_H */

-

diff --git a/FreeRTOS/Demo/Xilinx_FreeRTOS_BSP/repo/bsp/freertos822_xilinx_v1_0/src/Source/include/projdefs.h b/FreeRTOS/Demo/Xilinx_FreeRTOS_BSP/repo/bsp/freertos822_xilinx_v1_0/src/Source/include/projdefs.h
deleted file mode 100644
index 115d356..0000000
--- a/FreeRTOS/Demo/Xilinx_FreeRTOS_BSP/repo/bsp/freertos822_xilinx_v1_0/src/Source/include/projdefs.h
+++ /dev/null
@@ -1,156 +0,0 @@
-/*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

-    All rights reserved

-

-    VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

-

-    This file is part of the FreeRTOS distribution.

-

-    FreeRTOS is free software; you can redistribute it and/or modify it under

-    the terms of the GNU General Public License (version 2) as published by the

-    Free Software Foundation >>!AND MODIFIED BY!<< the FreeRTOS exception.

-

-    ***************************************************************************

-    >>!   NOTE: The modification to the GPL is included to allow you to     !<<

-    >>!   distribute a combined work that includes FreeRTOS without being   !<<

-    >>!   obliged to provide the source code for proprietary components     !<<

-    >>!   outside of the FreeRTOS kernel.                                   !<<

-    ***************************************************************************

-

-    FreeRTOS is distributed in the hope that it will be useful, but WITHOUT ANY

-    WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS

-    FOR A PARTICULAR PURPOSE.  Full license text is available on the following

-    link: http://www.freertos.org/a00114.html

-

-    ***************************************************************************

-     *                                                                       *

-     *    FreeRTOS provides completely free yet professionally developed,    *

-     *    robust, strictly quality controlled, supported, and cross          *

-     *    platform software that is more than just the market leader, it     *

-     *    is the industry's de facto standard.                               *

-     *                                                                       *

-     *    Help yourself get started quickly while simultaneously helping     *

-     *    to support the FreeRTOS project by purchasing a FreeRTOS           *

-     *    tutorial book, reference manual, or both:                          *

-     *    http://www.FreeRTOS.org/Documentation                              *

-     *                                                                       *

-    ***************************************************************************

-

-    http://www.FreeRTOS.org/FAQHelp.html - Having a problem?  Start by reading

-    the FAQ page "My application does not run, what could be wrong?".  Have you

-    defined configASSERT()?

-

-    http://www.FreeRTOS.org/support - In return for receiving this top quality

-    embedded software for free we request you assist our global community by

-    participating in the support forum.

-

-    http://www.FreeRTOS.org/training - Investing in training allows your team to

-    be as productive as possible as early as possible.  Now you can receive

-    FreeRTOS training directly from Richard Barry, CEO of Real Time Engineers

-    Ltd, and the world's leading authority on the world's leading RTOS.

-

-    http://www.FreeRTOS.org/plus - A selection of FreeRTOS ecosystem products,

-    including FreeRTOS+Trace - an indispensable productivity tool, a DOS

-    compatible FAT file system, and our tiny thread aware UDP/IP stack.

-

-    http://www.FreeRTOS.org/labs - Where new FreeRTOS products go to incubate.

-    Come and try FreeRTOS+TCP, our new open source TCP/IP stack for FreeRTOS.

-

-    http://www.OpenRTOS.com - Real Time Engineers ltd. license FreeRTOS to High

-    Integrity Systems ltd. to sell under the OpenRTOS brand.  Low cost OpenRTOS

-    licenses offer ticketed support, indemnification and commercial middleware.

-

-    http://www.SafeRTOS.com - High Integrity Systems also provide a safety

-    engineered and independently SIL3 certified version for use in safety and

-    mission critical applications that require provable dependability.

-

-    1 tab == 4 spaces!

-*/

-

-#ifndef PROJDEFS_H

-#define PROJDEFS_H

-

-/*

- * Defines the prototype to which task functions must conform.  Defined in this

- * file to ensure the type is known before portable.h is included.

- */

-typedef void (*TaskFunction_t)( void * );

-

-/* Converts a time in milliseconds to a time in ticks. */

-#define pdMS_TO_TICKS( xTimeInMs ) ( ( TickType_t ) ( ( ( TickType_t ) ( xTimeInMs ) * ( TickType_t ) configTICK_RATE_HZ ) / ( TickType_t ) 1000 ) )

-

-#define pdFALSE			( ( BaseType_t ) 0 )

-#define pdTRUE			( ( BaseType_t ) 1 )

-

-#define pdPASS			( pdTRUE )

-#define pdFAIL			( pdFALSE )

-#define errQUEUE_EMPTY	( ( BaseType_t ) 0 )

-#define errQUEUE_FULL	( ( BaseType_t ) 0 )

-

-/* FreeRTOS error definitions. */

-#define errCOULD_NOT_ALLOCATE_REQUIRED_MEMORY	( -1 )

-#define errQUEUE_BLOCKED						( -4 )

-#define errQUEUE_YIELD							( -5 )

-

-/* Macros used for basic data corruption checks. */

-#ifndef configUSE_LIST_DATA_INTEGRITY_CHECK_BYTES

-	#define configUSE_LIST_DATA_INTEGRITY_CHECK_BYTES 0

-#endif

-

-#if( configUSE_16_BIT_TICKS == 1 )

-	#define pdINTEGRITY_CHECK_VALUE 0x5a5a

-#else

-	#define pdINTEGRITY_CHECK_VALUE 0x5a5a5a5aUL

-#endif

-

-/* The following errno values are used by FreeRTOS+ components, not FreeRTOS

-itself. */

-#define pdFREERTOS_ERRNO_NONE			0	/* No errors */

-#define	pdFREERTOS_ERRNO_ENOENT			2	/* No such file or directory */

-#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 /* PROJDEFS_H */

-

-

-

diff --git a/FreeRTOS/Demo/Xilinx_FreeRTOS_BSP/repo/bsp/freertos822_xilinx_v1_0/src/Source/include/queue.h b/FreeRTOS/Demo/Xilinx_FreeRTOS_BSP/repo/bsp/freertos822_xilinx_v1_0/src/Source/include/queue.h
deleted file mode 100644
index 623497a..0000000
--- a/FreeRTOS/Demo/Xilinx_FreeRTOS_BSP/repo/bsp/freertos822_xilinx_v1_0/src/Source/include/queue.h
+++ /dev/null
@@ -1,1691 +0,0 @@
-/*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

-    All rights reserved

-

-    VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

-

-    This file is part of the FreeRTOS distribution.

-

-    FreeRTOS is free software; you can redistribute it and/or modify it under

-    the terms of the GNU General Public License (version 2) as published by the

-    Free Software Foundation >>!AND MODIFIED BY!<< the FreeRTOS exception.

-

-    ***************************************************************************

-    >>!   NOTE: The modification to the GPL is included to allow you to     !<<

-    >>!   distribute a combined work that includes FreeRTOS without being   !<<

-    >>!   obliged to provide the source code for proprietary components     !<<

-    >>!   outside of the FreeRTOS kernel.                                   !<<

-    ***************************************************************************

-

-    FreeRTOS is distributed in the hope that it will be useful, but WITHOUT ANY

-    WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS

-    FOR A PARTICULAR PURPOSE.  Full license text is available on the following

-    link: http://www.freertos.org/a00114.html

-

-    ***************************************************************************

-     *                                                                       *

-     *    FreeRTOS provides completely free yet professionally developed,    *

-     *    robust, strictly quality controlled, supported, and cross          *

-     *    platform software that is more than just the market leader, it     *

-     *    is the industry's de facto standard.                               *

-     *                                                                       *

-     *    Help yourself get started quickly while simultaneously helping     *

-     *    to support the FreeRTOS project by purchasing a FreeRTOS           *

-     *    tutorial book, reference manual, or both:                          *

-     *    http://www.FreeRTOS.org/Documentation                              *

-     *                                                                       *

-    ***************************************************************************

-

-    http://www.FreeRTOS.org/FAQHelp.html - Having a problem?  Start by reading

-    the FAQ page "My application does not run, what could be wrong?".  Have you

-    defined configASSERT()?

-

-    http://www.FreeRTOS.org/support - In return for receiving this top quality

-    embedded software for free we request you assist our global community by

-    participating in the support forum.

-

-    http://www.FreeRTOS.org/training - Investing in training allows your team to

-    be as productive as possible as early as possible.  Now you can receive

-    FreeRTOS training directly from Richard Barry, CEO of Real Time Engineers

-    Ltd, and the world's leading authority on the world's leading RTOS.

-

-    http://www.FreeRTOS.org/plus - A selection of FreeRTOS ecosystem products,

-    including FreeRTOS+Trace - an indispensable productivity tool, a DOS

-    compatible FAT file system, and our tiny thread aware UDP/IP stack.

-

-    http://www.FreeRTOS.org/labs - Where new FreeRTOS products go to incubate.

-    Come and try FreeRTOS+TCP, our new open source TCP/IP stack for FreeRTOS.

-

-    http://www.OpenRTOS.com - Real Time Engineers ltd. license FreeRTOS to High

-    Integrity Systems ltd. to sell under the OpenRTOS brand.  Low cost OpenRTOS

-    licenses offer ticketed support, indemnification and commercial middleware.

-

-    http://www.SafeRTOS.com - High Integrity Systems also provide a safety

-    engineered and independently SIL3 certified version for use in safety and

-    mission critical applications that require provable dependability.

-

-    1 tab == 4 spaces!

-*/

-

-

-#ifndef QUEUE_H

-#define QUEUE_H

-

-#ifndef INC_FREERTOS_H

-	#error "include FreeRTOS.h" must appear in source files before "include queue.h"

-#endif

-

-#ifdef __cplusplus

-extern "C" {

-#endif

-

-

-/**

- * Type by which queues are referenced.  For example, a call to xQueueCreate()

- * returns an QueueHandle_t variable that can then be used as a parameter to

- * xQueueSend(), xQueueReceive(), etc.

- */

-typedef void * QueueHandle_t;

-

-/**

- * Type by which queue sets are referenced.  For example, a call to

- * xQueueCreateSet() returns an xQueueSet variable that can then be used as a

- * parameter to xQueueSelectFromSet(), xQueueAddToSet(), etc.

- */

-typedef void * QueueSetHandle_t;

-

-/**

- * Queue sets can contain both queues and semaphores, so the

- * QueueSetMemberHandle_t is defined as a type to be used where a parameter or

- * return value can be either an QueueHandle_t or an SemaphoreHandle_t.

- */

-typedef void * QueueSetMemberHandle_t;

-

-/* For internal use only. */

-#define	queueSEND_TO_BACK		( ( BaseType_t ) 0 )

-#define	queueSEND_TO_FRONT		( ( BaseType_t ) 1 )

-#define queueOVERWRITE			( ( BaseType_t ) 2 )

-

-/* For internal use only.  These definitions *must* match those in queue.c. */

-#define queueQUEUE_TYPE_BASE				( ( uint8_t ) 0U )

-#define queueQUEUE_TYPE_SET					( ( uint8_t ) 0U )

-#define queueQUEUE_TYPE_MUTEX 				( ( uint8_t ) 1U )

-#define queueQUEUE_TYPE_COUNTING_SEMAPHORE	( ( uint8_t ) 2U )

-#define queueQUEUE_TYPE_BINARY_SEMAPHORE	( ( uint8_t ) 3U )

-#define queueQUEUE_TYPE_RECURSIVE_MUTEX		( ( uint8_t ) 4U )

-

-/**

- * queue. h

- * <pre>

- QueueHandle_t xQueueCreate(

-							  UBaseType_t uxQueueLength,

-							  UBaseType_t uxItemSize

-						  );

- * </pre>

- *

- * Creates a new queue instance.  This allocates the storage required by the

- * new queue and returns a handle for the queue.

- *

- * @param uxQueueLength The maximum number of items that the queue can contain.

- *

- * @param uxItemSize The number of bytes each item in the queue will require.

- * Items are queued by copy, not by reference, so this is the number of bytes

- * that will be copied for each posted item.  Each item on the queue must be

- * the same size.

- *

- * @return If the queue is successfully create then a handle to the newly

- * created queue is returned.  If the queue cannot be created then 0 is

- * returned.

- *

- * Example usage:

-   <pre>

- struct AMessage

- {

-	char ucMessageID;

-	char ucData[ 20 ];

- };

-

- void vATask( void *pvParameters )

- {

- QueueHandle_t xQueue1, xQueue2;

-

-	// Create a queue capable of containing 10 uint32_t values.

-	xQueue1 = xQueueCreate( 10, sizeof( uint32_t ) );

-	if( xQueue1 == 0 )

-	{

-		// Queue was not created and must not be used.

-	}

-

-	// Create a queue capable of containing 10 pointers to AMessage structures.

-	// These should be passed by pointer as they contain a lot of data.

-	xQueue2 = xQueueCreate( 10, sizeof( struct AMessage * ) );

-	if( xQueue2 == 0 )

-	{

-		// Queue was not created and must not be used.

-	}

-

-	// ... Rest of task code.

- }

- </pre>

- * \defgroup xQueueCreate xQueueCreate

- * \ingroup QueueManagement

- */

-#define xQueueCreate( uxQueueLength, uxItemSize ) xQueueGenericCreate( uxQueueLength, uxItemSize, queueQUEUE_TYPE_BASE )

-

-/**

- * queue. h

- * <pre>

- BaseType_t xQueueSendToToFront(

-								   QueueHandle_t	xQueue,

-								   const void		*pvItemToQueue,

-								   TickType_t		xTicksToWait

-							   );

- * </pre>

- *

- * This is a macro that calls xQueueGenericSend().

- *

- * Post an item to the front of a queue.  The item is queued by copy, not by

- * reference.  This function must not be called from an interrupt service

- * routine.  See xQueueSendFromISR () for an alternative which may be used

- * in an ISR.

- *

- * @param xQueue The handle to the queue on which the item is to be posted.

- *

- * @param pvItemToQueue A pointer to the item that is to be placed on the

- * queue.  The size of the items the queue will hold was defined when the

- * queue was created, so this many bytes will be copied from pvItemToQueue

- * into the queue storage area.

- *

- * @param xTicksToWait The maximum amount of time the task should block

- * waiting for space to become available on the queue, should it already

- * be full.  The call will return immediately if this is set to 0 and the

- * queue is full.  The time is defined in tick periods so the constant

- * portTICK_PERIOD_MS should be used to convert to real time if this is required.

- *

- * @return pdTRUE if the item was successfully posted, otherwise errQUEUE_FULL.

- *

- * Example usage:

-   <pre>

- struct AMessage

- {

-	char ucMessageID;

-	char ucData[ 20 ];

- } xMessage;

-

- uint32_t ulVar = 10UL;

-

- void vATask( void *pvParameters )

- {

- QueueHandle_t xQueue1, xQueue2;

- struct AMessage *pxMessage;

-

-	// Create a queue capable of containing 10 uint32_t values.

-	xQueue1 = xQueueCreate( 10, sizeof( uint32_t ) );

-

-	// Create a queue capable of containing 10 pointers to AMessage structures.

-	// These should be passed by pointer as they contain a lot of data.

-	xQueue2 = xQueueCreate( 10, sizeof( struct AMessage * ) );

-

-	// ...

-

-	if( xQueue1 != 0 )

-	{

-		// Send an uint32_t.  Wait for 10 ticks for space to become

-		// available if necessary.

-		if( xQueueSendToFront( xQueue1, ( void * ) &ulVar, ( TickType_t ) 10 ) != pdPASS )

-		{

-			// Failed to post the message, even after 10 ticks.

-		}

-	}

-

-	if( xQueue2 != 0 )

-	{

-		// Send a pointer to a struct AMessage object.  Don't block if the

-		// queue is already full.

-		pxMessage = & xMessage;

-		xQueueSendToFront( xQueue2, ( void * ) &pxMessage, ( TickType_t ) 0 );

-	}

-

-	// ... Rest of task code.

- }

- </pre>

- * \defgroup xQueueSend xQueueSend

- * \ingroup QueueManagement

- */

-#define xQueueSendToFront( xQueue, pvItemToQueue, xTicksToWait ) xQueueGenericSend( ( xQueue ), ( pvItemToQueue ), ( xTicksToWait ), queueSEND_TO_FRONT )

-

-/**

- * queue. h

- * <pre>

- BaseType_t xQueueSendToBack(

-								   QueueHandle_t	xQueue,

-								   const void		*pvItemToQueue,

-								   TickType_t		xTicksToWait

-							   );

- * </pre>

- *

- * This is a macro that calls xQueueGenericSend().

- *

- * Post an item to the back of a queue.  The item is queued by copy, not by

- * reference.  This function must not be called from an interrupt service

- * routine.  See xQueueSendFromISR () for an alternative which may be used

- * in an ISR.

- *

- * @param xQueue The handle to the queue on which the item is to be posted.

- *

- * @param pvItemToQueue A pointer to the item that is to be placed on the

- * queue.  The size of the items the queue will hold was defined when the

- * queue was created, so this many bytes will be copied from pvItemToQueue

- * into the queue storage area.

- *

- * @param xTicksToWait The maximum amount of time the task should block

- * waiting for space to become available on the queue, should it already

- * be full.  The call will return immediately if this is set to 0 and the queue

- * is full.  The  time is defined in tick periods so the constant

- * portTICK_PERIOD_MS should be used to convert to real time if this is required.

- *

- * @return pdTRUE if the item was successfully posted, otherwise errQUEUE_FULL.

- *

- * Example usage:

-   <pre>

- struct AMessage

- {

-	char ucMessageID;

-	char ucData[ 20 ];

- } xMessage;

-

- uint32_t ulVar = 10UL;

-

- void vATask( void *pvParameters )

- {

- QueueHandle_t xQueue1, xQueue2;

- struct AMessage *pxMessage;

-

-	// Create a queue capable of containing 10 uint32_t values.

-	xQueue1 = xQueueCreate( 10, sizeof( uint32_t ) );

-

-	// Create a queue capable of containing 10 pointers to AMessage structures.

-	// These should be passed by pointer as they contain a lot of data.

-	xQueue2 = xQueueCreate( 10, sizeof( struct AMessage * ) );

-

-	// ...

-

-	if( xQueue1 != 0 )

-	{

-		// Send an uint32_t.  Wait for 10 ticks for space to become

-		// available if necessary.

-		if( xQueueSendToBack( xQueue1, ( void * ) &ulVar, ( TickType_t ) 10 ) != pdPASS )

-		{

-			// Failed to post the message, even after 10 ticks.

-		}

-	}

-

-	if( xQueue2 != 0 )

-	{

-		// Send a pointer to a struct AMessage object.  Don't block if the

-		// queue is already full.

-		pxMessage = & xMessage;

-		xQueueSendToBack( xQueue2, ( void * ) &pxMessage, ( TickType_t ) 0 );

-	}

-

-	// ... Rest of task code.

- }

- </pre>

- * \defgroup xQueueSend xQueueSend

- * \ingroup QueueManagement

- */

-#define xQueueSendToBack( xQueue, pvItemToQueue, xTicksToWait ) xQueueGenericSend( ( xQueue ), ( pvItemToQueue ), ( xTicksToWait ), queueSEND_TO_BACK )

-

-/**

- * queue. h

- * <pre>

- BaseType_t xQueueSend(

-							  QueueHandle_t xQueue,

-							  const void * pvItemToQueue,

-							  TickType_t xTicksToWait

-						 );

- * </pre>

- *

- * This is a macro that calls xQueueGenericSend().  It is included for

- * backward compatibility with versions of FreeRTOS.org that did not

- * include the xQueueSendToFront() and xQueueSendToBack() macros.  It is

- * equivalent to xQueueSendToBack().

- *

- * Post an item on a queue.  The item is queued by copy, not by reference.

- * This function must not be called from an interrupt service routine.

- * See xQueueSendFromISR () for an alternative which may be used in an ISR.

- *

- * @param xQueue The handle to the queue on which the item is to be posted.

- *

- * @param pvItemToQueue A pointer to the item that is to be placed on the

- * queue.  The size of the items the queue will hold was defined when the

- * queue was created, so this many bytes will be copied from pvItemToQueue

- * into the queue storage area.

- *

- * @param xTicksToWait The maximum amount of time the task should block

- * waiting for space to become available on the queue, should it already

- * be full.  The call will return immediately if this is set to 0 and the

- * queue is full.  The time is defined in tick periods so the constant

- * portTICK_PERIOD_MS should be used to convert to real time if this is required.

- *

- * @return pdTRUE if the item was successfully posted, otherwise errQUEUE_FULL.

- *

- * Example usage:

-   <pre>

- struct AMessage

- {

-	char ucMessageID;

-	char ucData[ 20 ];

- } xMessage;

-

- uint32_t ulVar = 10UL;

-

- void vATask( void *pvParameters )

- {

- QueueHandle_t xQueue1, xQueue2;

- struct AMessage *pxMessage;

-

-	// Create a queue capable of containing 10 uint32_t values.

-	xQueue1 = xQueueCreate( 10, sizeof( uint32_t ) );

-

-	// Create a queue capable of containing 10 pointers to AMessage structures.

-	// These should be passed by pointer as they contain a lot of data.

-	xQueue2 = xQueueCreate( 10, sizeof( struct AMessage * ) );

-

-	// ...

-

-	if( xQueue1 != 0 )

-	{

-		// Send an uint32_t.  Wait for 10 ticks for space to become

-		// available if necessary.

-		if( xQueueSend( xQueue1, ( void * ) &ulVar, ( TickType_t ) 10 ) != pdPASS )

-		{

-			// Failed to post the message, even after 10 ticks.

-		}

-	}

-

-	if( xQueue2 != 0 )

-	{

-		// Send a pointer to a struct AMessage object.  Don't block if the

-		// queue is already full.

-		pxMessage = & xMessage;

-		xQueueSend( xQueue2, ( void * ) &pxMessage, ( TickType_t ) 0 );

-	}

-

-	// ... Rest of task code.

- }

- </pre>

- * \defgroup xQueueSend xQueueSend

- * \ingroup QueueManagement

- */

-#define xQueueSend( xQueue, pvItemToQueue, xTicksToWait ) xQueueGenericSend( ( xQueue ), ( pvItemToQueue ), ( xTicksToWait ), queueSEND_TO_BACK )

-

-/**

- * queue. h

- * <pre>

- BaseType_t xQueueOverwrite(

-							  QueueHandle_t xQueue,

-							  const void * pvItemToQueue

-						 );

- * </pre>

- *

- * Only for use with queues that have a length of one - so the queue is either

- * empty or full.

- *

- * Post an item on a queue.  If the queue is already full then overwrite the

- * value held in the queue.  The item is queued by copy, not by reference.

- *

- * This function must not be called from an interrupt service routine.

- * See xQueueOverwriteFromISR () for an alternative which may be used in an ISR.

- *

- * @param xQueue The handle of the queue to which the data is being sent.

- *

- * @param pvItemToQueue A pointer to the item that is to be placed on the

- * queue.  The size of the items the queue will hold was defined when the

- * queue was created, so this many bytes will be copied from pvItemToQueue

- * into the queue storage area.

- *

- * @return xQueueOverwrite() is a macro that calls xQueueGenericSend(), and

- * therefore has the same return values as xQueueSendToFront().  However, pdPASS

- * is the only value that can be returned because xQueueOverwrite() will write

- * to the queue even when the queue is already full.

- *

- * Example usage:

-   <pre>

-

- void vFunction( void *pvParameters )

- {

- QueueHandle_t xQueue;

- uint32_t ulVarToSend, ulValReceived;

-

-	// Create a queue to hold one uint32_t value.  It is strongly

-	// recommended *not* to use xQueueOverwrite() on queues that can

-	// contain more than one value, and doing so will trigger an assertion

-	// if configASSERT() is defined.

-	xQueue = xQueueCreate( 1, sizeof( uint32_t ) );

-

-	// Write the value 10 to the queue using xQueueOverwrite().

-	ulVarToSend = 10;

-	xQueueOverwrite( xQueue, &ulVarToSend );

-

-	// Peeking the queue should now return 10, but leave the value 10 in

-	// the queue.  A block time of zero is used as it is known that the

-	// queue holds a value.

-	ulValReceived = 0;

-	xQueuePeek( xQueue, &ulValReceived, 0 );

-

-	if( ulValReceived != 10 )

-	{

-		// Error unless the item was removed by a different task.

-	}

-

-	// The queue is still full.  Use xQueueOverwrite() to overwrite the

-	// value held in the queue with 100.

-	ulVarToSend = 100;

-	xQueueOverwrite( xQueue, &ulVarToSend );

-

-	// This time read from the queue, leaving the queue empty once more.

-	// A block time of 0 is used again.

-	xQueueReceive( xQueue, &ulValReceived, 0 );

-

-	// The value read should be the last value written, even though the

-	// queue was already full when the value was written.

-	if( ulValReceived != 100 )

-	{

-		// Error!

-	}

-

-	// ...

-}

- </pre>

- * \defgroup xQueueOverwrite xQueueOverwrite

- * \ingroup QueueManagement

- */

-#define xQueueOverwrite( xQueue, pvItemToQueue ) xQueueGenericSend( ( xQueue ), ( pvItemToQueue ), 0, queueOVERWRITE )

-

-

-/**

- * queue. h

- * <pre>

- BaseType_t xQueueGenericSend(

-									QueueHandle_t xQueue,

-									const void * pvItemToQueue,

-									TickType_t xTicksToWait

-									BaseType_t xCopyPosition

-								);

- * </pre>

- *

- * It is preferred that the macros xQueueSend(), xQueueSendToFront() and

- * xQueueSendToBack() are used in place of calling this function directly.

- *

- * Post an item on a queue.  The item is queued by copy, not by reference.

- * This function must not be called from an interrupt service routine.

- * See xQueueSendFromISR () for an alternative which may be used in an ISR.

- *

- * @param xQueue The handle to the queue on which the item is to be posted.

- *

- * @param pvItemToQueue A pointer to the item that is to be placed on the

- * queue.  The size of the items the queue will hold was defined when the

- * queue was created, so this many bytes will be copied from pvItemToQueue

- * into the queue storage area.

- *

- * @param xTicksToWait The maximum amount of time the task should block

- * waiting for space to become available on the queue, should it already

- * be full.  The call will return immediately if this is set to 0 and the

- * queue is full.  The time is defined in tick periods so the constant

- * portTICK_PERIOD_MS should be used to convert to real time if this is required.

- *

- * @param xCopyPosition Can take the value queueSEND_TO_BACK to place the

- * item at the back of the queue, or queueSEND_TO_FRONT to place the item

- * at the front of the queue (for high priority messages).

- *

- * @return pdTRUE if the item was successfully posted, otherwise errQUEUE_FULL.

- *

- * Example usage:

-   <pre>

- struct AMessage

- {

-	char ucMessageID;

-	char ucData[ 20 ];

- } xMessage;

-

- uint32_t ulVar = 10UL;

-

- void vATask( void *pvParameters )

- {

- QueueHandle_t xQueue1, xQueue2;

- struct AMessage *pxMessage;

-

-	// Create a queue capable of containing 10 uint32_t values.

-	xQueue1 = xQueueCreate( 10, sizeof( uint32_t ) );

-

-	// Create a queue capable of containing 10 pointers to AMessage structures.

-	// These should be passed by pointer as they contain a lot of data.

-	xQueue2 = xQueueCreate( 10, sizeof( struct AMessage * ) );

-

-	// ...

-

-	if( xQueue1 != 0 )

-	{

-		// Send an uint32_t.  Wait for 10 ticks for space to become

-		// available if necessary.

-		if( xQueueGenericSend( xQueue1, ( void * ) &ulVar, ( TickType_t ) 10, queueSEND_TO_BACK ) != pdPASS )

-		{

-			// Failed to post the message, even after 10 ticks.

-		}

-	}

-

-	if( xQueue2 != 0 )

-	{

-		// Send a pointer to a struct AMessage object.  Don't block if the

-		// queue is already full.

-		pxMessage = & xMessage;

-		xQueueGenericSend( xQueue2, ( void * ) &pxMessage, ( TickType_t ) 0, queueSEND_TO_BACK );

-	}

-

-	// ... Rest of task code.

- }

- </pre>

- * \defgroup xQueueSend xQueueSend

- * \ingroup QueueManagement

- */

-BaseType_t xQueueGenericSend( QueueHandle_t xQueue, const void * const pvItemToQueue, TickType_t xTicksToWait, const BaseType_t xCopyPosition ) PRIVILEGED_FUNCTION;

-

-/**

- * queue. h

- * <pre>

- BaseType_t xQueuePeek(

-							 QueueHandle_t xQueue,

-							 void *pvBuffer,

-							 TickType_t xTicksToWait

-						 );</pre>

- *

- * This is a macro that calls the xQueueGenericReceive() function.

- *

- * Receive an item from a queue without removing the item from the queue.

- * The item is received by copy so a buffer of adequate size must be

- * provided.  The number of bytes copied into the buffer was defined when

- * the queue was created.

- *

- * Successfully received items remain on the queue so will be returned again

- * by the next call, or a call to xQueueReceive().

- *

- * This macro must not be used in an interrupt service routine.  See

- * xQueuePeekFromISR() for an alternative that can be called from an interrupt

- * service routine.

- *

- * @param xQueue The handle to the queue from which the item is to be

- * received.

- *

- * @param pvBuffer Pointer to the buffer into which the received item will

- * be copied.

- *

- * @param xTicksToWait The maximum amount of time the task should block

- * waiting for an item to receive should the queue be empty at the time

- * of the call.	 The time is defined in tick periods so the constant

- * portTICK_PERIOD_MS should be used to convert to real time if this is required.

- * xQueuePeek() will return immediately if xTicksToWait is 0 and the queue

- * is empty.

- *

- * @return pdTRUE if an item was successfully received from the queue,

- * otherwise pdFALSE.

- *

- * Example usage:

-   <pre>

- struct AMessage

- {

-	char ucMessageID;

-	char ucData[ 20 ];

- } xMessage;

-

- QueueHandle_t xQueue;

-

- // Task to create a queue and post a value.

- void vATask( void *pvParameters )

- {

- struct AMessage *pxMessage;

-

-	// Create a queue capable of containing 10 pointers to AMessage structures.

-	// These should be passed by pointer as they contain a lot of data.

-	xQueue = xQueueCreate( 10, sizeof( struct AMessage * ) );

-	if( xQueue == 0 )

-	{

-		// Failed to create the queue.

-	}

-

-	// ...

-

-	// Send a pointer to a struct AMessage object.  Don't block if the

-	// queue is already full.

-	pxMessage = & xMessage;

-	xQueueSend( xQueue, ( void * ) &pxMessage, ( TickType_t ) 0 );

-

-	// ... Rest of task code.

- }

-

- // Task to peek the data from the queue.

- void vADifferentTask( void *pvParameters )

- {

- struct AMessage *pxRxedMessage;

-

-	if( xQueue != 0 )

-	{

-		// Peek a message on the created queue.  Block for 10 ticks if a

-		// message is not immediately available.

-		if( xQueuePeek( xQueue, &( pxRxedMessage ), ( TickType_t ) 10 ) )

-		{

-			// pcRxedMessage now points to the struct AMessage variable posted

-			// by vATask, but the item still remains on the queue.

-		}

-	}

-

-	// ... Rest of task code.

- }

- </pre>

- * \defgroup xQueueReceive xQueueReceive

- * \ingroup QueueManagement

- */

-#define xQueuePeek( xQueue, pvBuffer, xTicksToWait ) xQueueGenericReceive( ( xQueue ), ( pvBuffer ), ( xTicksToWait ), pdTRUE )

-

-/**

- * queue. h

- * <pre>

- BaseType_t xQueuePeekFromISR(

-									QueueHandle_t xQueue,

-									void *pvBuffer,

-								);</pre>

- *

- * A version of xQueuePeek() that can be called from an interrupt service

- * routine (ISR).

- *

- * Receive an item from a queue without removing the item from the queue.

- * The item is received by copy so a buffer of adequate size must be

- * provided.  The number of bytes copied into the buffer was defined when

- * the queue was created.

- *

- * Successfully received items remain on the queue so will be returned again

- * by the next call, or a call to xQueueReceive().

- *

- * @param xQueue The handle to the queue from which the item is to be

- * received.

- *

- * @param pvBuffer Pointer to the buffer into which the received item will

- * be copied.

- *

- * @return pdTRUE if an item was successfully received from the queue,

- * otherwise pdFALSE.

- *

- * \defgroup xQueuePeekFromISR xQueuePeekFromISR

- * \ingroup QueueManagement

- */

-BaseType_t xQueuePeekFromISR( QueueHandle_t xQueue, void * const pvBuffer ) PRIVILEGED_FUNCTION;

-

-/**

- * queue. h

- * <pre>

- BaseType_t xQueueReceive(

-								 QueueHandle_t xQueue,

-								 void *pvBuffer,

-								 TickType_t xTicksToWait

-							);</pre>

- *

- * This is a macro that calls the xQueueGenericReceive() function.

- *

- * Receive an item from a queue.  The item is received by copy so a buffer of

- * adequate size must be provided.  The number of bytes copied into the buffer

- * was defined when the queue was created.

- *

- * Successfully received items are removed from the queue.

- *

- * This function must not be used in an interrupt service routine.  See

- * xQueueReceiveFromISR for an alternative that can.

- *

- * @param xQueue The handle to the queue from which the item is to be

- * received.

- *

- * @param pvBuffer Pointer to the buffer into which the received item will

- * be copied.

- *

- * @param xTicksToWait The maximum amount of time the task should block

- * waiting for an item to receive should the queue be empty at the time

- * of the call.	 xQueueReceive() will return immediately if xTicksToWait

- * is zero and the queue is empty.  The time is defined in tick periods so the

- * constant portTICK_PERIOD_MS should be used to convert to real time if this is

- * required.

- *

- * @return pdTRUE if an item was successfully received from the queue,

- * otherwise pdFALSE.

- *

- * Example usage:

-   <pre>

- struct AMessage

- {

-	char ucMessageID;

-	char ucData[ 20 ];

- } xMessage;

-

- QueueHandle_t xQueue;

-

- // Task to create a queue and post a value.

- void vATask( void *pvParameters )

- {

- struct AMessage *pxMessage;

-

-	// Create a queue capable of containing 10 pointers to AMessage structures.

-	// These should be passed by pointer as they contain a lot of data.

-	xQueue = xQueueCreate( 10, sizeof( struct AMessage * ) );

-	if( xQueue == 0 )

-	{

-		// Failed to create the queue.

-	}

-

-	// ...

-

-	// Send a pointer to a struct AMessage object.  Don't block if the

-	// queue is already full.

-	pxMessage = & xMessage;

-	xQueueSend( xQueue, ( void * ) &pxMessage, ( TickType_t ) 0 );

-

-	// ... Rest of task code.

- }

-

- // Task to receive from the queue.

- void vADifferentTask( void *pvParameters )

- {

- struct AMessage *pxRxedMessage;

-

-	if( xQueue != 0 )

-	{

-		// Receive a message on the created queue.  Block for 10 ticks if a

-		// message is not immediately available.

-		if( xQueueReceive( xQueue, &( pxRxedMessage ), ( TickType_t ) 10 ) )

-		{

-			// pcRxedMessage now points to the struct AMessage variable posted

-			// by vATask.

-		}

-	}

-

-	// ... Rest of task code.

- }

- </pre>

- * \defgroup xQueueReceive xQueueReceive

- * \ingroup QueueManagement

- */

-#define xQueueReceive( xQueue, pvBuffer, xTicksToWait ) xQueueGenericReceive( ( xQueue ), ( pvBuffer ), ( xTicksToWait ), pdFALSE )

-

-

-/**

- * queue. h

- * <pre>

- BaseType_t xQueueGenericReceive(

-									   QueueHandle_t	xQueue,

-									   void	*pvBuffer,

-									   TickType_t	xTicksToWait

-									   BaseType_t	xJustPeek

-									);</pre>

- *

- * It is preferred that the macro xQueueReceive() be used rather than calling

- * this function directly.

- *

- * Receive an item from a queue.  The item is received by copy so a buffer of

- * adequate size must be provided.  The number of bytes copied into the buffer

- * was defined when the queue was created.

- *

- * This function must not be used in an interrupt service routine.  See

- * xQueueReceiveFromISR for an alternative that can.

- *

- * @param xQueue The handle to the queue from which the item is to be

- * received.

- *

- * @param pvBuffer Pointer to the buffer into which the received item will

- * be copied.

- *

- * @param xTicksToWait The maximum amount of time the task should block

- * waiting for an item to receive should the queue be empty at the time

- * of the call.	 The time is defined in tick periods so the constant

- * portTICK_PERIOD_MS should be used to convert to real time if this is required.

- * xQueueGenericReceive() will return immediately if the queue is empty and

- * xTicksToWait is 0.

- *

- * @param xJustPeek When set to true, the item received from the queue is not

- * actually removed from the queue - meaning a subsequent call to

- * xQueueReceive() will return the same item.  When set to false, the item

- * being received from the queue is also removed from the queue.

- *

- * @return pdTRUE if an item was successfully received from the queue,

- * otherwise pdFALSE.

- *

- * Example usage:

-   <pre>

- struct AMessage

- {

-	char ucMessageID;

-	char ucData[ 20 ];

- } xMessage;

-

- QueueHandle_t xQueue;

-

- // Task to create a queue and post a value.

- void vATask( void *pvParameters )

- {

- struct AMessage *pxMessage;

-

-	// Create a queue capable of containing 10 pointers to AMessage structures.

-	// These should be passed by pointer as they contain a lot of data.

-	xQueue = xQueueCreate( 10, sizeof( struct AMessage * ) );

-	if( xQueue == 0 )

-	{

-		// Failed to create the queue.

-	}

-

-	// ...

-

-	// Send a pointer to a struct AMessage object.  Don't block if the

-	// queue is already full.

-	pxMessage = & xMessage;

-	xQueueSend( xQueue, ( void * ) &pxMessage, ( TickType_t ) 0 );

-

-	// ... Rest of task code.

- }

-

- // Task to receive from the queue.

- void vADifferentTask( void *pvParameters )

- {

- struct AMessage *pxRxedMessage;

-

-	if( xQueue != 0 )

-	{

-		// Receive a message on the created queue.  Block for 10 ticks if a

-		// message is not immediately available.

-		if( xQueueGenericReceive( xQueue, &( pxRxedMessage ), ( TickType_t ) 10 ) )

-		{

-			// pcRxedMessage now points to the struct AMessage variable posted

-			// by vATask.

-		}

-	}

-

-	// ... Rest of task code.

- }

- </pre>

- * \defgroup xQueueReceive xQueueReceive

- * \ingroup QueueManagement

- */

-BaseType_t xQueueGenericReceive( QueueHandle_t xQueue, void * const pvBuffer, TickType_t xTicksToWait, const BaseType_t xJustPeek ) PRIVILEGED_FUNCTION;

-

-/**

- * queue. h

- * <pre>UBaseType_t uxQueueMessagesWaiting( const QueueHandle_t xQueue );</pre>

- *

- * Return the number of messages stored in a queue.

- *

- * @param xQueue A handle to the queue being queried.

- *

- * @return The number of messages available in the queue.

- *

- * \defgroup uxQueueMessagesWaiting uxQueueMessagesWaiting

- * \ingroup QueueManagement

- */

-UBaseType_t uxQueueMessagesWaiting( const QueueHandle_t xQueue ) PRIVILEGED_FUNCTION;

-

-/**

- * queue. h

- * <pre>UBaseType_t uxQueueSpacesAvailable( const QueueHandle_t xQueue );</pre>

- *

- * Return the number of free spaces available in a queue.  This is equal to the

- * number of items that can be sent to the queue before the queue becomes full

- * if no items are removed.

- *

- * @param xQueue A handle to the queue being queried.

- *

- * @return The number of spaces available in the queue.

- *

- * \defgroup uxQueueMessagesWaiting uxQueueMessagesWaiting

- * \ingroup QueueManagement

- */

-UBaseType_t uxQueueSpacesAvailable( const QueueHandle_t xQueue ) PRIVILEGED_FUNCTION;

-

-/**

- * queue. h

- * <pre>void vQueueDelete( QueueHandle_t xQueue );</pre>

- *

- * Delete a queue - freeing all the memory allocated for storing of items

- * placed on the queue.

- *

- * @param xQueue A handle to the queue to be deleted.

- *

- * \defgroup vQueueDelete vQueueDelete

- * \ingroup QueueManagement

- */

-void vQueueDelete( QueueHandle_t xQueue ) PRIVILEGED_FUNCTION;

-

-/**

- * queue. h

- * <pre>

- BaseType_t xQueueSendToFrontFromISR(

-										 QueueHandle_t xQueue,

-										 const void *pvItemToQueue,

-										 BaseType_t *pxHigherPriorityTaskWoken

-									  );

- </pre>

- *

- * This is a macro that calls xQueueGenericSendFromISR().

- *

- * Post an item to the front of a queue.  It is safe to use this macro from

- * within an interrupt service routine.

- *

- * Items are queued by copy not reference so it is preferable to only

- * queue small items, especially when called from an ISR.  In most cases

- * it would be preferable to store a pointer to the item being queued.

- *

- * @param xQueue The handle to the queue on which the item is to be posted.

- *

- * @param pvItemToQueue A pointer to the item that is to be placed on the

- * queue.  The size of the items the queue will hold was defined when the

- * queue was created, so this many bytes will be copied from pvItemToQueue

- * into the queue storage area.

- *

- * @param pxHigherPriorityTaskWoken xQueueSendToFrontFromISR() will set

- * *pxHigherPriorityTaskWoken to pdTRUE if sending to the queue caused a task

- * to unblock, and the unblocked task has a priority higher than the currently

- * running task.  If xQueueSendToFromFromISR() sets this value to pdTRUE then

- * a context switch should be requested before the interrupt is exited.

- *

- * @return pdTRUE if the data was successfully sent to the queue, otherwise

- * errQUEUE_FULL.

- *

- * Example usage for buffered IO (where the ISR can obtain more than one value

- * per call):

-   <pre>

- void vBufferISR( void )

- {

- char cIn;

- BaseType_t xHigherPrioritTaskWoken;

-

-	// We have not woken a task at the start of the ISR.

-	xHigherPriorityTaskWoken = pdFALSE;

-

-	// Loop until the buffer is empty.

-	do

-	{

-		// Obtain a byte from the buffer.

-		cIn = portINPUT_BYTE( RX_REGISTER_ADDRESS );

-

-		// Post the byte.

-		xQueueSendToFrontFromISR( xRxQueue, &cIn, &xHigherPriorityTaskWoken );

-

-	} while( portINPUT_BYTE( BUFFER_COUNT ) );

-

-	// Now the buffer is empty we can switch context if necessary.

-	if( xHigherPriorityTaskWoken )

-	{

-		taskYIELD ();

-	}

- }

- </pre>

- *

- * \defgroup xQueueSendFromISR xQueueSendFromISR

- * \ingroup QueueManagement

- */

-#define xQueueSendToFrontFromISR( xQueue, pvItemToQueue, pxHigherPriorityTaskWoken ) xQueueGenericSendFromISR( ( xQueue ), ( pvItemToQueue ), ( pxHigherPriorityTaskWoken ), queueSEND_TO_FRONT )

-

-

-/**

- * queue. h

- * <pre>

- BaseType_t xQueueSendToBackFromISR(

-										 QueueHandle_t xQueue,

-										 const void *pvItemToQueue,

-										 BaseType_t *pxHigherPriorityTaskWoken

-									  );

- </pre>

- *

- * This is a macro that calls xQueueGenericSendFromISR().

- *

- * Post an item to the back of a queue.  It is safe to use this macro from

- * within an interrupt service routine.

- *

- * Items are queued by copy not reference so it is preferable to only

- * queue small items, especially when called from an ISR.  In most cases

- * it would be preferable to store a pointer to the item being queued.

- *

- * @param xQueue The handle to the queue on which the item is to be posted.

- *

- * @param pvItemToQueue A pointer to the item that is to be placed on the

- * queue.  The size of the items the queue will hold was defined when the

- * queue was created, so this many bytes will be copied from pvItemToQueue

- * into the queue storage area.

- *

- * @param pxHigherPriorityTaskWoken xQueueSendToBackFromISR() will set

- * *pxHigherPriorityTaskWoken to pdTRUE if sending to the queue caused a task

- * to unblock, and the unblocked task has a priority higher than the currently

- * running task.  If xQueueSendToBackFromISR() sets this value to pdTRUE then

- * a context switch should be requested before the interrupt is exited.

- *

- * @return pdTRUE if the data was successfully sent to the queue, otherwise

- * errQUEUE_FULL.

- *

- * Example usage for buffered IO (where the ISR can obtain more than one value

- * per call):

-   <pre>

- void vBufferISR( void )

- {

- char cIn;

- BaseType_t xHigherPriorityTaskWoken;

-

-	// We have not woken a task at the start of the ISR.

-	xHigherPriorityTaskWoken = pdFALSE;

-

-	// Loop until the buffer is empty.

-	do

-	{

-		// Obtain a byte from the buffer.

-		cIn = portINPUT_BYTE( RX_REGISTER_ADDRESS );

-

-		// Post the byte.

-		xQueueSendToBackFromISR( xRxQueue, &cIn, &xHigherPriorityTaskWoken );

-

-	} while( portINPUT_BYTE( BUFFER_COUNT ) );

-

-	// Now the buffer is empty we can switch context if necessary.

-	if( xHigherPriorityTaskWoken )

-	{

-		taskYIELD ();

-	}

- }

- </pre>

- *

- * \defgroup xQueueSendFromISR xQueueSendFromISR

- * \ingroup QueueManagement

- */

-#define xQueueSendToBackFromISR( xQueue, pvItemToQueue, pxHigherPriorityTaskWoken ) xQueueGenericSendFromISR( ( xQueue ), ( pvItemToQueue ), ( pxHigherPriorityTaskWoken ), queueSEND_TO_BACK )

-

-/**

- * queue. h

- * <pre>

- BaseType_t xQueueOverwriteFromISR(

-							  QueueHandle_t xQueue,

-							  const void * pvItemToQueue,

-							  BaseType_t *pxHigherPriorityTaskWoken

-						 );

- * </pre>

- *

- * A version of xQueueOverwrite() that can be used in an interrupt service

- * routine (ISR).

- *

- * Only for use with queues that can hold a single item - so the queue is either

- * empty or full.

- *

- * Post an item on a queue.  If the queue is already full then overwrite the

- * value held in the queue.  The item is queued by copy, not by reference.

- *

- * @param xQueue The handle to the queue on which the item is to be posted.

- *

- * @param pvItemToQueue A pointer to the item that is to be placed on the

- * queue.  The size of the items the queue will hold was defined when the

- * queue was created, so this many bytes will be copied from pvItemToQueue

- * into the queue storage area.

- *

- * @param pxHigherPriorityTaskWoken xQueueOverwriteFromISR() will set

- * *pxHigherPriorityTaskWoken to pdTRUE if sending to the queue caused a task

- * to unblock, and the unblocked task has a priority higher than the currently

- * running task.  If xQueueOverwriteFromISR() sets this value to pdTRUE then

- * a context switch should be requested before the interrupt is exited.

- *

- * @return xQueueOverwriteFromISR() is a macro that calls

- * xQueueGenericSendFromISR(), and therefore has the same return values as

- * xQueueSendToFrontFromISR().  However, pdPASS is the only value that can be

- * returned because xQueueOverwriteFromISR() will write to the queue even when

- * the queue is already full.

- *

- * Example usage:

-   <pre>

-

- QueueHandle_t xQueue;

-

- void vFunction( void *pvParameters )

- {

- 	// Create a queue to hold one uint32_t value.  It is strongly

-	// recommended *not* to use xQueueOverwriteFromISR() on queues that can

-	// contain more than one value, and doing so will trigger an assertion

-	// if configASSERT() is defined.

-	xQueue = xQueueCreate( 1, sizeof( uint32_t ) );

-}

-

-void vAnInterruptHandler( void )

-{

-// xHigherPriorityTaskWoken must be set to pdFALSE before it is used.

-BaseType_t xHigherPriorityTaskWoken = pdFALSE;

-uint32_t ulVarToSend, ulValReceived;

-

-	// Write the value 10 to the queue using xQueueOverwriteFromISR().

-	ulVarToSend = 10;

-	xQueueOverwriteFromISR( xQueue, &ulVarToSend, &xHigherPriorityTaskWoken );

-

-	// The queue is full, but calling xQueueOverwriteFromISR() again will still

-	// pass because the value held in the queue will be overwritten with the

-	// new value.

-	ulVarToSend = 100;

-	xQueueOverwriteFromISR( xQueue, &ulVarToSend, &xHigherPriorityTaskWoken );

-

-	// Reading from the queue will now return 100.

-

-	// ...

-

-	if( xHigherPrioritytaskWoken == pdTRUE )

-	{

-		// Writing to the queue caused a task to unblock and the unblocked task

-		// has a priority higher than or equal to the priority of the currently

-		// executing task (the task this interrupt interrupted).  Perform a context

-		// switch so this interrupt returns directly to the unblocked task.

-		portYIELD_FROM_ISR(); // or portEND_SWITCHING_ISR() depending on the port.

-	}

-}

- </pre>

- * \defgroup xQueueOverwriteFromISR xQueueOverwriteFromISR

- * \ingroup QueueManagement

- */

-#define xQueueOverwriteFromISR( xQueue, pvItemToQueue, pxHigherPriorityTaskWoken ) xQueueGenericSendFromISR( ( xQueue ), ( pvItemToQueue ), ( pxHigherPriorityTaskWoken ), queueOVERWRITE )

-

-/**

- * queue. h

- * <pre>

- BaseType_t xQueueSendFromISR(

-									 QueueHandle_t xQueue,

-									 const void *pvItemToQueue,

-									 BaseType_t *pxHigherPriorityTaskWoken

-								);

- </pre>

- *

- * This is a macro that calls xQueueGenericSendFromISR().  It is included

- * for backward compatibility with versions of FreeRTOS.org that did not

- * include the xQueueSendToBackFromISR() and xQueueSendToFrontFromISR()

- * macros.

- *

- * Post an item to the back of a queue.  It is safe to use this function from

- * within an interrupt service routine.

- *

- * Items are queued by copy not reference so it is preferable to only

- * queue small items, especially when called from an ISR.  In most cases

- * it would be preferable to store a pointer to the item being queued.

- *

- * @param xQueue The handle to the queue on which the item is to be posted.

- *

- * @param pvItemToQueue A pointer to the item that is to be placed on the

- * queue.  The size of the items the queue will hold was defined when the

- * queue was created, so this many bytes will be copied from pvItemToQueue

- * into the queue storage area.

- *

- * @param pxHigherPriorityTaskWoken xQueueSendFromISR() will set

- * *pxHigherPriorityTaskWoken to pdTRUE if sending to the queue caused a task

- * to unblock, and the unblocked task has a priority higher than the currently

- * running task.  If xQueueSendFromISR() sets this value to pdTRUE then

- * a context switch should be requested before the interrupt is exited.

- *

- * @return pdTRUE if the data was successfully sent to the queue, otherwise

- * errQUEUE_FULL.

- *

- * Example usage for buffered IO (where the ISR can obtain more than one value

- * per call):

-   <pre>

- void vBufferISR( void )

- {

- char cIn;

- BaseType_t xHigherPriorityTaskWoken;

-

-	// We have not woken a task at the start of the ISR.

-	xHigherPriorityTaskWoken = pdFALSE;

-

-	// Loop until the buffer is empty.

-	do

-	{

-		// Obtain a byte from the buffer.

-		cIn = portINPUT_BYTE( RX_REGISTER_ADDRESS );

-

-		// Post the byte.

-		xQueueSendFromISR( xRxQueue, &cIn, &xHigherPriorityTaskWoken );

-

-	} while( portINPUT_BYTE( BUFFER_COUNT ) );

-

-	// Now the buffer is empty we can switch context if necessary.

-	if( xHigherPriorityTaskWoken )

-	{

-		// Actual macro used here is port specific.

-		portYIELD_FROM_ISR ();

-	}

- }

- </pre>

- *

- * \defgroup xQueueSendFromISR xQueueSendFromISR

- * \ingroup QueueManagement

- */

-#define xQueueSendFromISR( xQueue, pvItemToQueue, pxHigherPriorityTaskWoken ) xQueueGenericSendFromISR( ( xQueue ), ( pvItemToQueue ), ( pxHigherPriorityTaskWoken ), queueSEND_TO_BACK )

-

-/**

- * queue. h

- * <pre>

- BaseType_t xQueueGenericSendFromISR(

-										   QueueHandle_t		xQueue,

-										   const	void	*pvItemToQueue,

-										   BaseType_t	*pxHigherPriorityTaskWoken,

-										   BaseType_t	xCopyPosition

-									   );

- </pre>

- *

- * It is preferred that the macros xQueueSendFromISR(),

- * xQueueSendToFrontFromISR() and xQueueSendToBackFromISR() be used in place

- * of calling this function directly.  xQueueGiveFromISR() is an

- * equivalent for use by semaphores that don't actually copy any data.

- *

- * Post an item on a queue.  It is safe to use this function from within an

- * interrupt service routine.

- *

- * Items are queued by copy not reference so it is preferable to only

- * queue small items, especially when called from an ISR.  In most cases

- * it would be preferable to store a pointer to the item being queued.

- *

- * @param xQueue The handle to the queue on which the item is to be posted.

- *

- * @param pvItemToQueue A pointer to the item that is to be placed on the

- * queue.  The size of the items the queue will hold was defined when the

- * queue was created, so this many bytes will be copied from pvItemToQueue

- * into the queue storage area.

- *

- * @param pxHigherPriorityTaskWoken xQueueGenericSendFromISR() will set

- * *pxHigherPriorityTaskWoken to pdTRUE if sending to the queue caused a task

- * to unblock, and the unblocked task has a priority higher than the currently

- * running task.  If xQueueGenericSendFromISR() sets this value to pdTRUE then

- * a context switch should be requested before the interrupt is exited.

- *

- * @param xCopyPosition Can take the value queueSEND_TO_BACK to place the

- * item at the back of the queue, or queueSEND_TO_FRONT to place the item

- * at the front of the queue (for high priority messages).

- *

- * @return pdTRUE if the data was successfully sent to the queue, otherwise

- * errQUEUE_FULL.

- *

- * Example usage for buffered IO (where the ISR can obtain more than one value

- * per call):

-   <pre>

- void vBufferISR( void )

- {

- char cIn;

- BaseType_t xHigherPriorityTaskWokenByPost;

-

-	// We have not woken a task at the start of the ISR.

-	xHigherPriorityTaskWokenByPost = pdFALSE;

-

-	// Loop until the buffer is empty.

-	do

-	{

-		// Obtain a byte from the buffer.

-		cIn = portINPUT_BYTE( RX_REGISTER_ADDRESS );

-

-		// Post each byte.

-		xQueueGenericSendFromISR( xRxQueue, &cIn, &xHigherPriorityTaskWokenByPost, queueSEND_TO_BACK );

-

-	} while( portINPUT_BYTE( BUFFER_COUNT ) );

-

-	// Now the buffer is empty we can switch context if necessary.  Note that the

-	// name of the yield function required is port specific.

-	if( xHigherPriorityTaskWokenByPost )

-	{

-		taskYIELD_YIELD_FROM_ISR();

-	}

- }

- </pre>

- *

- * \defgroup xQueueSendFromISR xQueueSendFromISR

- * \ingroup QueueManagement

- */

-BaseType_t xQueueGenericSendFromISR( QueueHandle_t xQueue, const void * const pvItemToQueue, BaseType_t * const pxHigherPriorityTaskWoken, const BaseType_t xCopyPosition ) PRIVILEGED_FUNCTION;

-BaseType_t xQueueGiveFromISR( QueueHandle_t xQueue, BaseType_t * const pxHigherPriorityTaskWoken ) PRIVILEGED_FUNCTION;

-

-/**

- * queue. h

- * <pre>

- BaseType_t xQueueReceiveFromISR(

-									   QueueHandle_t	xQueue,

-									   void	*pvBuffer,

-									   BaseType_t *pxTaskWoken

-								   );

- * </pre>

- *

- * Receive an item from a queue.  It is safe to use this function from within an

- * interrupt service routine.

- *

- * @param xQueue The handle to the queue from which the item is to be

- * received.

- *

- * @param pvBuffer Pointer to the buffer into which the received item will

- * be copied.

- *

- * @param pxTaskWoken A task may be blocked waiting for space to become

- * available on the queue.  If xQueueReceiveFromISR causes such a task to

- * unblock *pxTaskWoken will get set to pdTRUE, otherwise *pxTaskWoken will

- * remain unchanged.

- *

- * @return pdTRUE if an item was successfully received from the queue,

- * otherwise pdFALSE.

- *

- * Example usage:

-   <pre>

-

- QueueHandle_t xQueue;

-

- // Function to create a queue and post some values.

- void vAFunction( void *pvParameters )

- {

- char cValueToPost;

- const TickType_t xTicksToWait = ( TickType_t )0xff;

-

-	// Create a queue capable of containing 10 characters.

-	xQueue = xQueueCreate( 10, sizeof( char ) );

-	if( xQueue == 0 )

-	{

-		// Failed to create the queue.

-	}

-

-	// ...

-

-	// Post some characters that will be used within an ISR.  If the queue

-	// is full then this task will block for xTicksToWait ticks.

-	cValueToPost = 'a';

-	xQueueSend( xQueue, ( void * ) &cValueToPost, xTicksToWait );

-	cValueToPost = 'b';

-	xQueueSend( xQueue, ( void * ) &cValueToPost, xTicksToWait );

-

-	// ... keep posting characters ... this task may block when the queue

-	// becomes full.

-

-	cValueToPost = 'c';

-	xQueueSend( xQueue, ( void * ) &cValueToPost, xTicksToWait );

- }

-

- // ISR that outputs all the characters received on the queue.

- void vISR_Routine( void )

- {

- BaseType_t xTaskWokenByReceive = pdFALSE;

- char cRxedChar;

-

-	while( xQueueReceiveFromISR( xQueue, ( void * ) &cRxedChar, &xTaskWokenByReceive) )

-	{

-		// A character was received.  Output the character now.

-		vOutputCharacter( cRxedChar );

-

-		// If removing the character from the queue woke the task that was

-		// posting onto the queue cTaskWokenByReceive will have been set to

-		// pdTRUE.  No matter how many times this loop iterates only one

-		// task will be woken.

-	}

-

-	if( cTaskWokenByPost != ( char ) pdFALSE;

-	{

-		taskYIELD ();

-	}

- }

- </pre>

- * \defgroup xQueueReceiveFromISR xQueueReceiveFromISR

- * \ingroup QueueManagement

- */

-BaseType_t xQueueReceiveFromISR( QueueHandle_t xQueue, void * const pvBuffer, BaseType_t * const pxHigherPriorityTaskWoken ) PRIVILEGED_FUNCTION;

-

-/*

- * Utilities to query queues that are safe to use from an ISR.  These utilities

- * should be used only from witin an ISR, or within a critical section.

- */

-BaseType_t xQueueIsQueueEmptyFromISR( const QueueHandle_t xQueue ) PRIVILEGED_FUNCTION;

-BaseType_t xQueueIsQueueFullFromISR( const QueueHandle_t xQueue ) PRIVILEGED_FUNCTION;

-UBaseType_t uxQueueMessagesWaitingFromISR( const QueueHandle_t xQueue ) PRIVILEGED_FUNCTION;

-

-

-/*

- * xQueueAltGenericSend() is an alternative version of xQueueGenericSend().

- * Likewise xQueueAltGenericReceive() is an alternative version of

- * xQueueGenericReceive().

- *

- * The source code that implements the alternative (Alt) API is much

- * simpler	because it executes everything from within a critical section.

- * This is	the approach taken by many other RTOSes, but FreeRTOS.org has the

- * preferred fully featured API too.  The fully featured API has more

- * complex	code that takes longer to execute, but makes much less use of

- * critical sections.  Therefore the alternative API sacrifices interrupt

- * responsiveness to gain execution speed, whereas the fully featured API

- * sacrifices execution speed to ensure better interrupt responsiveness.

- */

-BaseType_t xQueueAltGenericSend( QueueHandle_t xQueue, const void * const pvItemToQueue, TickType_t xTicksToWait, BaseType_t xCopyPosition ) PRIVILEGED_FUNCTION;

-BaseType_t xQueueAltGenericReceive( QueueHandle_t xQueue, void * const pvBuffer, TickType_t xTicksToWait, BaseType_t xJustPeeking ) PRIVILEGED_FUNCTION;

-#define xQueueAltSendToFront( xQueue, pvItemToQueue, xTicksToWait ) xQueueAltGenericSend( ( xQueue ), ( pvItemToQueue ), ( xTicksToWait ), queueSEND_TO_FRONT )

-#define xQueueAltSendToBack( xQueue, pvItemToQueue, xTicksToWait ) xQueueAltGenericSend( ( xQueue ), ( pvItemToQueue ), ( xTicksToWait ), queueSEND_TO_BACK )

-#define xQueueAltReceive( xQueue, pvBuffer, xTicksToWait ) xQueueAltGenericReceive( ( xQueue ), ( pvBuffer ), ( xTicksToWait ), pdFALSE )

-#define xQueueAltPeek( xQueue, pvBuffer, xTicksToWait ) xQueueAltGenericReceive( ( xQueue ), ( pvBuffer ), ( xTicksToWait ), pdTRUE )

-

-/*

- * The functions defined above are for passing data to and from tasks.  The

- * functions below are the equivalents for passing data to and from

- * co-routines.

- *

- * These functions are called from the co-routine macro implementation and

- * should not be called directly from application code.  Instead use the macro

- * wrappers defined within croutine.h.

- */

-BaseType_t xQueueCRSendFromISR( QueueHandle_t xQueue, const void *pvItemToQueue, BaseType_t xCoRoutinePreviouslyWoken );

-BaseType_t xQueueCRReceiveFromISR( QueueHandle_t xQueue, void *pvBuffer, BaseType_t *pxTaskWoken );

-BaseType_t xQueueCRSend( QueueHandle_t xQueue, const void *pvItemToQueue, TickType_t xTicksToWait );

-BaseType_t xQueueCRReceive( QueueHandle_t xQueue, void *pvBuffer, TickType_t xTicksToWait );

-

-/*

- * For internal use only.  Use xSemaphoreCreateMutex(),

- * xSemaphoreCreateCounting() or xSemaphoreGetMutexHolder() instead of calling

- * these functions directly.

- */

-QueueHandle_t xQueueCreateMutex( const uint8_t ucQueueType ) PRIVILEGED_FUNCTION;

-QueueHandle_t xQueueCreateCountingSemaphore( const UBaseType_t uxMaxCount, const UBaseType_t uxInitialCount ) PRIVILEGED_FUNCTION;

-void* xQueueGetMutexHolder( QueueHandle_t xSemaphore ) PRIVILEGED_FUNCTION;

-

-/*

- * For internal use only.  Use xSemaphoreTakeMutexRecursive() or

- * xSemaphoreGiveMutexRecursive() instead of calling these functions directly.

- */

-BaseType_t xQueueTakeMutexRecursive( QueueHandle_t xMutex, TickType_t xTicksToWait ) PRIVILEGED_FUNCTION;

-BaseType_t xQueueGiveMutexRecursive( QueueHandle_t pxMutex ) PRIVILEGED_FUNCTION;

-

-/*

- * Reset a queue back to its original empty state.  The return value is now

- * obsolete and is always set to pdPASS.

- */

-#define xQueueReset( xQueue ) xQueueGenericReset( xQueue, pdFALSE )

-

-/*

- * The registry is provided as a means for kernel aware debuggers to

- * locate queues, semaphores and mutexes.  Call vQueueAddToRegistry() add

- * a queue, semaphore or mutex handle to the registry if you want the handle

- * to be available to a kernel aware debugger.  If you are not using a kernel

- * aware debugger then this function can be ignored.

- *

- * configQUEUE_REGISTRY_SIZE defines the maximum number of handles the

- * registry can hold.  configQUEUE_REGISTRY_SIZE must be greater than 0

- * within FreeRTOSConfig.h for the registry to be available.  Its value

- * does not effect the number of queues, semaphores and mutexes that can be

- * created - just the number that the registry can hold.

- *

- * @param xQueue The handle of the queue being added to the registry.  This

- * is the handle returned by a call to xQueueCreate().  Semaphore and mutex

- * handles can also be passed in here.

- *

- * @param pcName The name to be associated with the handle.  This is the

- * name that the kernel aware debugger will display.  The queue registry only

- * stores a pointer to the string - so the string must be persistent (global or

- * preferably in ROM/Flash), not on the stack.

- */

-#if configQUEUE_REGISTRY_SIZE > 0

-	void vQueueAddToRegistry( QueueHandle_t xQueue, const char *pcName ) PRIVILEGED_FUNCTION; /*lint !e971 Unqualified char types are allowed for strings and single characters only. */

-#endif

-

-/*

- * The registry is provided as a means for kernel aware debuggers to

- * locate queues, semaphores and mutexes.  Call vQueueAddToRegistry() add

- * a queue, semaphore or mutex handle to the registry if you want the handle

- * to be available to a kernel aware debugger, and vQueueUnregisterQueue() to

- * remove the queue, semaphore or mutex from the register.  If you are not using

- * a kernel aware debugger then this function can be ignored.

- *

- * @param xQueue The handle of the queue being removed from the registry.

- */

-#if configQUEUE_REGISTRY_SIZE > 0

-	void vQueueUnregisterQueue( QueueHandle_t xQueue ) PRIVILEGED_FUNCTION;

-#endif

-

-/*

- * Generic version of the queue creation function, which is in turn called by

- * any queue, semaphore or mutex creation function or macro.

- */

-QueueHandle_t xQueueGenericCreate( const UBaseType_t uxQueueLength, const UBaseType_t uxItemSize, const uint8_t ucQueueType ) PRIVILEGED_FUNCTION;

-

-/*

- * Queue sets provide a mechanism to allow a task to block (pend) on a read

- * operation from multiple queues or semaphores simultaneously.

- *

- * See FreeRTOS/Source/Demo/Common/Minimal/QueueSet.c for an example using this

- * function.

- *

- * A queue set must be explicitly created using a call to xQueueCreateSet()

- * before it can be used.  Once created, standard FreeRTOS queues and semaphores

- * can be added to the set using calls to xQueueAddToSet().

- * xQueueSelectFromSet() is then used to determine which, if any, of the queues

- * or semaphores contained in the set is in a state where a queue read or

- * semaphore take operation would be successful.

- *

- * Note 1:  See the documentation on http://wwwFreeRTOS.org/RTOS-queue-sets.html

- * for reasons why queue sets are very rarely needed in practice as there are

- * simpler methods of blocking on multiple objects.

- *

- * Note 2:  Blocking on a queue set that contains a mutex will not cause the

- * mutex holder to inherit the priority of the blocked task.

- *

- * Note 3:  An additional 4 bytes of RAM is required for each space in a every

- * queue added to a queue set.  Therefore counting semaphores that have a high

- * maximum count value should not be added to a queue set.

- *

- * Note 4:  A receive (in the case of a queue) or take (in the case of a

- * semaphore) operation must not be performed on a member of a queue set unless

- * a call to xQueueSelectFromSet() has first returned a handle to that set member.

- *

- * @param uxEventQueueLength Queue sets store events that occur on

- * the queues and semaphores contained in the set.  uxEventQueueLength specifies

- * the maximum number of events that can be queued at once.  To be absolutely

- * certain that events are not lost uxEventQueueLength should be set to the

- * total sum of the length of the queues added to the set, where binary

- * semaphores and mutexes have a length of 1, and counting semaphores have a

- * length set by their maximum count value.  Examples:

- *  + If a queue set is to hold a queue of length 5, another queue of length 12,

- *    and a binary semaphore, then uxEventQueueLength should be set to

- *    (5 + 12 + 1), or 18.

- *  + If a queue set is to hold three binary semaphores then uxEventQueueLength

- *    should be set to (1 + 1 + 1 ), or 3.

- *  + If a queue set is to hold a counting semaphore that has a maximum count of

- *    5, and a counting semaphore that has a maximum count of 3, then

- *    uxEventQueueLength should be set to (5 + 3), or 8.

- *

- * @return If the queue set is created successfully then a handle to the created

- * queue set is returned.  Otherwise NULL is returned.

- */

-QueueSetHandle_t xQueueCreateSet( const UBaseType_t uxEventQueueLength ) PRIVILEGED_FUNCTION;

-

-/*

- * Adds a queue or semaphore to a queue set that was previously created by a

- * call to xQueueCreateSet().

- *

- * See FreeRTOS/Source/Demo/Common/Minimal/QueueSet.c for an example using this

- * function.

- *

- * Note 1:  A receive (in the case of a queue) or take (in the case of a

- * semaphore) operation must not be performed on a member of a queue set unless

- * a call to xQueueSelectFromSet() has first returned a handle to that set member.

- *

- * @param xQueueOrSemaphore The handle of the queue or semaphore being added to

- * the queue set (cast to an QueueSetMemberHandle_t type).

- *

- * @param xQueueSet The handle of the queue set to which the queue or semaphore

- * is being added.

- *

- * @return If the queue or semaphore was successfully added to the queue set

- * then pdPASS is returned.  If the queue could not be successfully added to the

- * queue set because it is already a member of a different queue set then pdFAIL

- * is returned.

- */

-BaseType_t xQueueAddToSet( QueueSetMemberHandle_t xQueueOrSemaphore, QueueSetHandle_t xQueueSet ) PRIVILEGED_FUNCTION;

-

-/*

- * Removes a queue or semaphore from a queue set.  A queue or semaphore can only

- * be removed from a set if the queue or semaphore is empty.

- *

- * See FreeRTOS/Source/Demo/Common/Minimal/QueueSet.c for an example using this

- * function.

- *

- * @param xQueueOrSemaphore The handle of the queue or semaphore being removed

- * from the queue set (cast to an QueueSetMemberHandle_t type).

- *

- * @param xQueueSet The handle of the queue set in which the queue or semaphore

- * is included.

- *

- * @return If the queue or semaphore was successfully removed from the queue set

- * then pdPASS is returned.  If the queue was not in the queue set, or the

- * queue (or semaphore) was not empty, then pdFAIL is returned.

- */

-BaseType_t xQueueRemoveFromSet( QueueSetMemberHandle_t xQueueOrSemaphore, QueueSetHandle_t xQueueSet ) PRIVILEGED_FUNCTION;

-

-/*

- * xQueueSelectFromSet() selects from the members of a queue set a queue or

- * semaphore that either contains data (in the case of a queue) or is available

- * to take (in the case of a semaphore).  xQueueSelectFromSet() effectively

- * allows a task to block (pend) on a read operation on all the queues and

- * semaphores in a queue set simultaneously.

- *

- * See FreeRTOS/Source/Demo/Common/Minimal/QueueSet.c for an example using this

- * function.

- *

- * Note 1:  See the documentation on http://wwwFreeRTOS.org/RTOS-queue-sets.html

- * for reasons why queue sets are very rarely needed in practice as there are

- * simpler methods of blocking on multiple objects.

- *

- * Note 2:  Blocking on a queue set that contains a mutex will not cause the

- * mutex holder to inherit the priority of the blocked task.

- *

- * Note 3:  A receive (in the case of a queue) or take (in the case of a

- * semaphore) operation must not be performed on a member of a queue set unless

- * a call to xQueueSelectFromSet() has first returned a handle to that set member.

- *

- * @param xQueueSet The queue set on which the task will (potentially) block.

- *

- * @param xTicksToWait The maximum time, in ticks, that the calling task will

- * remain in the Blocked state (with other tasks executing) to wait for a member

- * of the queue set to be ready for a successful queue read or semaphore take

- * operation.

- *

- * @return xQueueSelectFromSet() will return the handle of a queue (cast to

- * a QueueSetMemberHandle_t type) contained in the queue set that contains data,

- * or the handle of a semaphore (cast to a QueueSetMemberHandle_t type) contained

- * in the queue set that is available, or NULL if no such queue or semaphore

- * exists before before the specified block time expires.

- */

-QueueSetMemberHandle_t xQueueSelectFromSet( QueueSetHandle_t xQueueSet, const TickType_t xTicksToWait ) PRIVILEGED_FUNCTION;

-

-/*

- * A version of xQueueSelectFromSet() that can be used from an ISR.

- */

-QueueSetMemberHandle_t xQueueSelectFromSetFromISR( QueueSetHandle_t xQueueSet ) PRIVILEGED_FUNCTION;

-

-/* Not public API functions. */

-void vQueueWaitForMessageRestricted( QueueHandle_t xQueue, TickType_t xTicksToWait, const BaseType_t xWaitIndefinitely ) PRIVILEGED_FUNCTION;

-BaseType_t xQueueGenericReset( QueueHandle_t xQueue, BaseType_t xNewQueue ) PRIVILEGED_FUNCTION;

-void vQueueSetQueueNumber( QueueHandle_t xQueue, UBaseType_t uxQueueNumber ) PRIVILEGED_FUNCTION;

-UBaseType_t uxQueueGetQueueNumber( QueueHandle_t xQueue ) PRIVILEGED_FUNCTION;

-uint8_t ucQueueGetQueueType( QueueHandle_t xQueue ) PRIVILEGED_FUNCTION;

-

-

-#ifdef __cplusplus

-}

-#endif

-

-#endif /* QUEUE_H */

-

diff --git a/FreeRTOS/Demo/Xilinx_FreeRTOS_BSP/repo/bsp/freertos822_xilinx_v1_0/src/Source/include/semphr.h b/FreeRTOS/Demo/Xilinx_FreeRTOS_BSP/repo/bsp/freertos822_xilinx_v1_0/src/Source/include/semphr.h
deleted file mode 100644
index 20afb76..0000000
--- a/FreeRTOS/Demo/Xilinx_FreeRTOS_BSP/repo/bsp/freertos822_xilinx_v1_0/src/Source/include/semphr.h
+++ /dev/null
@@ -1,844 +0,0 @@
-/*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

-    All rights reserved

-

-    VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

-

-    This file is part of the FreeRTOS distribution.

-

-    FreeRTOS is free software; you can redistribute it and/or modify it under

-    the terms of the GNU General Public License (version 2) as published by the

-    Free Software Foundation >>!AND MODIFIED BY!<< the FreeRTOS exception.

-

-    ***************************************************************************

-    >>!   NOTE: The modification to the GPL is included to allow you to     !<<

-    >>!   distribute a combined work that includes FreeRTOS without being   !<<

-    >>!   obliged to provide the source code for proprietary components     !<<

-    >>!   outside of the FreeRTOS kernel.                                   !<<

-    ***************************************************************************

-

-    FreeRTOS is distributed in the hope that it will be useful, but WITHOUT ANY

-    WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS

-    FOR A PARTICULAR PURPOSE.  Full license text is available on the following

-    link: http://www.freertos.org/a00114.html

-

-    ***************************************************************************

-     *                                                                       *

-     *    FreeRTOS provides completely free yet professionally developed,    *

-     *    robust, strictly quality controlled, supported, and cross          *

-     *    platform software that is more than just the market leader, it     *

-     *    is the industry's de facto standard.                               *

-     *                                                                       *

-     *    Help yourself get started quickly while simultaneously helping     *

-     *    to support the FreeRTOS project by purchasing a FreeRTOS           *

-     *    tutorial book, reference manual, or both:                          *

-     *    http://www.FreeRTOS.org/Documentation                              *

-     *                                                                       *

-    ***************************************************************************

-

-    http://www.FreeRTOS.org/FAQHelp.html - Having a problem?  Start by reading

-    the FAQ page "My application does not run, what could be wrong?".  Have you

-    defined configASSERT()?

-

-    http://www.FreeRTOS.org/support - In return for receiving this top quality

-    embedded software for free we request you assist our global community by

-    participating in the support forum.

-

-    http://www.FreeRTOS.org/training - Investing in training allows your team to

-    be as productive as possible as early as possible.  Now you can receive

-    FreeRTOS training directly from Richard Barry, CEO of Real Time Engineers

-    Ltd, and the world's leading authority on the world's leading RTOS.

-

-    http://www.FreeRTOS.org/plus - A selection of FreeRTOS ecosystem products,

-    including FreeRTOS+Trace - an indispensable productivity tool, a DOS

-    compatible FAT file system, and our tiny thread aware UDP/IP stack.

-

-    http://www.FreeRTOS.org/labs - Where new FreeRTOS products go to incubate.

-    Come and try FreeRTOS+TCP, our new open source TCP/IP stack for FreeRTOS.

-

-    http://www.OpenRTOS.com - Real Time Engineers ltd. license FreeRTOS to High

-    Integrity Systems ltd. to sell under the OpenRTOS brand.  Low cost OpenRTOS

-    licenses offer ticketed support, indemnification and commercial middleware.

-

-    http://www.SafeRTOS.com - High Integrity Systems also provide a safety

-    engineered and independently SIL3 certified version for use in safety and

-    mission critical applications that require provable dependability.

-

-    1 tab == 4 spaces!

-*/

-

-#ifndef SEMAPHORE_H

-#define SEMAPHORE_H

-

-#ifndef INC_FREERTOS_H

-	#error "include FreeRTOS.h" must appear in source files before "include semphr.h"

-#endif

-

-#include "queue.h"

-

-typedef QueueHandle_t SemaphoreHandle_t;

-

-#define semBINARY_SEMAPHORE_QUEUE_LENGTH	( ( uint8_t ) 1U )

-#define semSEMAPHORE_QUEUE_ITEM_LENGTH		( ( uint8_t ) 0U )

-#define semGIVE_BLOCK_TIME					( ( TickType_t ) 0U )

-

-

-/**

- * semphr. h

- * <pre>vSemaphoreCreateBinary( SemaphoreHandle_t xSemaphore )</pre>

- *

- * This old vSemaphoreCreateBinary() macro is now deprecated in favour of the

- * xSemaphoreCreateBinary() function.  Note that binary semaphores created using

- * the vSemaphoreCreateBinary() macro are created in a state such that the

- * first call to 'take' the semaphore would pass, whereas binary semaphores

- * created using xSemaphoreCreateBinary() are created in a state such that the

- * the semaphore must first be 'given' before it can be 'taken'.

- *

- * <i>Macro</i> that implements a semaphore by using the existing queue mechanism.

- * The queue length is 1 as this is a binary semaphore.  The data size is 0

- * as we don't want to actually store any data - we just want to know if the

- * queue is empty or full.

- *

- * This type of semaphore can be used for pure synchronisation between tasks or

- * between an interrupt and a task.  The semaphore need not be given back once

- * obtained, so one task/interrupt can continuously 'give' the semaphore while

- * another continuously 'takes' the semaphore.  For this reason this type of

- * semaphore does not use a priority inheritance mechanism.  For an alternative

- * that does use priority inheritance see xSemaphoreCreateMutex().

- *

- * @param xSemaphore Handle to the created semaphore.  Should be of type SemaphoreHandle_t.

- *

- * Example usage:

- <pre>

- SemaphoreHandle_t xSemaphore = NULL;

-

- void vATask( void * pvParameters )

- {

-    // Semaphore cannot be used before a call to vSemaphoreCreateBinary ().

-    // This is a macro so pass the variable in directly.

-    vSemaphoreCreateBinary( xSemaphore );

-

-    if( xSemaphore != NULL )

-    {

-        // The semaphore was created successfully.

-        // The semaphore can now be used.

-    }

- }

- </pre>

- * \defgroup vSemaphoreCreateBinary vSemaphoreCreateBinary

- * \ingroup Semaphores

- */

-#define vSemaphoreCreateBinary( xSemaphore )																							\

-	{																																	\

-		( xSemaphore ) = xQueueGenericCreate( ( UBaseType_t ) 1, semSEMAPHORE_QUEUE_ITEM_LENGTH, queueQUEUE_TYPE_BINARY_SEMAPHORE );	\

-		if( ( xSemaphore ) != NULL )																									\

-		{																																\

-			( void ) xSemaphoreGive( ( xSemaphore ) );																					\

-		}																																\

-	}

-

-/**

- * semphr. h

- * <pre>SemaphoreHandle_t xSemaphoreCreateBinary( void )</pre>

- *

- * The old vSemaphoreCreateBinary() macro is now deprecated in favour of this

- * xSemaphoreCreateBinary() function.  Note that binary semaphores created using

- * the vSemaphoreCreateBinary() macro are created in a state such that the

- * first call to 'take' the semaphore would pass, whereas binary semaphores

- * created using xSemaphoreCreateBinary() are created in a state such that the

- * the semaphore must first be 'given' before it can be 'taken'.

- *

- * Function that creates a semaphore by using the existing queue mechanism.

- * The queue length is 1 as this is a binary semaphore.  The data size is 0

- * as nothing is actually stored - all that is important is whether the queue is

- * empty or full (the binary semaphore is available or not).

- *

- * This type of semaphore can be used for pure synchronisation between tasks or

- * between an interrupt and a task.  The semaphore need not be given back once

- * obtained, so one task/interrupt can continuously 'give' the semaphore while

- * another continuously 'takes' the semaphore.  For this reason this type of

- * semaphore does not use a priority inheritance mechanism.  For an alternative

- * that does use priority inheritance see xSemaphoreCreateMutex().

- *

- * @return Handle to the created semaphore.

- *

- * Example usage:

- <pre>

- SemaphoreHandle_t xSemaphore = NULL;

-

- void vATask( void * pvParameters )

- {

-    // Semaphore cannot be used before a call to vSemaphoreCreateBinary ().

-    // This is a macro so pass the variable in directly.

-    xSemaphore = xSemaphoreCreateBinary();

-

-    if( xSemaphore != NULL )

-    {

-        // The semaphore was created successfully.

-        // The semaphore can now be used.

-    }

- }

- </pre>

- * \defgroup vSemaphoreCreateBinary vSemaphoreCreateBinary

- * \ingroup Semaphores

- */

-#define xSemaphoreCreateBinary() xQueueGenericCreate( ( UBaseType_t ) 1, semSEMAPHORE_QUEUE_ITEM_LENGTH, queueQUEUE_TYPE_BINARY_SEMAPHORE )

-

-/**

- * semphr. h

- * <pre>xSemaphoreTake(

- *                   SemaphoreHandle_t xSemaphore,

- *                   TickType_t xBlockTime

- *               )</pre>

- *

- * <i>Macro</i> to obtain a semaphore.  The semaphore must have previously been

- * created with a call to vSemaphoreCreateBinary(), xSemaphoreCreateMutex() or

- * xSemaphoreCreateCounting().

- *

- * @param xSemaphore A handle to the semaphore being taken - obtained when

- * the semaphore was created.

- *

- * @param xBlockTime The time in ticks to wait for the semaphore to become

- * available.  The macro portTICK_PERIOD_MS can be used to convert this to a

- * real time.  A block time of zero can be used to poll the semaphore.  A block

- * time of portMAX_DELAY can be used to block indefinitely (provided

- * INCLUDE_vTaskSuspend is set to 1 in FreeRTOSConfig.h).

- *

- * @return pdTRUE if the semaphore was obtained.  pdFALSE

- * if xBlockTime expired without the semaphore becoming available.

- *

- * Example usage:

- <pre>

- SemaphoreHandle_t xSemaphore = NULL;

-

- // A task that creates a semaphore.

- void vATask( void * pvParameters )

- {

-    // Create the semaphore to guard a shared resource.

-    vSemaphoreCreateBinary( xSemaphore );

- }

-

- // A task that uses the semaphore.

- void vAnotherTask( void * pvParameters )

- {

-    // ... Do other things.

-

-    if( xSemaphore != NULL )

-    {

-        // See if we can obtain the semaphore.  If the semaphore is not available

-        // wait 10 ticks to see if it becomes free.

-        if( xSemaphoreTake( xSemaphore, ( TickType_t ) 10 ) == pdTRUE )

-        {

-            // We were able to obtain the semaphore and can now access the

-            // shared resource.

-

-            // ...

-

-            // We have finished accessing the shared resource.  Release the

-            // semaphore.

-            xSemaphoreGive( xSemaphore );

-        }

-        else

-        {

-            // We could not obtain the semaphore and can therefore not access

-            // the shared resource safely.

-        }

-    }

- }

- </pre>

- * \defgroup xSemaphoreTake xSemaphoreTake

- * \ingroup Semaphores

- */

-#define xSemaphoreTake( xSemaphore, xBlockTime )		xQueueGenericReceive( ( QueueHandle_t ) ( xSemaphore ), NULL, ( xBlockTime ), pdFALSE )

-

-/**

- * semphr. h

- * xSemaphoreTakeRecursive(

- *                          SemaphoreHandle_t xMutex,

- *                          TickType_t xBlockTime

- *                        )

- *

- * <i>Macro</i> to recursively obtain, or 'take', a mutex type semaphore.

- * The mutex must have previously been created using a call to

- * xSemaphoreCreateRecursiveMutex();

- *

- * configUSE_RECURSIVE_MUTEXES must be set to 1 in FreeRTOSConfig.h for this

- * macro to be available.

- *

- * This macro must not be used on mutexes created using xSemaphoreCreateMutex().

- *

- * A mutex used recursively can be 'taken' repeatedly by the owner. The mutex

- * doesn't become available again until the owner has called

- * xSemaphoreGiveRecursive() for each successful 'take' request.  For example,

- * if a task successfully 'takes' the same mutex 5 times then the mutex will

- * not be available to any other task until it has also  'given' the mutex back

- * exactly five times.

- *

- * @param xMutex A handle to the mutex being obtained.  This is the

- * handle returned by xSemaphoreCreateRecursiveMutex();

- *

- * @param xBlockTime The time in ticks to wait for the semaphore to become

- * available.  The macro portTICK_PERIOD_MS can be used to convert this to a

- * real time.  A block time of zero can be used to poll the semaphore.  If

- * the task already owns the semaphore then xSemaphoreTakeRecursive() will

- * return immediately no matter what the value of xBlockTime.

- *

- * @return pdTRUE if the semaphore was obtained.  pdFALSE if xBlockTime

- * expired without the semaphore becoming available.

- *

- * Example usage:

- <pre>

- SemaphoreHandle_t xMutex = NULL;

-

- // A task that creates a mutex.

- void vATask( void * pvParameters )

- {

-    // Create the mutex to guard a shared resource.

-    xMutex = xSemaphoreCreateRecursiveMutex();

- }

-

- // A task that uses the mutex.

- void vAnotherTask( void * pvParameters )

- {

-    // ... Do other things.

-

-    if( xMutex != NULL )

-    {

-        // See if we can obtain the mutex.  If the mutex is not available

-        // wait 10 ticks to see if it becomes free.

-        if( xSemaphoreTakeRecursive( xSemaphore, ( TickType_t ) 10 ) == pdTRUE )

-        {

-            // We were able to obtain the mutex and can now access the

-            // shared resource.

-

-            // ...

-            // For some reason due to the nature of the code further calls to

-			// xSemaphoreTakeRecursive() are made on the same mutex.  In real

-			// code these would not be just sequential calls as this would make

-			// no sense.  Instead the calls are likely to be buried inside

-			// a more complex call structure.

-            xSemaphoreTakeRecursive( xMutex, ( TickType_t ) 10 );

-            xSemaphoreTakeRecursive( xMutex, ( TickType_t ) 10 );

-

-            // The mutex has now been 'taken' three times, so will not be

-			// available to another task until it has also been given back

-			// three times.  Again it is unlikely that real code would have

-			// these calls sequentially, but instead buried in a more complex

-			// call structure.  This is just for illustrative purposes.

-            xSemaphoreGiveRecursive( xMutex );

-			xSemaphoreGiveRecursive( xMutex );

-			xSemaphoreGiveRecursive( xMutex );

-

-			// Now the mutex can be taken by other tasks.

-        }

-        else

-        {

-            // We could not obtain the mutex and can therefore not access

-            // the shared resource safely.

-        }

-    }

- }

- </pre>

- * \defgroup xSemaphoreTakeRecursive xSemaphoreTakeRecursive

- * \ingroup Semaphores

- */

-#define xSemaphoreTakeRecursive( xMutex, xBlockTime )	xQueueTakeMutexRecursive( ( xMutex ), ( xBlockTime ) )

-

-

-/*

- * xSemaphoreAltTake() is an alternative version of xSemaphoreTake().

- *

- * The source code that implements the alternative (Alt) API is much

- * simpler	because it executes everything from within a critical section.

- * This is	the approach taken by many other RTOSes, but FreeRTOS.org has the

- * preferred fully featured API too.  The fully featured API has more

- * complex	code that takes longer to execute, but makes much less use of

- * critical sections.  Therefore the alternative API sacrifices interrupt

- * responsiveness to gain execution speed, whereas the fully featured API

- * sacrifices execution speed to ensure better interrupt responsiveness.

- */

-#define xSemaphoreAltTake( xSemaphore, xBlockTime )		xQueueAltGenericReceive( ( QueueHandle_t ) ( xSemaphore ), NULL, ( xBlockTime ), pdFALSE )

-

-/**

- * semphr. h

- * <pre>xSemaphoreGive( SemaphoreHandle_t xSemaphore )</pre>

- *

- * <i>Macro</i> to release a semaphore.  The semaphore must have previously been

- * created with a call to vSemaphoreCreateBinary(), xSemaphoreCreateMutex() or

- * xSemaphoreCreateCounting(). and obtained using sSemaphoreTake().

- *

- * This macro must not be used from an ISR.  See xSemaphoreGiveFromISR () for

- * an alternative which can be used from an ISR.

- *

- * This macro must also not be used on semaphores created using

- * xSemaphoreCreateRecursiveMutex().

- *

- * @param xSemaphore A handle to the semaphore being released.  This is the

- * handle returned when the semaphore was created.

- *

- * @return pdTRUE if the semaphore was released.  pdFALSE if an error occurred.

- * Semaphores are implemented using queues.  An error can occur if there is

- * no space on the queue to post a message - indicating that the

- * semaphore was not first obtained correctly.

- *

- * Example usage:

- <pre>

- SemaphoreHandle_t xSemaphore = NULL;

-

- void vATask( void * pvParameters )

- {

-    // Create the semaphore to guard a shared resource.

-    vSemaphoreCreateBinary( xSemaphore );

-

-    if( xSemaphore != NULL )

-    {

-        if( xSemaphoreGive( xSemaphore ) != pdTRUE )

-        {

-            // We would expect this call to fail because we cannot give

-            // a semaphore without first "taking" it!

-        }

-

-        // Obtain the semaphore - don't block if the semaphore is not

-        // immediately available.

-        if( xSemaphoreTake( xSemaphore, ( TickType_t ) 0 ) )

-        {

-            // We now have the semaphore and can access the shared resource.

-

-            // ...

-

-            // We have finished accessing the shared resource so can free the

-            // semaphore.

-            if( xSemaphoreGive( xSemaphore ) != pdTRUE )

-            {

-                // We would not expect this call to fail because we must have

-                // obtained the semaphore to get here.

-            }

-        }

-    }

- }

- </pre>

- * \defgroup xSemaphoreGive xSemaphoreGive

- * \ingroup Semaphores

- */

-#define xSemaphoreGive( xSemaphore )		xQueueGenericSend( ( QueueHandle_t ) ( xSemaphore ), NULL, semGIVE_BLOCK_TIME, queueSEND_TO_BACK )

-

-/**

- * semphr. h

- * <pre>xSemaphoreGiveRecursive( SemaphoreHandle_t xMutex )</pre>

- *

- * <i>Macro</i> to recursively release, or 'give', a mutex type semaphore.

- * The mutex must have previously been created using a call to

- * xSemaphoreCreateRecursiveMutex();

- *

- * configUSE_RECURSIVE_MUTEXES must be set to 1 in FreeRTOSConfig.h for this

- * macro to be available.

- *

- * This macro must not be used on mutexes created using xSemaphoreCreateMutex().

- *

- * A mutex used recursively can be 'taken' repeatedly by the owner. The mutex

- * doesn't become available again until the owner has called

- * xSemaphoreGiveRecursive() for each successful 'take' request.  For example,

- * if a task successfully 'takes' the same mutex 5 times then the mutex will

- * not be available to any other task until it has also  'given' the mutex back

- * exactly five times.

- *

- * @param xMutex A handle to the mutex being released, or 'given'.  This is the

- * handle returned by xSemaphoreCreateMutex();

- *

- * @return pdTRUE if the semaphore was given.

- *

- * Example usage:

- <pre>

- SemaphoreHandle_t xMutex = NULL;

-

- // A task that creates a mutex.

- void vATask( void * pvParameters )

- {

-    // Create the mutex to guard a shared resource.

-    xMutex = xSemaphoreCreateRecursiveMutex();

- }

-

- // A task that uses the mutex.

- void vAnotherTask( void * pvParameters )

- {

-    // ... Do other things.

-

-    if( xMutex != NULL )

-    {

-        // See if we can obtain the mutex.  If the mutex is not available

-        // wait 10 ticks to see if it becomes free.

-        if( xSemaphoreTakeRecursive( xMutex, ( TickType_t ) 10 ) == pdTRUE )

-        {

-            // We were able to obtain the mutex and can now access the

-            // shared resource.

-

-            // ...

-            // For some reason due to the nature of the code further calls to

-			// xSemaphoreTakeRecursive() are made on the same mutex.  In real

-			// code these would not be just sequential calls as this would make

-			// no sense.  Instead the calls are likely to be buried inside

-			// a more complex call structure.

-            xSemaphoreTakeRecursive( xMutex, ( TickType_t ) 10 );

-            xSemaphoreTakeRecursive( xMutex, ( TickType_t ) 10 );

-

-            // The mutex has now been 'taken' three times, so will not be

-			// available to another task until it has also been given back

-			// three times.  Again it is unlikely that real code would have

-			// these calls sequentially, it would be more likely that the calls

-			// to xSemaphoreGiveRecursive() would be called as a call stack

-			// unwound.  This is just for demonstrative purposes.

-            xSemaphoreGiveRecursive( xMutex );

-			xSemaphoreGiveRecursive( xMutex );

-			xSemaphoreGiveRecursive( xMutex );

-

-			// Now the mutex can be taken by other tasks.

-        }

-        else

-        {

-            // We could not obtain the mutex and can therefore not access

-            // the shared resource safely.

-        }

-    }

- }

- </pre>

- * \defgroup xSemaphoreGiveRecursive xSemaphoreGiveRecursive

- * \ingroup Semaphores

- */

-#define xSemaphoreGiveRecursive( xMutex )	xQueueGiveMutexRecursive( ( xMutex ) )

-

-/*

- * xSemaphoreAltGive() is an alternative version of xSemaphoreGive().

- *

- * The source code that implements the alternative (Alt) API is much

- * simpler	because it executes everything from within a critical section.

- * This is	the approach taken by many other RTOSes, but FreeRTOS.org has the

- * preferred fully featured API too.  The fully featured API has more

- * complex	code that takes longer to execute, but makes much less use of

- * critical sections.  Therefore the alternative API sacrifices interrupt

- * responsiveness to gain execution speed, whereas the fully featured API

- * sacrifices execution speed to ensure better interrupt responsiveness.

- */

-#define xSemaphoreAltGive( xSemaphore )		xQueueAltGenericSend( ( QueueHandle_t ) ( xSemaphore ), NULL, semGIVE_BLOCK_TIME, queueSEND_TO_BACK )

-

-/**

- * semphr. h

- * <pre>

- xSemaphoreGiveFromISR(

-                          SemaphoreHandle_t xSemaphore,

-                          BaseType_t *pxHigherPriorityTaskWoken

-                      )</pre>

- *

- * <i>Macro</i> to  release a semaphore.  The semaphore must have previously been

- * created with a call to vSemaphoreCreateBinary() or xSemaphoreCreateCounting().

- *

- * Mutex type semaphores (those created using a call to xSemaphoreCreateMutex())

- * must not be used with this macro.

- *

- * This macro can be used from an ISR.

- *

- * @param xSemaphore A handle to the semaphore being released.  This is the

- * handle returned when the semaphore was created.

- *

- * @param pxHigherPriorityTaskWoken xSemaphoreGiveFromISR() will set

- * *pxHigherPriorityTaskWoken to pdTRUE if giving the semaphore caused a task

- * to unblock, and the unblocked task has a priority higher than the currently

- * running task.  If xSemaphoreGiveFromISR() sets this value to pdTRUE then

- * a context switch should be requested before the interrupt is exited.

- *

- * @return pdTRUE if the semaphore was successfully given, otherwise errQUEUE_FULL.

- *

- * Example usage:

- <pre>

- \#define LONG_TIME 0xffff

- \#define TICKS_TO_WAIT	10

- SemaphoreHandle_t xSemaphore = NULL;

-

- // Repetitive task.

- void vATask( void * pvParameters )

- {

-    for( ;; )

-    {

-        // We want this task to run every 10 ticks of a timer.  The semaphore

-        // was created before this task was started.

-

-        // Block waiting for the semaphore to become available.

-        if( xSemaphoreTake( xSemaphore, LONG_TIME ) == pdTRUE )

-        {

-            // It is time to execute.

-

-            // ...

-

-            // We have finished our task.  Return to the top of the loop where

-            // we will block on the semaphore until it is time to execute

-            // again.  Note when using the semaphore for synchronisation with an

-			// ISR in this manner there is no need to 'give' the semaphore back.

-        }

-    }

- }

-

- // Timer ISR

- void vTimerISR( void * pvParameters )

- {

- static uint8_t ucLocalTickCount = 0;

- static BaseType_t xHigherPriorityTaskWoken;

-

-    // A timer tick has occurred.

-

-    // ... Do other time functions.

-

-    // Is it time for vATask () to run?

-	xHigherPriorityTaskWoken = pdFALSE;

-    ucLocalTickCount++;

-    if( ucLocalTickCount >= TICKS_TO_WAIT )

-    {

-        // Unblock the task by releasing the semaphore.

-        xSemaphoreGiveFromISR( xSemaphore, &xHigherPriorityTaskWoken );

-

-        // Reset the count so we release the semaphore again in 10 ticks time.

-        ucLocalTickCount = 0;

-    }

-

-    if( xHigherPriorityTaskWoken != pdFALSE )

-    {

-        // We can force a context switch here.  Context switching from an

-        // ISR uses port specific syntax.  Check the demo task for your port

-        // to find the syntax required.

-    }

- }

- </pre>

- * \defgroup xSemaphoreGiveFromISR xSemaphoreGiveFromISR

- * \ingroup Semaphores

- */

-#define xSemaphoreGiveFromISR( xSemaphore, pxHigherPriorityTaskWoken )	xQueueGiveFromISR( ( QueueHandle_t ) ( xSemaphore ), ( pxHigherPriorityTaskWoken ) )

-

-/**

- * semphr. h

- * <pre>

- xSemaphoreTakeFromISR(

-                          SemaphoreHandle_t xSemaphore,

-                          BaseType_t *pxHigherPriorityTaskWoken

-                      )</pre>

- *

- * <i>Macro</i> to  take a semaphore from an ISR.  The semaphore must have

- * previously been created with a call to vSemaphoreCreateBinary() or

- * xSemaphoreCreateCounting().

- *

- * Mutex type semaphores (those created using a call to xSemaphoreCreateMutex())

- * must not be used with this macro.

- *

- * This macro can be used from an ISR, however taking a semaphore from an ISR

- * is not a common operation.  It is likely to only be useful when taking a

- * counting semaphore when an interrupt is obtaining an object from a resource

- * pool (when the semaphore count indicates the number of resources available).

- *

- * @param xSemaphore A handle to the semaphore being taken.  This is the

- * handle returned when the semaphore was created.

- *

- * @param pxHigherPriorityTaskWoken xSemaphoreTakeFromISR() will set

- * *pxHigherPriorityTaskWoken to pdTRUE if taking the semaphore caused a task

- * to unblock, and the unblocked task has a priority higher than the currently

- * running task.  If xSemaphoreTakeFromISR() sets this value to pdTRUE then

- * a context switch should be requested before the interrupt is exited.

- *

- * @return pdTRUE if the semaphore was successfully taken, otherwise

- * pdFALSE

- */

-#define xSemaphoreTakeFromISR( xSemaphore, pxHigherPriorityTaskWoken )	xQueueReceiveFromISR( ( QueueHandle_t ) ( xSemaphore ), NULL, ( pxHigherPriorityTaskWoken ) )

-

-/**

- * semphr. h

- * <pre>SemaphoreHandle_t xSemaphoreCreateMutex( void )</pre>

- *

- * <i>Macro</i> that implements a mutex semaphore by using the existing queue

- * mechanism.

- *

- * Mutexes created using this macro can be accessed using the xSemaphoreTake()

- * and xSemaphoreGive() macros.  The xSemaphoreTakeRecursive() and

- * xSemaphoreGiveRecursive() macros should not be used.

- *

- * This type of semaphore uses a priority inheritance mechanism so a task

- * 'taking' a semaphore MUST ALWAYS 'give' the semaphore back once the

- * semaphore it is no longer required.

- *

- * Mutex type semaphores cannot be used from within interrupt service routines.

- *

- * See vSemaphoreCreateBinary() for an alternative implementation that can be

- * used for pure synchronisation (where one task or interrupt always 'gives' the

- * semaphore and another always 'takes' the semaphore) and from within interrupt

- * service routines.

- *

- * @return xSemaphore Handle to the created mutex semaphore.  Should be of type

- *		SemaphoreHandle_t.

- *

- * Example usage:

- <pre>

- SemaphoreHandle_t xSemaphore;

-

- void vATask( void * pvParameters )

- {

-    // Semaphore cannot be used before a call to xSemaphoreCreateMutex().

-    // This is a macro so pass the variable in directly.

-    xSemaphore = xSemaphoreCreateMutex();

-

-    if( xSemaphore != NULL )

-    {

-        // The semaphore was created successfully.

-        // The semaphore can now be used.

-    }

- }

- </pre>

- * \defgroup vSemaphoreCreateMutex vSemaphoreCreateMutex

- * \ingroup Semaphores

- */

-#define xSemaphoreCreateMutex() xQueueCreateMutex( queueQUEUE_TYPE_MUTEX )

-

-

-/**

- * semphr. h

- * <pre>SemaphoreHandle_t xSemaphoreCreateRecursiveMutex( void )</pre>

- *

- * <i>Macro</i> that implements a recursive mutex by using the existing queue

- * mechanism.

- *

- * Mutexes created using this macro can be accessed using the

- * xSemaphoreTakeRecursive() and xSemaphoreGiveRecursive() macros.  The

- * xSemaphoreTake() and xSemaphoreGive() macros should not be used.

- *

- * A mutex used recursively can be 'taken' repeatedly by the owner. The mutex

- * doesn't become available again until the owner has called

- * xSemaphoreGiveRecursive() for each successful 'take' request.  For example,

- * if a task successfully 'takes' the same mutex 5 times then the mutex will

- * not be available to any other task until it has also  'given' the mutex back

- * exactly five times.

- *

- * This type of semaphore uses a priority inheritance mechanism so a task

- * 'taking' a semaphore MUST ALWAYS 'give' the semaphore back once the

- * semaphore it is no longer required.

- *

- * Mutex type semaphores cannot be used from within interrupt service routines.

- *

- * See vSemaphoreCreateBinary() for an alternative implementation that can be

- * used for pure synchronisation (where one task or interrupt always 'gives' the

- * semaphore and another always 'takes' the semaphore) and from within interrupt

- * service routines.

- *

- * @return xSemaphore Handle to the created mutex semaphore.  Should be of type

- *		SemaphoreHandle_t.

- *

- * Example usage:

- <pre>

- SemaphoreHandle_t xSemaphore;

-

- void vATask( void * pvParameters )

- {

-    // Semaphore cannot be used before a call to xSemaphoreCreateMutex().

-    // This is a macro so pass the variable in directly.

-    xSemaphore = xSemaphoreCreateRecursiveMutex();

-

-    if( xSemaphore != NULL )

-    {

-        // The semaphore was created successfully.

-        // The semaphore can now be used.

-    }

- }

- </pre>

- * \defgroup vSemaphoreCreateMutex vSemaphoreCreateMutex

- * \ingroup Semaphores

- */

-#define xSemaphoreCreateRecursiveMutex() xQueueCreateMutex( queueQUEUE_TYPE_RECURSIVE_MUTEX )

-

-/**

- * semphr. h

- * <pre>SemaphoreHandle_t xSemaphoreCreateCounting( UBaseType_t uxMaxCount, UBaseType_t uxInitialCount )</pre>

- *

- * <i>Macro</i> that creates a counting semaphore by using the existing

- * queue mechanism.

- *

- * Counting semaphores are typically used for two things:

- *

- * 1) Counting events.

- *

- *    In this usage scenario an event handler will 'give' a semaphore each time

- *    an event occurs (incrementing the semaphore count value), and a handler

- *    task will 'take' a semaphore each time it processes an event

- *    (decrementing the semaphore count value).  The count value is therefore

- *    the difference between the number of events that have occurred and the

- *    number that have been processed.  In this case it is desirable for the

- *    initial count value to be zero.

- *

- * 2) Resource management.

- *

- *    In this usage scenario the count value indicates the number of resources

- *    available.  To obtain control of a resource a task must first obtain a

- *    semaphore - decrementing the semaphore count value.  When the count value

- *    reaches zero there are no free resources.  When a task finishes with the

- *    resource it 'gives' the semaphore back - incrementing the semaphore count

- *    value.  In this case it is desirable for the initial count value to be

- *    equal to the maximum count value, indicating that all resources are free.

- *

- * @param uxMaxCount The maximum count value that can be reached.  When the

- *        semaphore reaches this value it can no longer be 'given'.

- *

- * @param uxInitialCount The count value assigned to the semaphore when it is

- *        created.

- *

- * @return Handle to the created semaphore.  Null if the semaphore could not be

- *         created.

- *

- * Example usage:

- <pre>

- SemaphoreHandle_t xSemaphore;

-

- void vATask( void * pvParameters )

- {

- SemaphoreHandle_t xSemaphore = NULL;

-

-    // Semaphore cannot be used before a call to xSemaphoreCreateCounting().

-    // The max value to which the semaphore can count should be 10, and the

-    // initial value assigned to the count should be 0.

-    xSemaphore = xSemaphoreCreateCounting( 10, 0 );

-

-    if( xSemaphore != NULL )

-    {

-        // The semaphore was created successfully.

-        // The semaphore can now be used.

-    }

- }

- </pre>

- * \defgroup xSemaphoreCreateCounting xSemaphoreCreateCounting

- * \ingroup Semaphores

- */

-#define xSemaphoreCreateCounting( uxMaxCount, uxInitialCount ) xQueueCreateCountingSemaphore( ( uxMaxCount ), ( uxInitialCount ) )

-

-/**

- * semphr. h

- * <pre>void vSemaphoreDelete( SemaphoreHandle_t xSemaphore );</pre>

- *

- * Delete a semaphore.  This function must be used with care.  For example,

- * do not delete a mutex type semaphore if the mutex is held by a task.

- *

- * @param xSemaphore A handle to the semaphore to be deleted.

- *

- * \defgroup vSemaphoreDelete vSemaphoreDelete

- * \ingroup Semaphores

- */

-#define vSemaphoreDelete( xSemaphore ) vQueueDelete( ( QueueHandle_t ) ( xSemaphore ) )

-

-/**

- * semphr.h

- * <pre>TaskHandle_t xSemaphoreGetMutexHolder( SemaphoreHandle_t xMutex );</pre>

- *

- * If xMutex is indeed a mutex type semaphore, return the current mutex holder.

- * If xMutex is not a mutex type semaphore, or the mutex is available (not held

- * by a task), return NULL.

- *

- * Note: This is a good way of determining if the calling task is the mutex

- * holder, but not a good way of determining the identity of the mutex holder as

- * the holder may change between the function exiting and the returned value

- * being tested.

- */

-#define xSemaphoreGetMutexHolder( xSemaphore ) xQueueGetMutexHolder( ( xSemaphore ) )

-

-#endif /* SEMAPHORE_H */

-

-

diff --git a/FreeRTOS/Demo/Xilinx_FreeRTOS_BSP/repo/bsp/freertos822_xilinx_v1_0/src/Source/include/task.h b/FreeRTOS/Demo/Xilinx_FreeRTOS_BSP/repo/bsp/freertos822_xilinx_v1_0/src/Source/include/task.h
deleted file mode 100644
index 7dd9f87..0000000
--- a/FreeRTOS/Demo/Xilinx_FreeRTOS_BSP/repo/bsp/freertos822_xilinx_v1_0/src/Source/include/task.h
+++ /dev/null
@@ -1,2021 +0,0 @@
-/*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

-    All rights reserved

-

-    VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

-

-    This file is part of the FreeRTOS distribution.

-

-    FreeRTOS is free software; you can redistribute it and/or modify it under

-    the terms of the GNU General Public License (version 2) as published by the

-    Free Software Foundation >>!AND MODIFIED BY!<< the FreeRTOS exception.

-

-    ***************************************************************************

-    >>!   NOTE: The modification to the GPL is included to allow you to     !<<

-    >>!   distribute a combined work that includes FreeRTOS without being   !<<

-    >>!   obliged to provide the source code for proprietary components     !<<

-    >>!   outside of the FreeRTOS kernel.                                   !<<

-    ***************************************************************************

-

-    FreeRTOS is distributed in the hope that it will be useful, but WITHOUT ANY

-    WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS

-    FOR A PARTICULAR PURPOSE.  Full license text is available on the following

-    link: http://www.freertos.org/a00114.html

-

-    ***************************************************************************

-     *                                                                       *

-     *    FreeRTOS provides completely free yet professionally developed,    *

-     *    robust, strictly quality controlled, supported, and cross          *

-     *    platform software that is more than just the market leader, it     *

-     *    is the industry's de facto standard.                               *

-     *                                                                       *

-     *    Help yourself get started quickly while simultaneously helping     *

-     *    to support the FreeRTOS project by purchasing a FreeRTOS           *

-     *    tutorial book, reference manual, or both:                          *

-     *    http://www.FreeRTOS.org/Documentation                              *

-     *                                                                       *

-    ***************************************************************************

-

-    http://www.FreeRTOS.org/FAQHelp.html - Having a problem?  Start by reading

-    the FAQ page "My application does not run, what could be wrong?".  Have you

-    defined configASSERT()?

-

-    http://www.FreeRTOS.org/support - In return for receiving this top quality

-    embedded software for free we request you assist our global community by

-    participating in the support forum.

-

-    http://www.FreeRTOS.org/training - Investing in training allows your team to

-    be as productive as possible as early as possible.  Now you can receive

-    FreeRTOS training directly from Richard Barry, CEO of Real Time Engineers

-    Ltd, and the world's leading authority on the world's leading RTOS.

-

-    http://www.FreeRTOS.org/plus - A selection of FreeRTOS ecosystem products,

-    including FreeRTOS+Trace - an indispensable productivity tool, a DOS

-    compatible FAT file system, and our tiny thread aware UDP/IP stack.

-

-    http://www.FreeRTOS.org/labs - Where new FreeRTOS products go to incubate.

-    Come and try FreeRTOS+TCP, our new open source TCP/IP stack for FreeRTOS.

-

-    http://www.OpenRTOS.com - Real Time Engineers ltd. license FreeRTOS to High

-    Integrity Systems ltd. to sell under the OpenRTOS brand.  Low cost OpenRTOS

-    licenses offer ticketed support, indemnification and commercial middleware.

-

-    http://www.SafeRTOS.com - High Integrity Systems also provide a safety

-    engineered and independently SIL3 certified version for use in safety and

-    mission critical applications that require provable dependability.

-

-    1 tab == 4 spaces!

-*/

-

-

-#ifndef INC_TASK_H

-#define INC_TASK_H

-

-#ifndef INC_FREERTOS_H

-	#error "include FreeRTOS.h must appear in source files before include task.h"

-#endif

-

-#include "list.h"

-

-#ifdef __cplusplus

-extern "C" {

-#endif

-

-/*-----------------------------------------------------------

- * MACROS AND DEFINITIONS

- *----------------------------------------------------------*/

-

-#define tskKERNEL_VERSION_NUMBER "V8.2.1"

-#define tskKERNEL_VERSION_MAJOR 8

-#define tskKERNEL_VERSION_MINOR 2

-#define tskKERNEL_VERSION_BUILD 1

-

-/**

- * task. h

- *

- * Type by which tasks are referenced.  For example, a call to xTaskCreate

- * returns (via a pointer parameter) an TaskHandle_t variable that can then

- * be used as a parameter to vTaskDelete to delete the task.

- *

- * \defgroup TaskHandle_t TaskHandle_t

- * \ingroup Tasks

- */

-typedef void * TaskHandle_t;

-

-/*

- * Defines the prototype to which the application task hook function must

- * conform.

- */

-typedef BaseType_t (*TaskHookFunction_t)( void * );

-

-/* Task states returned by eTaskGetState. */

-typedef enum

-{

-	eRunning = 0,	/* A task is querying the state of itself, so must be running. */

-	eReady,			/* The task being queried is in a read or pending ready list. */

-	eBlocked,		/* The task being queried is in the Blocked state. */

-	eSuspended,		/* The task being queried is in the Suspended state, or is in the Blocked state with an infinite time out. */

-	eDeleted		/* The task being queried has been deleted, but its TCB has not yet been freed. */

-} eTaskState;

-

-/* Actions that can be performed when vTaskNotify() is called. */

-typedef enum

-{

-	eNoAction = 0,				/* Notify the task without updating its notify value. */

-	eSetBits,					/* Set bits in the task's notification value. */

-	eIncrement,					/* Increment the task's notification value. */

-	eSetValueWithOverwrite,		/* Set the task's notification value to a specific value even if the previous value has not yet been read by the task. */

-	eSetValueWithoutOverwrite	/* Set the task's notification value if the previous value has been read by the task. */

-} eNotifyAction;

-

-/*

- * Used internally only.

- */

-typedef struct xTIME_OUT

-{

-	BaseType_t xOverflowCount;

-	TickType_t xTimeOnEntering;

-} TimeOut_t;

-

-/*

- * Defines the memory ranges allocated to the task when an MPU is used.

- */

-typedef struct xMEMORY_REGION

-{

-	void *pvBaseAddress;

-	uint32_t ulLengthInBytes;

-	uint32_t ulParameters;

-} MemoryRegion_t;

-

-/*

- * Parameters required to create an MPU protected task.

- */

-typedef struct xTASK_PARAMETERS

-{

-	TaskFunction_t pvTaskCode;

-	const char * const pcName;	/*lint !e971 Unqualified char types are allowed for strings and single characters only. */

-	uint16_t usStackDepth;

-	void *pvParameters;

-	UBaseType_t uxPriority;

-	StackType_t *puxStackBuffer;

-	MemoryRegion_t xRegions[ portNUM_CONFIGURABLE_REGIONS ];

-} TaskParameters_t;

-

-/* Used with the uxTaskGetSystemState() function to return the state of each task

-in the system. */

-typedef struct xTASK_STATUS

-{

-	TaskHandle_t xHandle;			/* The handle of the task to which the rest of the information in the structure relates. */

-	const char *pcTaskName;			/* A pointer to the task's name.  This value will be invalid if the task was deleted since the structure was populated! */ /*lint !e971 Unqualified char types are allowed for strings and single characters only. */

-	UBaseType_t xTaskNumber;		/* A number unique to the task. */

-	eTaskState eCurrentState;		/* The state in which the task existed when the structure was populated. */

-	UBaseType_t uxCurrentPriority;	/* The priority at which the task was running (may be inherited) when the structure was populated. */

-	UBaseType_t uxBasePriority;		/* The priority to which the task will return if the task's current priority has been inherited to avoid unbounded priority inversion when obtaining a mutex.  Only valid if configUSE_MUTEXES is defined as 1 in FreeRTOSConfig.h. */

-	uint32_t ulRunTimeCounter;		/* The total run time allocated to the task so far, as defined by the run time stats clock.  See http://www.freertos.org/rtos-run-time-stats.html.  Only valid when configGENERATE_RUN_TIME_STATS is defined as 1 in FreeRTOSConfig.h. */

-	uint16_t usStackHighWaterMark;	/* The minimum amount of stack space that has remained for the task since the task was created.  The closer this value is to zero the closer the task has come to overflowing its stack. */

-} TaskStatus_t;

-

-/* Possible return values for eTaskConfirmSleepModeStatus(). */

-typedef enum

-{

-	eAbortSleep = 0,		/* A task has been made ready or a context switch pended since portSUPPORESS_TICKS_AND_SLEEP() was called - abort entering a sleep mode. */

-	eStandardSleep,			/* Enter a sleep mode that will not last any longer than the expected idle time. */

-	eNoTasksWaitingTimeout	/* No tasks are waiting for a timeout so it is safe to enter a sleep mode that can only be exited by an external interrupt. */

-} eSleepModeStatus;

-

-

-/**

- * Defines the priority used by the idle task.  This must not be modified.

- *

- * \ingroup TaskUtils

- */

-#define tskIDLE_PRIORITY			( ( UBaseType_t ) 0U )

-

-/**

- * task. h

- *

- * Macro for forcing a context switch.

- *

- * \defgroup taskYIELD taskYIELD

- * \ingroup SchedulerControl

- */

-#define taskYIELD()					portYIELD()

-

-/**

- * task. h

- *

- * Macro to mark the start of a critical code region.  Preemptive context

- * switches cannot occur when in a critical region.

- *

- * NOTE: This may alter the stack (depending on the portable implementation)

- * so must be used with care!

- *

- * \defgroup taskENTER_CRITICAL taskENTER_CRITICAL

- * \ingroup SchedulerControl

- */

-#define taskENTER_CRITICAL()		portENTER_CRITICAL()

-#define taskENTER_CRITICAL_FROM_ISR() portSET_INTERRUPT_MASK_FROM_ISR()

-

-/**

- * task. h

- *

- * Macro to mark the end of a critical code region.  Preemptive context

- * switches cannot occur when in a critical region.

- *

- * NOTE: This may alter the stack (depending on the portable implementation)

- * so must be used with care!

- *

- * \defgroup taskEXIT_CRITICAL taskEXIT_CRITICAL

- * \ingroup SchedulerControl

- */

-#define taskEXIT_CRITICAL()			portEXIT_CRITICAL()

-#define taskEXIT_CRITICAL_FROM_ISR( x ) portCLEAR_INTERRUPT_MASK_FROM_ISR( x )

-/**

- * task. h

- *

- * Macro to disable all maskable interrupts.

- *

- * \defgroup taskDISABLE_INTERRUPTS taskDISABLE_INTERRUPTS

- * \ingroup SchedulerControl

- */

-#define taskDISABLE_INTERRUPTS()	portDISABLE_INTERRUPTS()

-

-/**

- * task. h

- *

- * Macro to enable microcontroller interrupts.

- *

- * \defgroup taskENABLE_INTERRUPTS taskENABLE_INTERRUPTS

- * \ingroup SchedulerControl

- */

-#define taskENABLE_INTERRUPTS()		portENABLE_INTERRUPTS()

-

-/* Definitions returned by xTaskGetSchedulerState().  taskSCHEDULER_SUSPENDED is

-0 to generate more optimal code when configASSERT() is defined as the constant

-is used in assert() statements. */

-#define taskSCHEDULER_SUSPENDED		( ( BaseType_t ) 0 )

-#define taskSCHEDULER_NOT_STARTED	( ( BaseType_t ) 1 )

-#define taskSCHEDULER_RUNNING		( ( BaseType_t ) 2 )

-

-

-/*-----------------------------------------------------------

- * TASK CREATION API

- *----------------------------------------------------------*/

-

-/**

- * task. h

- *<pre>

- BaseType_t xTaskCreate(

-							  TaskFunction_t pvTaskCode,

-							  const char * const pcName,

-							  uint16_t usStackDepth,

-							  void *pvParameters,

-							  UBaseType_t uxPriority,

-							  TaskHandle_t *pvCreatedTask

-						  );</pre>

- *

- * Create a new task and add it to the list of tasks that are ready to run.

- *

- * xTaskCreate() can only be used to create a task that has unrestricted

- * access to the entire microcontroller memory map.  Systems that include MPU

- * support can alternatively create an MPU constrained task using

- * xTaskCreateRestricted().

- *

- * @param pvTaskCode Pointer to the task entry function.  Tasks

- * must be implemented to never return (i.e. continuous loop).

- *

- * @param pcName A descriptive name for the task.  This is mainly used to

- * facilitate debugging.  Max length defined by configMAX_TASK_NAME_LEN - default

- * is 16.

- *

- * @param usStackDepth The size of the task stack specified as the number of

- * variables the stack can hold - not the number of bytes.  For example, if

- * the stack is 16 bits wide and usStackDepth is defined as 100, 200 bytes

- * will be allocated for stack storage.

- *

- * @param pvParameters Pointer that will be used as the parameter for the task

- * being created.

- *

- * @param uxPriority The priority at which the task should run.  Systems that

- * include MPU support can optionally create tasks in a privileged (system)

- * mode by setting bit portPRIVILEGE_BIT of the priority parameter.  For

- * example, to create a privileged task at priority 2 the uxPriority parameter

- * should be set to ( 2 | portPRIVILEGE_BIT ).

- *

- * @param pvCreatedTask Used to pass back a handle by which the created task

- * can be referenced.

- *

- * @return pdPASS if the task was successfully created and added to a ready

- * list, otherwise an error code defined in the file projdefs.h

- *

- * Example usage:

-   <pre>

- // Task to be created.

- void vTaskCode( void * pvParameters )

- {

-	 for( ;; )

-	 {

-		 // Task code goes here.

-	 }

- }

-

- // Function that creates a task.

- void vOtherFunction( void )

- {

- static uint8_t ucParameterToPass;

- TaskHandle_t xHandle = NULL;

-

-	 // Create the task, storing the handle.  Note that the passed parameter ucParameterToPass

-	 // must exist for the lifetime of the task, so in this case is declared static.  If it was just an

-	 // an automatic stack variable it might no longer exist, or at least have been corrupted, by the time

-	 // the new task attempts to access it.

-	 xTaskCreate( vTaskCode, "NAME", STACK_SIZE, &ucParameterToPass, tskIDLE_PRIORITY, &xHandle );

-     configASSERT( xHandle );

-

-	 // Use the handle to delete the task.

-     if( xHandle != NULL )

-     {

-	     vTaskDelete( xHandle );

-     }

- }

-   </pre>

- * \defgroup xTaskCreate xTaskCreate

- * \ingroup Tasks

- */

-#define xTaskCreate( pvTaskCode, pcName, usStackDepth, pvParameters, uxPriority, pxCreatedTask ) xTaskGenericCreate( ( pvTaskCode ), ( pcName ), ( usStackDepth ), ( pvParameters ), ( uxPriority ), ( pxCreatedTask ), ( NULL ), ( NULL ) )

-

-/**

- * task. h

- *<pre>

- BaseType_t xTaskCreateRestricted( TaskParameters_t *pxTaskDefinition, TaskHandle_t *pxCreatedTask );</pre>

- *

- * xTaskCreateRestricted() should only be used in systems that include an MPU

- * implementation.

- *

- * Create a new task and add it to the list of tasks that are ready to run.

- * The function parameters define the memory regions and associated access

- * permissions allocated to the task.

- *

- * @param pxTaskDefinition Pointer to a structure that contains a member

- * for each of the normal xTaskCreate() parameters (see the xTaskCreate() API

- * documentation) plus an optional stack buffer and the memory region

- * definitions.

- *

- * @param pxCreatedTask Used to pass back a handle by which the created task

- * can be referenced.

- *

- * @return pdPASS if the task was successfully created and added to a ready

- * list, otherwise an error code defined in the file projdefs.h

- *

- * Example usage:

-   <pre>

-// Create an TaskParameters_t structure that defines the task to be created.

-static const TaskParameters_t xCheckTaskParameters =

-{

-	vATask,		// pvTaskCode - the function that implements the task.

-	"ATask",	// pcName - just a text name for the task to assist debugging.

-	100,		// usStackDepth	- the stack size DEFINED IN WORDS.

-	NULL,		// pvParameters - passed into the task function as the function parameters.

-	( 1UL | portPRIVILEGE_BIT ),// uxPriority - task priority, set the portPRIVILEGE_BIT if the task should run in a privileged state.

-	cStackBuffer,// puxStackBuffer - the buffer to be used as the task stack.

-

-	// xRegions - Allocate up to three separate memory regions for access by

-	// the task, with appropriate access permissions.  Different processors have

-	// different memory alignment requirements - refer to the FreeRTOS documentation

-	// for full information.

-	{

-		// Base address					Length	Parameters

-        { cReadWriteArray,				32,		portMPU_REGION_READ_WRITE },

-        { cReadOnlyArray,				32,		portMPU_REGION_READ_ONLY },

-        { cPrivilegedOnlyAccessArray,	128,	portMPU_REGION_PRIVILEGED_READ_WRITE }

-	}

-};

-

-int main( void )

-{

-TaskHandle_t xHandle;

-

-	// Create a task from the const structure defined above.  The task handle

-	// is requested (the second parameter is not NULL) but in this case just for

-	// demonstration purposes as its not actually used.

-	xTaskCreateRestricted( &xRegTest1Parameters, &xHandle );

-

-	// Start the scheduler.

-	vTaskStartScheduler();

-

-	// Will only get here if there was insufficient memory to create the idle

-	// and/or timer task.

-	for( ;; );

-}

-   </pre>

- * \defgroup xTaskCreateRestricted xTaskCreateRestricted

- * \ingroup Tasks

- */

-#define xTaskCreateRestricted( x, pxCreatedTask ) xTaskGenericCreate( ((x)->pvTaskCode), ((x)->pcName), ((x)->usStackDepth), ((x)->pvParameters), ((x)->uxPriority), (pxCreatedTask), ((x)->puxStackBuffer), ((x)->xRegions) )

-

-/**

- * task. h

- *<pre>

- void vTaskAllocateMPURegions( TaskHandle_t xTask, const MemoryRegion_t * const pxRegions );</pre>

- *

- * Memory regions are assigned to a restricted task when the task is created by

- * a call to xTaskCreateRestricted().  These regions can be redefined using

- * vTaskAllocateMPURegions().

- *

- * @param xTask The handle of the task being updated.

- *

- * @param xRegions A pointer to an MemoryRegion_t structure that contains the

- * new memory region definitions.

- *

- * Example usage:

-   <pre>

-// Define an array of MemoryRegion_t structures that configures an MPU region

-// allowing read/write access for 1024 bytes starting at the beginning of the

-// ucOneKByte array.  The other two of the maximum 3 definable regions are

-// unused so set to zero.

-static const MemoryRegion_t xAltRegions[ portNUM_CONFIGURABLE_REGIONS ] =

-{

-	// Base address		Length		Parameters

-	{ ucOneKByte,		1024,		portMPU_REGION_READ_WRITE },

-	{ 0,				0,			0 },

-	{ 0,				0,			0 }

-};

-

-void vATask( void *pvParameters )

-{

-	// This task was created such that it has access to certain regions of

-	// memory as defined by the MPU configuration.  At some point it is

-	// desired that these MPU regions are replaced with that defined in the

-	// xAltRegions const struct above.  Use a call to vTaskAllocateMPURegions()

-	// for this purpose.  NULL is used as the task handle to indicate that this

-	// function should modify the MPU regions of the calling task.

-	vTaskAllocateMPURegions( NULL, xAltRegions );

-

-	// Now the task can continue its function, but from this point on can only

-	// access its stack and the ucOneKByte array (unless any other statically

-	// defined or shared regions have been declared elsewhere).

-}

-   </pre>

- * \defgroup xTaskCreateRestricted xTaskCreateRestricted

- * \ingroup Tasks

- */

-void vTaskAllocateMPURegions( TaskHandle_t xTask, const MemoryRegion_t * const pxRegions ) PRIVILEGED_FUNCTION;

-

-/**

- * task. h

- * <pre>void vTaskDelete( TaskHandle_t xTask );</pre>

- *

- * INCLUDE_vTaskDelete must be defined as 1 for this function to be available.

- * See the configuration section for more information.

- *

- * Remove a task from the RTOS real time kernel's management.  The task being

- * deleted will be removed from all ready, blocked, suspended and event lists.

- *

- * NOTE:  The idle task is responsible for freeing the kernel allocated

- * memory from tasks that have been deleted.  It is therefore important that

- * the idle task is not starved of microcontroller processing time if your

- * application makes any calls to vTaskDelete ().  Memory allocated by the

- * task code is not automatically freed, and should be freed before the task

- * is deleted.

- *

- * See the demo application file death.c for sample code that utilises

- * vTaskDelete ().

- *

- * @param xTask The handle of the task to be deleted.  Passing NULL will

- * cause the calling task to be deleted.

- *

- * Example usage:

-   <pre>

- void vOtherFunction( void )

- {

- TaskHandle_t xHandle;

-

-	 // Create the task, storing the handle.

-	 xTaskCreate( vTaskCode, "NAME", STACK_SIZE, NULL, tskIDLE_PRIORITY, &xHandle );

-

-	 // Use the handle to delete the task.

-	 vTaskDelete( xHandle );

- }

-   </pre>

- * \defgroup vTaskDelete vTaskDelete

- * \ingroup Tasks

- */

-void vTaskDelete( TaskHandle_t xTaskToDelete ) PRIVILEGED_FUNCTION;

-

-/*-----------------------------------------------------------

- * TASK CONTROL API

- *----------------------------------------------------------*/

-

-/**

- * task. h

- * <pre>void vTaskDelay( const TickType_t xTicksToDelay );</pre>

- *

- * Delay a task for a given number of ticks.  The actual time that the

- * task remains blocked depends on the tick rate.  The constant

- * portTICK_PERIOD_MS can be used to calculate real time from the tick

- * rate - with the resolution of one tick period.

- *

- * INCLUDE_vTaskDelay must be defined as 1 for this function to be available.

- * See the configuration section for more information.

- *

- *

- * vTaskDelay() specifies a time at which the task wishes to unblock relative to

- * the time at which vTaskDelay() is called.  For example, specifying a block

- * period of 100 ticks will cause the task to unblock 100 ticks after

- * vTaskDelay() is called.  vTaskDelay() does not therefore provide a good method

- * of controlling the frequency of a periodic task as the path taken through the

- * code, as well as other task and interrupt activity, will effect the frequency

- * at which vTaskDelay() gets called and therefore the time at which the task

- * next executes.  See vTaskDelayUntil() for an alternative API function designed

- * to facilitate fixed frequency execution.  It does this by specifying an

- * absolute time (rather than a relative time) at which the calling task should

- * unblock.

- *

- * @param xTicksToDelay The amount of time, in tick periods, that

- * the calling task should block.

- *

- * Example usage:

-

- void vTaskFunction( void * pvParameters )

- {

- // Block for 500ms.

- const TickType_t xDelay = 500 / portTICK_PERIOD_MS;

-

-	 for( ;; )

-	 {

-		 // Simply toggle the LED every 500ms, blocking between each toggle.

-		 vToggleLED();

-		 vTaskDelay( xDelay );

-	 }

- }

-

- * \defgroup vTaskDelay vTaskDelay

- * \ingroup TaskCtrl

- */

-void vTaskDelay( const TickType_t xTicksToDelay ) PRIVILEGED_FUNCTION;

-

-/**

- * task. h

- * <pre>void vTaskDelayUntil( TickType_t *pxPreviousWakeTime, const TickType_t xTimeIncrement );</pre>

- *

- * INCLUDE_vTaskDelayUntil must be defined as 1 for this function to be available.

- * See the configuration section for more information.

- *

- * Delay a task until a specified time.  This function can be used by periodic

- * tasks to ensure a constant execution frequency.

- *

- * This function differs from vTaskDelay () in one important aspect:  vTaskDelay () will

- * cause a task to block for the specified number of ticks from the time vTaskDelay () is

- * called.  It is therefore difficult to use vTaskDelay () by itself to generate a fixed

- * execution frequency as the time between a task starting to execute and that task

- * calling vTaskDelay () may not be fixed [the task may take a different path though the

- * code between calls, or may get interrupted or preempted a different number of times

- * each time it executes].

- *

- * Whereas vTaskDelay () specifies a wake time relative to the time at which the function

- * is called, vTaskDelayUntil () specifies the absolute (exact) time at which it wishes to

- * unblock.

- *

- * The constant portTICK_PERIOD_MS can be used to calculate real time from the tick

- * rate - with the resolution of one tick period.

- *

- * @param pxPreviousWakeTime Pointer to a variable that holds the time at which the

- * task was last unblocked.  The variable must be initialised with the current time

- * prior to its first use (see the example below).  Following this the variable is

- * automatically updated within vTaskDelayUntil ().

- *

- * @param xTimeIncrement The cycle time period.  The task will be unblocked at

- * time *pxPreviousWakeTime + xTimeIncrement.  Calling vTaskDelayUntil with the

- * same xTimeIncrement parameter value will cause the task to execute with

- * a fixed interface period.

- *

- * Example usage:

-   <pre>

- // Perform an action every 10 ticks.

- void vTaskFunction( void * pvParameters )

- {

- TickType_t xLastWakeTime;

- const TickType_t xFrequency = 10;

-

-	 // Initialise the xLastWakeTime variable with the current time.

-	 xLastWakeTime = xTaskGetTickCount ();

-	 for( ;; )

-	 {

-		 // Wait for the next cycle.

-		 vTaskDelayUntil( &xLastWakeTime, xFrequency );

-

-		 // Perform action here.

-	 }

- }

-   </pre>

- * \defgroup vTaskDelayUntil vTaskDelayUntil

- * \ingroup TaskCtrl

- */

-void vTaskDelayUntil( TickType_t * const pxPreviousWakeTime, const TickType_t xTimeIncrement ) PRIVILEGED_FUNCTION;

-

-/**

- * task. h

- * <pre>UBaseType_t uxTaskPriorityGet( TaskHandle_t xTask );</pre>

- *

- * INCLUDE_uxTaskPriorityGet must be defined as 1 for this function to be available.

- * See the configuration section for more information.

- *

- * Obtain the priority of any task.

- *

- * @param xTask Handle of the task to be queried.  Passing a NULL

- * handle results in the priority of the calling task being returned.

- *

- * @return The priority of xTask.

- *

- * Example usage:

-   <pre>

- void vAFunction( void )

- {

- TaskHandle_t xHandle;

-

-	 // Create a task, storing the handle.

-	 xTaskCreate( vTaskCode, "NAME", STACK_SIZE, NULL, tskIDLE_PRIORITY, &xHandle );

-

-	 // ...

-

-	 // Use the handle to obtain the priority of the created task.

-	 // It was created with tskIDLE_PRIORITY, but may have changed

-	 // it itself.

-	 if( uxTaskPriorityGet( xHandle ) != tskIDLE_PRIORITY )

-	 {

-		 // The task has changed it's priority.

-	 }

-

-	 // ...

-

-	 // Is our priority higher than the created task?

-	 if( uxTaskPriorityGet( xHandle ) < uxTaskPriorityGet( NULL ) )

-	 {

-		 // Our priority (obtained using NULL handle) is higher.

-	 }

- }

-   </pre>

- * \defgroup uxTaskPriorityGet uxTaskPriorityGet

- * \ingroup TaskCtrl

- */

-UBaseType_t uxTaskPriorityGet( TaskHandle_t xTask ) PRIVILEGED_FUNCTION;

-

-/**

- * task. h

- * <pre>UBaseType_t uxTaskPriorityGetFromISR( TaskHandle_t xTask );</pre>

- *

- * A version of uxTaskPriorityGet() that can be used from an ISR.

- */

-UBaseType_t uxTaskPriorityGetFromISR( TaskHandle_t xTask ) PRIVILEGED_FUNCTION;

-

-/**

- * task. h

- * <pre>eTaskState eTaskGetState( TaskHandle_t xTask );</pre>

- *

- * INCLUDE_eTaskGetState must be defined as 1 for this function to be available.

- * See the configuration section for more information.

- *

- * Obtain the state of any task.  States are encoded by the eTaskState

- * enumerated type.

- *

- * @param xTask Handle of the task to be queried.

- *

- * @return The state of xTask at the time the function was called.  Note the

- * state of the task might change between the function being called, and the

- * functions return value being tested by the calling task.

- */

-eTaskState eTaskGetState( TaskHandle_t xTask ) PRIVILEGED_FUNCTION;

-

-/**

- * task. h

- * <pre>void vTaskPrioritySet( TaskHandle_t xTask, UBaseType_t uxNewPriority );</pre>

- *

- * INCLUDE_vTaskPrioritySet must be defined as 1 for this function to be available.

- * See the configuration section for more information.

- *

- * Set the priority of any task.

- *

- * A context switch will occur before the function returns if the priority

- * being set is higher than the currently executing task.

- *

- * @param xTask Handle to the task for which the priority is being set.

- * Passing a NULL handle results in the priority of the calling task being set.

- *

- * @param uxNewPriority The priority to which the task will be set.

- *

- * Example usage:

-   <pre>

- void vAFunction( void )

- {

- TaskHandle_t xHandle;

-

-	 // Create a task, storing the handle.

-	 xTaskCreate( vTaskCode, "NAME", STACK_SIZE, NULL, tskIDLE_PRIORITY, &xHandle );

-

-	 // ...

-

-	 // Use the handle to raise the priority of the created task.

-	 vTaskPrioritySet( xHandle, tskIDLE_PRIORITY + 1 );

-

-	 // ...

-

-	 // Use a NULL handle to raise our priority to the same value.

-	 vTaskPrioritySet( NULL, tskIDLE_PRIORITY + 1 );

- }

-   </pre>

- * \defgroup vTaskPrioritySet vTaskPrioritySet

- * \ingroup TaskCtrl

- */

-void vTaskPrioritySet( TaskHandle_t xTask, UBaseType_t uxNewPriority ) PRIVILEGED_FUNCTION;

-

-/**

- * task. h

- * <pre>void vTaskSuspend( TaskHandle_t xTaskToSuspend );</pre>

- *

- * INCLUDE_vTaskSuspend must be defined as 1 for this function to be available.

- * See the configuration section for more information.

- *

- * Suspend any task.  When suspended a task will never get any microcontroller

- * processing time, no matter what its priority.

- *

- * Calls to vTaskSuspend are not accumulative -

- * i.e. calling vTaskSuspend () twice on the same task still only requires one

- * call to vTaskResume () to ready the suspended task.

- *

- * @param xTaskToSuspend Handle to the task being suspended.  Passing a NULL

- * handle will cause the calling task to be suspended.

- *

- * Example usage:

-   <pre>

- void vAFunction( void )

- {

- TaskHandle_t xHandle;

-

-	 // Create a task, storing the handle.

-	 xTaskCreate( vTaskCode, "NAME", STACK_SIZE, NULL, tskIDLE_PRIORITY, &xHandle );

-

-	 // ...

-

-	 // Use the handle to suspend the created task.

-	 vTaskSuspend( xHandle );

-

-	 // ...

-

-	 // The created task will not run during this period, unless

-	 // another task calls vTaskResume( xHandle ).

-

-	 //...

-

-

-	 // Suspend ourselves.

-	 vTaskSuspend( NULL );

-

-	 // We cannot get here unless another task calls vTaskResume

-	 // with our handle as the parameter.

- }

-   </pre>

- * \defgroup vTaskSuspend vTaskSuspend

- * \ingroup TaskCtrl

- */

-void vTaskSuspend( TaskHandle_t xTaskToSuspend ) PRIVILEGED_FUNCTION;

-

-/**

- * task. h

- * <pre>void vTaskResume( TaskHandle_t xTaskToResume );</pre>

- *

- * INCLUDE_vTaskSuspend must be defined as 1 for this function to be available.

- * See the configuration section for more information.

- *

- * Resumes a suspended task.

- *

- * A task that has been suspended by one or more calls to vTaskSuspend ()

- * will be made available for running again by a single call to

- * vTaskResume ().

- *

- * @param xTaskToResume Handle to the task being readied.

- *

- * Example usage:

-   <pre>

- void vAFunction( void )

- {

- TaskHandle_t xHandle;

-

-	 // Create a task, storing the handle.

-	 xTaskCreate( vTaskCode, "NAME", STACK_SIZE, NULL, tskIDLE_PRIORITY, &xHandle );

-

-	 // ...

-

-	 // Use the handle to suspend the created task.

-	 vTaskSuspend( xHandle );

-

-	 // ...

-

-	 // The created task will not run during this period, unless

-	 // another task calls vTaskResume( xHandle ).

-

-	 //...

-

-

-	 // Resume the suspended task ourselves.

-	 vTaskResume( xHandle );

-

-	 // The created task will once again get microcontroller processing

-	 // time in accordance with its priority within the system.

- }

-   </pre>

- * \defgroup vTaskResume vTaskResume

- * \ingroup TaskCtrl

- */

-void vTaskResume( TaskHandle_t xTaskToResume ) PRIVILEGED_FUNCTION;

-

-/**

- * task. h

- * <pre>void xTaskResumeFromISR( TaskHandle_t xTaskToResume );</pre>

- *

- * INCLUDE_xTaskResumeFromISR must be defined as 1 for this function to be

- * available.  See the configuration section for more information.

- *

- * An implementation of vTaskResume() that can be called from within an ISR.

- *

- * A task that has been suspended by one or more calls to vTaskSuspend ()

- * will be made available for running again by a single call to

- * xTaskResumeFromISR ().

- *

- * xTaskResumeFromISR() should not be used to synchronise a task with an

- * interrupt if there is a chance that the interrupt could arrive prior to the

- * task being suspended - as this can lead to interrupts being missed. Use of a

- * semaphore as a synchronisation mechanism would avoid this eventuality.

- *

- * @param xTaskToResume Handle to the task being readied.

- *

- * @return pdTRUE if resuming the task should result in a context switch,

- * otherwise pdFALSE. This is used by the ISR to determine if a context switch

- * may be required following the ISR.

- *

- * \defgroup vTaskResumeFromISR vTaskResumeFromISR

- * \ingroup TaskCtrl

- */

-BaseType_t xTaskResumeFromISR( TaskHandle_t xTaskToResume ) PRIVILEGED_FUNCTION;

-

-/*-----------------------------------------------------------

- * SCHEDULER CONTROL

- *----------------------------------------------------------*/

-

-/**

- * task. h

- * <pre>void vTaskStartScheduler( void );</pre>

- *

- * Starts the real time kernel tick processing.  After calling the kernel

- * has control over which tasks are executed and when.

- *

- * See the demo application file main.c for an example of creating

- * tasks and starting the kernel.

- *

- * Example usage:

-   <pre>

- void vAFunction( void )

- {

-	 // Create at least one task before starting the kernel.

-	 xTaskCreate( vTaskCode, "NAME", STACK_SIZE, NULL, tskIDLE_PRIORITY, NULL );

-

-	 // Start the real time kernel with preemption.

-	 vTaskStartScheduler ();

-

-	 // Will not get here unless a task calls vTaskEndScheduler ()

- }

-   </pre>

- *

- * \defgroup vTaskStartScheduler vTaskStartScheduler

- * \ingroup SchedulerControl

- */

-void vTaskStartScheduler( void ) PRIVILEGED_FUNCTION;

-

-/**

- * task. h

- * <pre>void vTaskEndScheduler( void );</pre>

- *

- * NOTE:  At the time of writing only the x86 real mode port, which runs on a PC

- * in place of DOS, implements this function.

- *

- * Stops the real time kernel tick.  All created tasks will be automatically

- * deleted and multitasking (either preemptive or cooperative) will

- * stop.  Execution then resumes from the point where vTaskStartScheduler ()

- * was called, as if vTaskStartScheduler () had just returned.

- *

- * See the demo application file main. c in the demo/PC directory for an

- * example that uses vTaskEndScheduler ().

- *

- * vTaskEndScheduler () requires an exit function to be defined within the

- * portable layer (see vPortEndScheduler () in port. c for the PC port).  This

- * performs hardware specific operations such as stopping the kernel tick.

- *

- * vTaskEndScheduler () will cause all of the resources allocated by the

- * kernel to be freed - but will not free resources allocated by application

- * tasks.

- *

- * Example usage:

-   <pre>

- void vTaskCode( void * pvParameters )

- {

-	 for( ;; )

-	 {

-		 // Task code goes here.

-

-		 // At some point we want to end the real time kernel processing

-		 // so call ...

-		 vTaskEndScheduler ();

-	 }

- }

-

- void vAFunction( void )

- {

-	 // Create at least one task before starting the kernel.

-	 xTaskCreate( vTaskCode, "NAME", STACK_SIZE, NULL, tskIDLE_PRIORITY, NULL );

-

-	 // Start the real time kernel with preemption.

-	 vTaskStartScheduler ();

-

-	 // Will only get here when the vTaskCode () task has called

-	 // vTaskEndScheduler ().  When we get here we are back to single task

-	 // execution.

- }

-   </pre>

- *

- * \defgroup vTaskEndScheduler vTaskEndScheduler

- * \ingroup SchedulerControl

- */

-void vTaskEndScheduler( void ) PRIVILEGED_FUNCTION;

-

-/**

- * task. h

- * <pre>void vTaskSuspendAll( void );</pre>

- *

- * Suspends the scheduler without disabling interrupts.  Context switches will

- * not occur while the scheduler is suspended.

- *

- * After calling vTaskSuspendAll () the calling task will continue to execute

- * without risk of being swapped out until a call to xTaskResumeAll () has been

- * made.

- *

- * API functions that have the potential to cause a context switch (for example,

- * vTaskDelayUntil(), xQueueSend(), etc.) must not be called while the scheduler

- * is suspended.

- *

- * Example usage:

-   <pre>

- void vTask1( void * pvParameters )

- {

-	 for( ;; )

-	 {

-		 // Task code goes here.

-

-		 // ...

-

-		 // At some point the task wants to perform a long operation during

-		 // which it does not want to get swapped out.  It cannot use

-		 // taskENTER_CRITICAL ()/taskEXIT_CRITICAL () as the length of the

-		 // operation may cause interrupts to be missed - including the

-		 // ticks.

-

-		 // Prevent the real time kernel swapping out the task.

-		 vTaskSuspendAll ();

-

-		 // Perform the operation here.  There is no need to use critical

-		 // sections as we have all the microcontroller processing time.

-		 // During this time interrupts will still operate and the kernel

-		 // tick count will be maintained.

-

-		 // ...

-

-		 // The operation is complete.  Restart the kernel.

-		 xTaskResumeAll ();

-	 }

- }

-   </pre>

- * \defgroup vTaskSuspendAll vTaskSuspendAll

- * \ingroup SchedulerControl

- */

-void vTaskSuspendAll( void ) PRIVILEGED_FUNCTION;

-

-/**

- * task. h

- * <pre>BaseType_t xTaskResumeAll( void );</pre>

- *

- * Resumes scheduler activity after it was suspended by a call to

- * vTaskSuspendAll().

- *

- * xTaskResumeAll() only resumes the scheduler.  It does not unsuspend tasks

- * that were previously suspended by a call to vTaskSuspend().

- *

- * @return If resuming the scheduler caused a context switch then pdTRUE is

- *		  returned, otherwise pdFALSE is returned.

- *

- * Example usage:

-   <pre>

- void vTask1( void * pvParameters )

- {

-	 for( ;; )

-	 {

-		 // Task code goes here.

-

-		 // ...

-

-		 // At some point the task wants to perform a long operation during

-		 // which it does not want to get swapped out.  It cannot use

-		 // taskENTER_CRITICAL ()/taskEXIT_CRITICAL () as the length of the

-		 // operation may cause interrupts to be missed - including the

-		 // ticks.

-

-		 // Prevent the real time kernel swapping out the task.

-		 vTaskSuspendAll ();

-

-		 // Perform the operation here.  There is no need to use critical

-		 // sections as we have all the microcontroller processing time.

-		 // During this time interrupts will still operate and the real

-		 // time kernel tick count will be maintained.

-

-		 // ...

-

-		 // The operation is complete.  Restart the kernel.  We want to force

-		 // a context switch - but there is no point if resuming the scheduler

-		 // caused a context switch already.

-		 if( !xTaskResumeAll () )

-		 {

-			  taskYIELD ();

-		 }

-	 }

- }

-   </pre>

- * \defgroup xTaskResumeAll xTaskResumeAll

- * \ingroup SchedulerControl

- */

-BaseType_t xTaskResumeAll( void ) PRIVILEGED_FUNCTION;

-

-/*-----------------------------------------------------------

- * TASK UTILITIES

- *----------------------------------------------------------*/

-

-/**

- * task. h

- * <PRE>TickType_t xTaskGetTickCount( void );</PRE>

- *

- * @return The count of ticks since vTaskStartScheduler was called.

- *

- * \defgroup xTaskGetTickCount xTaskGetTickCount

- * \ingroup TaskUtils

- */

-TickType_t xTaskGetTickCount( void ) PRIVILEGED_FUNCTION;

-

-/**

- * task. h

- * <PRE>TickType_t xTaskGetTickCountFromISR( void );</PRE>

- *

- * @return The count of ticks since vTaskStartScheduler was called.

- *

- * This is a version of xTaskGetTickCount() that is safe to be called from an

- * ISR - provided that TickType_t is the natural word size of the

- * microcontroller being used or interrupt nesting is either not supported or

- * not being used.

- *

- * \defgroup xTaskGetTickCountFromISR xTaskGetTickCountFromISR

- * \ingroup TaskUtils

- */

-TickType_t xTaskGetTickCountFromISR( void ) PRIVILEGED_FUNCTION;

-

-/**

- * task. h

- * <PRE>uint16_t uxTaskGetNumberOfTasks( void );</PRE>

- *

- * @return The number of tasks that the real time kernel is currently managing.

- * This includes all ready, blocked and suspended tasks.  A task that

- * has been deleted but not yet freed by the idle task will also be

- * included in the count.

- *

- * \defgroup uxTaskGetNumberOfTasks uxTaskGetNumberOfTasks

- * \ingroup TaskUtils

- */

-UBaseType_t uxTaskGetNumberOfTasks( void ) PRIVILEGED_FUNCTION;

-

-/**

- * task. h

- * <PRE>char *pcTaskGetTaskName( TaskHandle_t xTaskToQuery );</PRE>

- *

- * @return The text (human readable) name of the task referenced by the handle

- * xTaskToQuery.  A task can query its own name by either passing in its own

- * handle, or by setting xTaskToQuery to NULL.  INCLUDE_pcTaskGetTaskName must be

- * set to 1 in FreeRTOSConfig.h for pcTaskGetTaskName() to be available.

- *

- * \defgroup pcTaskGetTaskName pcTaskGetTaskName

- * \ingroup TaskUtils

- */

-char *pcTaskGetTaskName( TaskHandle_t xTaskToQuery ) PRIVILEGED_FUNCTION; /*lint !e971 Unqualified char types are allowed for strings and single characters only. */

-

-/**

- * task.h

- * <PRE>UBaseType_t uxTaskGetStackHighWaterMark( TaskHandle_t xTask );</PRE>

- *

- * INCLUDE_uxTaskGetStackHighWaterMark must be set to 1 in FreeRTOSConfig.h for

- * this function to be available.

- *

- * Returns the high water mark of the stack associated with xTask.  That is,

- * the minimum free stack space there has been (in words, so on a 32 bit machine

- * a value of 1 means 4 bytes) since the task started.  The smaller the returned

- * number the closer the task has come to overflowing its stack.

- *

- * @param xTask Handle of the task associated with the stack to be checked.

- * Set xTask to NULL to check the stack of the calling task.

- *

- * @return The smallest amount of free stack space there has been (in words, so

- * actual spaces on the stack rather than bytes) since the task referenced by

- * xTask was created.

- */

-UBaseType_t uxTaskGetStackHighWaterMark( TaskHandle_t xTask ) PRIVILEGED_FUNCTION;

-

-/* When using trace macros it is sometimes necessary to include task.h before

-FreeRTOS.h.  When this is done TaskHookFunction_t will not yet have been defined,

-so the following two prototypes will cause a compilation error.  This can be

-fixed by simply guarding against the inclusion of these two prototypes unless

-they are explicitly required by the configUSE_APPLICATION_TASK_TAG configuration

-constant. */

-#ifdef configUSE_APPLICATION_TASK_TAG

-	#if configUSE_APPLICATION_TASK_TAG == 1

-		/**

-		 * task.h

-		 * <pre>void vTaskSetApplicationTaskTag( TaskHandle_t xTask, TaskHookFunction_t pxHookFunction );</pre>

-		 *

-		 * Sets pxHookFunction to be the task hook function used by the task xTask.

-		 * Passing xTask as NULL has the effect of setting the calling tasks hook

-		 * function.

-		 */

-		void vTaskSetApplicationTaskTag( TaskHandle_t xTask, TaskHookFunction_t pxHookFunction ) PRIVILEGED_FUNCTION;

-

-		/**

-		 * task.h

-		 * <pre>void xTaskGetApplicationTaskTag( TaskHandle_t xTask );</pre>

-		 *

-		 * Returns the pxHookFunction value assigned to the task xTask.

-		 */

-		TaskHookFunction_t xTaskGetApplicationTaskTag( TaskHandle_t xTask ) PRIVILEGED_FUNCTION;

-	#endif /* configUSE_APPLICATION_TASK_TAG ==1 */

-#endif /* ifdef configUSE_APPLICATION_TASK_TAG */

-

-#if( configNUM_THREAD_LOCAL_STORAGE_POINTERS > 0 )

-

-	/* Each task contains an array of pointers that is dimensioned by the

-	configNUM_THREAD_LOCAL_STORAGE_POINTERS setting in FreeRTOSConfig.h.  The

-	kernel does not use the pointers itself, so the application writer can use

-	the pointers for any purpose they wish.  The following two functions are

-	used to set and query a pointer respectively. */

-	void vTaskSetThreadLocalStoragePointer( TaskHandle_t xTaskToSet, BaseType_t xIndex, void *pvValue ) PRIVILEGED_FUNCTION;

-	void *pvTaskGetThreadLocalStoragePointer( TaskHandle_t xTaskToQuery, BaseType_t xIndex ) PRIVILEGED_FUNCTION;

-

-#endif

-

-/**

- * task.h

- * <pre>BaseType_t xTaskCallApplicationTaskHook( TaskHandle_t xTask, void *pvParameter );</pre>

- *

- * Calls the hook function associated with xTask.  Passing xTask as NULL has

- * the effect of calling the Running tasks (the calling task) hook function.

- *

- * pvParameter is passed to the hook function for the task to interpret as it

- * wants.  The return value is the value returned by the task hook function

- * registered by the user.

- */

-BaseType_t xTaskCallApplicationTaskHook( TaskHandle_t xTask, void *pvParameter ) PRIVILEGED_FUNCTION;

-

-/**

- * xTaskGetIdleTaskHandle() is only available if

- * INCLUDE_xTaskGetIdleTaskHandle is set to 1 in FreeRTOSConfig.h.

- *

- * Simply returns the handle of the idle task.  It is not valid to call

- * xTaskGetIdleTaskHandle() before the scheduler has been started.

- */

-TaskHandle_t xTaskGetIdleTaskHandle( void ) PRIVILEGED_FUNCTION;

-

-/**

- * configUSE_TRACE_FACILITY must be defined as 1 in FreeRTOSConfig.h for

- * uxTaskGetSystemState() to be available.

- *

- * uxTaskGetSystemState() populates an TaskStatus_t structure for each task in

- * the system.  TaskStatus_t structures contain, among other things, members

- * for the task handle, task name, task priority, task state, and total amount

- * of run time consumed by the task.  See the TaskStatus_t structure

- * definition in this file for the full member list.

- *

- * NOTE:  This function is intended for debugging use only as its use results in

- * the scheduler remaining suspended for an extended period.

- *

- * @param pxTaskStatusArray A pointer to an array of TaskStatus_t structures.

- * The array must contain at least one TaskStatus_t structure for each task

- * that is under the control of the RTOS.  The number of tasks under the control

- * of the RTOS can be determined using the uxTaskGetNumberOfTasks() API function.

- *

- * @param uxArraySize The size of the array pointed to by the pxTaskStatusArray

- * parameter.  The size is specified as the number of indexes in the array, or

- * the number of TaskStatus_t structures contained in the array, not by the

- * number of bytes in the array.

- *

- * @param pulTotalRunTime If configGENERATE_RUN_TIME_STATS is set to 1 in

- * FreeRTOSConfig.h then *pulTotalRunTime is set by uxTaskGetSystemState() to the

- * total run time (as defined by the run time stats clock, see

- * http://www.freertos.org/rtos-run-time-stats.html) since the target booted.

- * pulTotalRunTime can be set to NULL to omit the total run time information.

- *

- * @return The number of TaskStatus_t structures that were populated by

- * uxTaskGetSystemState().  This should equal the number returned by the

- * uxTaskGetNumberOfTasks() API function, but will be zero if the value passed

- * in the uxArraySize parameter was too small.

- *

- * Example usage:

-   <pre>

-    // This example demonstrates how a human readable table of run time stats

-	// information is generated from raw data provided by uxTaskGetSystemState().

-	// The human readable table is written to pcWriteBuffer

-	void vTaskGetRunTimeStats( char *pcWriteBuffer )

-	{

-	TaskStatus_t *pxTaskStatusArray;

-	volatile UBaseType_t uxArraySize, x;

-	uint32_t ulTotalRunTime, ulStatsAsPercentage;

-

-		// Make sure the write buffer does not contain a string.

-		*pcWriteBuffer = 0x00;

-

-		// Take a snapshot of the number of tasks in case it changes while this

-		// function is executing.

-		uxArraySize = uxTaskGetNumberOfTasks();

-

-		// Allocate a TaskStatus_t structure for each task.  An array could be

-		// allocated statically at compile time.

-		pxTaskStatusArray = pvPortMalloc( uxArraySize * sizeof( TaskStatus_t ) );

-

-		if( pxTaskStatusArray != NULL )

-		{

-			// Generate raw status information about each task.

-			uxArraySize = uxTaskGetSystemState( pxTaskStatusArray, uxArraySize, &ulTotalRunTime );

-

-			// For percentage calculations.

-			ulTotalRunTime /= 100UL;

-

-			// Avoid divide by zero errors.

-			if( ulTotalRunTime > 0 )

-			{

-				// For each populated position in the pxTaskStatusArray array,

-				// format the raw data as human readable ASCII data

-				for( x = 0; x < uxArraySize; x++ )

-				{

-					// What percentage of the total run time has the task used?

-					// This will always be rounded down to the nearest integer.

-					// ulTotalRunTimeDiv100 has already been divided by 100.

-					ulStatsAsPercentage = pxTaskStatusArray[ x ].ulRunTimeCounter / ulTotalRunTime;

-

-					if( ulStatsAsPercentage > 0UL )

-					{

-						sprintf( pcWriteBuffer, "%s\t\t%lu\t\t%lu%%\r\n", pxTaskStatusArray[ x ].pcTaskName, pxTaskStatusArray[ x ].ulRunTimeCounter, ulStatsAsPercentage );

-					}

-					else

-					{

-						// If the percentage is zero here then the task has

-						// consumed less than 1% of the total run time.

-						sprintf( pcWriteBuffer, "%s\t\t%lu\t\t<1%%\r\n", pxTaskStatusArray[ x ].pcTaskName, pxTaskStatusArray[ x ].ulRunTimeCounter );

-					}

-

-					pcWriteBuffer += strlen( ( char * ) pcWriteBuffer );

-				}

-			}

-

-			// The array is no longer needed, free the memory it consumes.

-			vPortFree( pxTaskStatusArray );

-		}

-	}

-	</pre>

- */

-UBaseType_t uxTaskGetSystemState( TaskStatus_t * const pxTaskStatusArray, const UBaseType_t uxArraySize, uint32_t * const pulTotalRunTime ) PRIVILEGED_FUNCTION;

-

-/**

- * task. h

- * <PRE>void vTaskList( char *pcWriteBuffer );</PRE>

- *

- * configUSE_TRACE_FACILITY and configUSE_STATS_FORMATTING_FUNCTIONS must

- * both be defined as 1 for this function to be available.  See the

- * configuration section of the FreeRTOS.org website for more information.

- *

- * NOTE 1: This function will disable interrupts for its duration.  It is

- * not intended for normal application runtime use but as a debug aid.

- *

- * Lists all the current tasks, along with their current state and stack

- * usage high water mark.

- *

- * Tasks are reported as blocked ('B'), ready ('R'), deleted ('D') or

- * suspended ('S').

- *

- * PLEASE NOTE:

- *

- * This function is provided for convenience only, and is used by many of the

- * demo applications.  Do not consider it to be part of the scheduler.

- *

- * vTaskList() calls uxTaskGetSystemState(), then formats part of the

- * uxTaskGetSystemState() output into a human readable table that displays task

- * names, states and stack usage.

- *

- * vTaskList() has a dependency on the sprintf() C library function that might

- * bloat the code size, use a lot of stack, and provide different results on

- * different platforms.  An alternative, tiny, third party, and limited

- * functionality implementation of sprintf() is provided in many of the

- * FreeRTOS/Demo sub-directories in a file called printf-stdarg.c (note

- * printf-stdarg.c does not provide a full snprintf() implementation!).

- *

- * It is recommended that production systems call uxTaskGetSystemState()

- * directly to get access to raw stats data, rather than indirectly through a

- * call to vTaskList().

- *

- * @param pcWriteBuffer A buffer into which the above mentioned details

- * will be written, in ASCII form.  This buffer is assumed to be large

- * enough to contain the generated report.  Approximately 40 bytes per

- * task should be sufficient.

- *

- * \defgroup vTaskList vTaskList

- * \ingroup TaskUtils

- */

-void vTaskList( char * pcWriteBuffer ) PRIVILEGED_FUNCTION; /*lint !e971 Unqualified char types are allowed for strings and single characters only. */

-

-/**

- * task. h

- * <PRE>void vTaskGetRunTimeStats( char *pcWriteBuffer );</PRE>

- *

- * configGENERATE_RUN_TIME_STATS and configUSE_STATS_FORMATTING_FUNCTIONS

- * must both be defined as 1 for this function to be available.  The application

- * must also then provide definitions for

- * portCONFIGURE_TIMER_FOR_RUN_TIME_STATS() and portGET_RUN_TIME_COUNTER_VALUE()

- * to configure a peripheral timer/counter and return the timers current count

- * value respectively.  The counter should be at least 10 times the frequency of

- * the tick count.

- *

- * NOTE 1: This function will disable interrupts for its duration.  It is

- * not intended for normal application runtime use but as a debug aid.

- *

- * Setting configGENERATE_RUN_TIME_STATS to 1 will result in a total

- * accumulated execution time being stored for each task.  The resolution

- * of the accumulated time value depends on the frequency of the timer

- * configured by the portCONFIGURE_TIMER_FOR_RUN_TIME_STATS() macro.

- * Calling vTaskGetRunTimeStats() writes the total execution time of each

- * task into a buffer, both as an absolute count value and as a percentage

- * of the total system execution time.

- *

- * NOTE 2:

- *

- * This function is provided for convenience only, and is used by many of the

- * demo applications.  Do not consider it to be part of the scheduler.

- *

- * vTaskGetRunTimeStats() calls uxTaskGetSystemState(), then formats part of the

- * uxTaskGetSystemState() output into a human readable table that displays the

- * amount of time each task has spent in the Running state in both absolute and

- * percentage terms.

- *

- * vTaskGetRunTimeStats() has a dependency on the sprintf() C library function

- * that might bloat the code size, use a lot of stack, and provide different

- * results on different platforms.  An alternative, tiny, third party, and

- * limited functionality implementation of sprintf() is provided in many of the

- * FreeRTOS/Demo sub-directories in a file called printf-stdarg.c (note

- * printf-stdarg.c does not provide a full snprintf() implementation!).

- *

- * It is recommended that production systems call uxTaskGetSystemState() directly

- * to get access to raw stats data, rather than indirectly through a call to

- * vTaskGetRunTimeStats().

- *

- * @param pcWriteBuffer A buffer into which the execution times will be

- * written, in ASCII form.  This buffer is assumed to be large enough to

- * contain the generated report.  Approximately 40 bytes per task should

- * be sufficient.

- *

- * \defgroup vTaskGetRunTimeStats vTaskGetRunTimeStats

- * \ingroup TaskUtils

- */

-void vTaskGetRunTimeStats( char *pcWriteBuffer ) PRIVILEGED_FUNCTION; /*lint !e971 Unqualified char types are allowed for strings and single characters only. */

-

-/**

- * task. h

- * <PRE>BaseType_t xTaskNotify( TaskHandle_t xTaskToNotify, uint32_t ulValue, eNotifyAction eAction );</PRE>

- *

- * configUSE_TASK_NOTIFICATIONS must be undefined or defined as 1 for this

- * function to be available.

- *

- * When configUSE_TASK_NOTIFICATIONS is set to one each task has its own private

- * "notification value", which is a 32-bit unsigned integer (uint32_t).

- *

- * Events can be sent to a task using an intermediary object.  Examples of such

- * objects are queues, semaphores, mutexes and event groups.  Task notifications

- * are a method of sending an event directly to a task without the need for such

- * an intermediary object.

- *

- * A notification sent to a task can optionally perform an action, such as

- * update, overwrite or increment the task's notification value.  In that way

- * task notifications can be used to send data to a task, or be used as light

- * weight and fast binary or counting semaphores.

- *

- * A notification sent to a task will remain pending until it is cleared by the

- * task calling xTaskNotifyWait() or ulTaskNotifyTake().  If the task was

- * already in the Blocked state to wait for a notification when the notification

- * arrives then the task will automatically be removed from the Blocked state

- * (unblocked) and the notification cleared.

- *

- * A task can use xTaskNotifyWait() to [optionally] block to wait for a

- * notification to be pending, or ulTaskNotifyTake() to [optionally] block

- * to wait for its notification value to have a non-zero value.  The task does

- * not consume any CPU time while it is in the Blocked state.

- *

- * See http://www.FreeRTOS.org/RTOS-task-notifications.html for details.

- *

- * @param xTaskToNotify The handle of the task being notified.  The handle to a

- * task can be returned from the xTaskCreate() API function used to create the

- * task, and the handle of the currently running task can be obtained by calling

- * xTaskGetCurrentTaskHandle().

- *

- * @param ulValue Data that can be sent with the notification.  How the data is

- * used depends on the value of the eAction parameter.

- *

- * @param eAction Specifies how the notification updates the task's notification

- * value, if at all.  Valid values for eAction are as follows:

- *

- * eSetBits -

- * The task's notification value is bitwise ORed with ulValue.  xTaskNofify()

- * always returns pdPASS in this case.

- *

- * eIncrement -

- * The task's notification value is incremented.  ulValue is not used and

- * xTaskNotify() always returns pdPASS in this case.

- *

- * eSetValueWithOverwrite -

- * The task's notification value is set to the value of ulValue, even if the

- * task being notified had not yet processed the previous notification (the

- * task already had a notification pending).  xTaskNotify() always returns

- * pdPASS in this case.

- *

- * eSetValueWithoutOverwrite -

- * If the task being notified did not already have a notification pending then

- * the task's notification value is set to ulValue and xTaskNotify() will

- * return pdPASS.  If the task being notified already had a notification

- * pending then no action is performed and pdFAIL is returned.

- *

- * eNoAction -

- * The task receives a notification without its notification value being

- * updated.  ulValue is not used and xTaskNotify() always returns pdPASS in

- * this case.

- *

- *  pulPreviousNotificationValue -

- *  Can be used to pass out the subject task's notification value before any

- *  bits are modified by the notify function.

- *

- * @return Dependent on the value of eAction.  See the description of the

- * eAction parameter.

- *

- * \defgroup xTaskNotify xTaskNotify

- * \ingroup TaskNotifications

- */

-BaseType_t xTaskGenericNotify( TaskHandle_t xTaskToNotify, uint32_t ulValue, eNotifyAction eAction, uint32_t *pulPreviousNotificationValue ) PRIVILEGED_FUNCTION;

-#define xTaskNotify( xTaskToNotify, ulValue, eAction ) xTaskGenericNotify( ( xTaskToNotify ), ( ulValue ), ( eAction ), NULL )

-#define xTaskNotifyAndQuery( xTaskToNotify, ulValue, eAction, pulPreviousNotifyValue ) xTaskGenericNotify( ( xTaskToNotify ), ( ulValue ), ( eAction ), ( pulPreviousNotifyValue ) )

-

-/**

- * task. h

- * <PRE>BaseType_t xTaskNotifyFromISR( TaskHandle_t xTaskToNotify, uint32_t ulValue, eNotifyAction eAction, BaseType_t *pxHigherPriorityTaskWoken );</PRE>

- *

- * configUSE_TASK_NOTIFICATIONS must be undefined or defined as 1 for this

- * function to be available.

- *

- * When configUSE_TASK_NOTIFICATIONS is set to one each task has its own private

- * "notification value", which is a 32-bit unsigned integer (uint32_t).

- *

- * A version of xTaskNotify() that can be used from an interrupt service routine

- * (ISR).

- *

- * Events can be sent to a task using an intermediary object.  Examples of such

- * objects are queues, semaphores, mutexes and event groups.  Task notifications

- * are a method of sending an event directly to a task without the need for such

- * an intermediary object.

- *

- * A notification sent to a task can optionally perform an action, such as

- * update, overwrite or increment the task's notification value.  In that way

- * task notifications can be used to send data to a task, or be used as light

- * weight and fast binary or counting semaphores.

- *

- * A notification sent to a task will remain pending until it is cleared by the

- * task calling xTaskNotifyWait() or ulTaskNotifyTake().  If the task was

- * already in the Blocked state to wait for a notification when the notification

- * arrives then the task will automatically be removed from the Blocked state

- * (unblocked) and the notification cleared.

- *

- * A task can use xTaskNotifyWait() to [optionally] block to wait for a

- * notification to be pending, or ulTaskNotifyTake() to [optionally] block

- * to wait for its notification value to have a non-zero value.  The task does

- * not consume any CPU time while it is in the Blocked state.

- *

- * See http://www.FreeRTOS.org/RTOS-task-notifications.html for details.

- *

- * @param xTaskToNotify The handle of the task being notified.  The handle to a

- * task can be returned from the xTaskCreate() API function used to create the

- * task, and the handle of the currently running task can be obtained by calling

- * xTaskGetCurrentTaskHandle().

- *

- * @param ulValue Data that can be sent with the notification.  How the data is

- * used depends on the value of the eAction parameter.

- *

- * @param eAction Specifies how the notification updates the task's notification

- * value, if at all.  Valid values for eAction are as follows:

- *

- * eSetBits -

- * The task's notification value is bitwise ORed with ulValue.  xTaskNofify()

- * always returns pdPASS in this case.

- *

- * eIncrement -

- * The task's notification value is incremented.  ulValue is not used and

- * xTaskNotify() always returns pdPASS in this case.

- *

- * eSetValueWithOverwrite -

- * The task's notification value is set to the value of ulValue, even if the

- * task being notified had not yet processed the previous notification (the

- * task already had a notification pending).  xTaskNotify() always returns

- * pdPASS in this case.

- *

- * eSetValueWithoutOverwrite -

- * If the task being notified did not already have a notification pending then

- * the task's notification value is set to ulValue and xTaskNotify() will

- * return pdPASS.  If the task being notified already had a notification

- * pending then no action is performed and pdFAIL is returned.

- *

- * eNoAction -

- * The task receives a notification without its notification value being

- * updated.  ulValue is not used and xTaskNotify() always returns pdPASS in

- * this case.

- *

- * @param pxHigherPriorityTaskWoken  xTaskNotifyFromISR() will set

- * *pxHigherPriorityTaskWoken to pdTRUE if sending the notification caused the

- * task to which the notification was sent to leave the Blocked state, and the

- * unblocked task has a priority higher than the currently running task.  If

- * xTaskNotifyFromISR() sets this value to pdTRUE then a context switch should

- * be requested before the interrupt is exited.  How a context switch is

- * requested from an ISR is dependent on the port - see the documentation page

- * for the port in use.

- *

- * @return Dependent on the value of eAction.  See the description of the

- * eAction parameter.

- *

- * \defgroup xTaskNotify xTaskNotify

- * \ingroup TaskNotifications

- */

-BaseType_t xTaskGenericNotifyFromISR( TaskHandle_t xTaskToNotify, uint32_t ulValue, eNotifyAction eAction, uint32_t *pulPreviousNotificationValue, BaseType_t *pxHigherPriorityTaskWoken ) PRIVILEGED_FUNCTION;

-#define xTaskNotifyFromISR( xTaskToNotify, ulValue, eAction, pxHigherPriorityTaskWoken ) xTaskGenericNotifyFromISR( ( xTaskToNotify ), ( ulValue ), ( eAction ), NULL, ( pxHigherPriorityTaskWoken ) )

-#define xTaskNotifyAndQueryFromISR( xTaskToNotify, ulValue, eAction, pulPreviousNotificationValue, pxHigherPriorityTaskWoken ) xTaskGenericNotifyFromISR( ( xTaskToNotify ), ( ulValue ), ( eAction ), ( pulPreviousNotificationValue ), ( pxHigherPriorityTaskWoken ) )

-

-/**

- * task. h

- * <PRE>BaseType_t xTaskNotifyWait( uint32_t ulBitsToClearOnEntry, uint32_t ulBitsToClearOnExit, uint32_t *pulNotificationValue, TickType_t xTicksToWait );</pre>

- *

- * configUSE_TASK_NOTIFICATIONS must be undefined or defined as 1 for this

- * function to be available.

- *

- * When configUSE_TASK_NOTIFICATIONS is set to one each task has its own private

- * "notification value", which is a 32-bit unsigned integer (uint32_t).

- *

- * Events can be sent to a task using an intermediary object.  Examples of such

- * objects are queues, semaphores, mutexes and event groups.  Task notifications

- * are a method of sending an event directly to a task without the need for such

- * an intermediary object.

- *

- * A notification sent to a task can optionally perform an action, such as

- * update, overwrite or increment the task's notification value.  In that way

- * task notifications can be used to send data to a task, or be used as light

- * weight and fast binary or counting semaphores.

- *

- * A notification sent to a task will remain pending until it is cleared by the

- * task calling xTaskNotifyWait() or ulTaskNotifyTake().  If the task was

- * already in the Blocked state to wait for a notification when the notification

- * arrives then the task will automatically be removed from the Blocked state

- * (unblocked) and the notification cleared.

- *

- * A task can use xTaskNotifyWait() to [optionally] block to wait for a

- * notification to be pending, or ulTaskNotifyTake() to [optionally] block

- * to wait for its notification value to have a non-zero value.  The task does

- * not consume any CPU time while it is in the Blocked state.

- *

- * See http://www.FreeRTOS.org/RTOS-task-notifications.html for details.

- *

- * @param ulBitsToClearOnEntry Bits that are set in ulBitsToClearOnEntry value

- * will be cleared in the calling task's notification value before the task

- * checks to see if any notifications are pending, and optionally blocks if no

- * notifications are pending.  Setting ulBitsToClearOnEntry to ULONG_MAX (if

- * limits.h is included) or 0xffffffffUL (if limits.h is not included) will have

- * the effect of resetting the task's notification value to 0.  Setting

- * ulBitsToClearOnEntry to 0 will leave the task's notification value unchanged.

- *

- * @param ulBitsToClearOnExit If a notification is pending or received before

- * the calling task exits the xTaskNotifyWait() function then the task's

- * notification value (see the xTaskNotify() API function) is passed out using

- * the pulNotificationValue parameter.  Then any bits that are set in

- * ulBitsToClearOnExit will be cleared in the task's notification value (note

- * *pulNotificationValue is set before any bits are cleared).  Setting

- * ulBitsToClearOnExit to ULONG_MAX (if limits.h is included) or 0xffffffffUL

- * (if limits.h is not included) will have the effect of resetting the task's

- * notification value to 0 before the function exits.  Setting

- * ulBitsToClearOnExit to 0 will leave the task's notification value unchanged

- * when the function exits (in which case the value passed out in

- * pulNotificationValue will match the task's notification value).

- *

- * @param pulNotificationValue Used to pass the task's notification value out

- * of the function.  Note the value passed out will not be effected by the

- * clearing of any bits caused by ulBitsToClearOnExit being non-zero.

- *

- * @param xTicksToWait The maximum amount of time that the task should wait in

- * the Blocked state for a notification to be received, should a notification

- * not already be pending when xTaskNotifyWait() was called.  The task

- * will not consume any processing time while it is in the Blocked state.  This

- * is specified in kernel ticks, the macro pdMS_TO_TICSK( value_in_ms ) can be

- * used to convert a time specified in milliseconds to a time specified in

- * ticks.

- *

- * @return If a notification was received (including notifications that were

- * already pending when xTaskNotifyWait was called) then pdPASS is

- * returned.  Otherwise pdFAIL is returned.

- *

- * \defgroup xTaskNotifyWait xTaskNotifyWait

- * \ingroup TaskNotifications

- */

-BaseType_t xTaskNotifyWait( uint32_t ulBitsToClearOnEntry, uint32_t ulBitsToClearOnExit, uint32_t *pulNotificationValue, TickType_t xTicksToWait ) PRIVILEGED_FUNCTION;

-

-/**

- * task. h

- * <PRE>BaseType_t xTaskNotifyGive( TaskHandle_t xTaskToNotify );</PRE>

- *

- * configUSE_TASK_NOTIFICATIONS must be undefined or defined as 1 for this macro

- * to be available.

- *

- * When configUSE_TASK_NOTIFICATIONS is set to one each task has its own private

- * "notification value", which is a 32-bit unsigned integer (uint32_t).

- *

- * Events can be sent to a task using an intermediary object.  Examples of such

- * objects are queues, semaphores, mutexes and event groups.  Task notifications

- * are a method of sending an event directly to a task without the need for such

- * an intermediary object.

- *

- * A notification sent to a task can optionally perform an action, such as

- * update, overwrite or increment the task's notification value.  In that way

- * task notifications can be used to send data to a task, or be used as light

- * weight and fast binary or counting semaphores.

- *

- * xTaskNotifyGive() is a helper macro intended for use when task notifications

- * are used as light weight and faster binary or counting semaphore equivalents.

- * Actual FreeRTOS semaphores are given using the xSemaphoreGive() API function,

- * the equivalent action that instead uses a task notification is

- * xTaskNotifyGive().

- *

- * When task notifications are being used as a binary or counting semaphore

- * equivalent then the task being notified should wait for the notification

- * using the ulTaskNotificationTake() API function rather than the

- * xTaskNotifyWait() API function.

- *

- * See http://www.FreeRTOS.org/RTOS-task-notifications.html for more details.

- *

- * @param xTaskToNotify The handle of the task being notified.  The handle to a

- * task can be returned from the xTaskCreate() API function used to create the

- * task, and the handle of the currently running task can be obtained by calling

- * xTaskGetCurrentTaskHandle().

- *

- * @return xTaskNotifyGive() is a macro that calls xTaskNotify() with the

- * eAction parameter set to eIncrement - so pdPASS is always returned.

- *

- * \defgroup xTaskNotifyGive xTaskNotifyGive

- * \ingroup TaskNotifications

- */

-#define xTaskNotifyGive( xTaskToNotify ) xTaskGenericNotify( ( xTaskToNotify ), ( 0 ), eIncrement, NULL )

-

-/**

- * task. h

- * <PRE>void vTaskNotifyGiveFromISR( TaskHandle_t xTaskHandle, BaseType_t *pxHigherPriorityTaskWoken );

- *

- * configUSE_TASK_NOTIFICATIONS must be undefined or defined as 1 for this macro

- * to be available.

- *

- * When configUSE_TASK_NOTIFICATIONS is set to one each task has its own private

- * "notification value", which is a 32-bit unsigned integer (uint32_t).

- *

- * A version of xTaskNotifyGive() that can be called from an interrupt service

- * routine (ISR).

- *

- * Events can be sent to a task using an intermediary object.  Examples of such

- * objects are queues, semaphores, mutexes and event groups.  Task notifications

- * are a method of sending an event directly to a task without the need for such

- * an intermediary object.

- *

- * A notification sent to a task can optionally perform an action, such as

- * update, overwrite or increment the task's notification value.  In that way

- * task notifications can be used to send data to a task, or be used as light

- * weight and fast binary or counting semaphores.

- *

- * vTaskNotifyGiveFromISR() is intended for use when task notifications are

- * used as light weight and faster binary or counting semaphore equivalents.

- * Actual FreeRTOS semaphores are given from an ISR using the

- * xSemaphoreGiveFromISR() API function, the equivalent action that instead uses

- * a task notification is vTaskNotifyGiveFromISR().

- *

- * When task notifications are being used as a binary or counting semaphore

- * equivalent then the task being notified should wait for the notification

- * using the ulTaskNotificationTake() API function rather than the

- * xTaskNotifyWait() API function.

- *

- * See http://www.FreeRTOS.org/RTOS-task-notifications.html for more details.

- *

- * @param xTaskToNotify The handle of the task being notified.  The handle to a

- * task can be returned from the xTaskCreate() API function used to create the

- * task, and the handle of the currently running task can be obtained by calling

- * xTaskGetCurrentTaskHandle().

- *

- * @param pxHigherPriorityTaskWoken  vTaskNotifyGiveFromISR() will set

- * *pxHigherPriorityTaskWoken to pdTRUE if sending the notification caused the

- * task to which the notification was sent to leave the Blocked state, and the

- * unblocked task has a priority higher than the currently running task.  If

- * vTaskNotifyGiveFromISR() sets this value to pdTRUE then a context switch

- * should be requested before the interrupt is exited.  How a context switch is

- * requested from an ISR is dependent on the port - see the documentation page

- * for the port in use.

- *

- * \defgroup xTaskNotifyWait xTaskNotifyWait

- * \ingroup TaskNotifications

- */

-void vTaskNotifyGiveFromISR( TaskHandle_t xTaskToNotify, BaseType_t *pxHigherPriorityTaskWoken ) PRIVILEGED_FUNCTION;

-

-/**

- * task. h

- * <PRE>uint32_t ulTaskNotifyTake( BaseType_t xClearCountOnExit, TickType_t xTicksToWait );</pre>

- *

- * configUSE_TASK_NOTIFICATIONS must be undefined or defined as 1 for this

- * function to be available.

- *

- * When configUSE_TASK_NOTIFICATIONS is set to one each task has its own private

- * "notification value", which is a 32-bit unsigned integer (uint32_t).

- *

- * Events can be sent to a task using an intermediary object.  Examples of such

- * objects are queues, semaphores, mutexes and event groups.  Task notifications

- * are a method of sending an event directly to a task without the need for such

- * an intermediary object.

- *

- * A notification sent to a task can optionally perform an action, such as

- * update, overwrite or increment the task's notification value.  In that way

- * task notifications can be used to send data to a task, or be used as light

- * weight and fast binary or counting semaphores.

- *

- * ulTaskNotifyTake() is intended for use when a task notification is used as a

- * faster and lighter weight binary or counting semaphore alternative.  Actual

- * FreeRTOS semaphores are taken using the xSemaphoreTake() API function, the

- * equivalent action that instead uses a task notification is

- * ulTaskNotifyTake().

- *

- * When a task is using its notification value as a binary or counting semaphore

- * other tasks should send notifications to it using the xTaskNotifyGive()

- * macro, or xTaskNotify() function with the eAction parameter set to

- * eIncrement.

- *

- * ulTaskNotifyTake() can either clear the task's notification value to

- * zero on exit, in which case the notification value acts like a binary

- * semaphore, or decrement the task's notification value on exit, in which case

- * the notification value acts like a counting semaphore.

- *

- * A task can use ulTaskNotifyTake() to [optionally] block to wait for a

- * the task's notification value to be non-zero.  The task does not consume any

- * CPU time while it is in the Blocked state.

- *

- * Where as xTaskNotifyWait() will return when a notification is pending,

- * ulTaskNotifyTake() will return when the task's notification value is

- * not zero.

- *

- * See http://www.FreeRTOS.org/RTOS-task-notifications.html for details.

- *

- * @param xClearCountOnExit if xClearCountOnExit is pdFALSE then the task's

- * notification value is decremented when the function exits.  In this way the

- * notification value acts like a counting semaphore.  If xClearCountOnExit is

- * not pdFALSE then the task's notification value is cleared to zero when the

- * function exits.  In this way the notification value acts like a binary

- * semaphore.

- *

- * @param xTicksToWait The maximum amount of time that the task should wait in

- * the Blocked state for the task's notification value to be greater than zero,

- * should the count not already be greater than zero when

- * ulTaskNotifyTake() was called.  The task will not consume any processing

- * time while it is in the Blocked state.  This is specified in kernel ticks,

- * the macro pdMS_TO_TICSK( value_in_ms ) can be used to convert a time

- * specified in milliseconds to a time specified in ticks.

- *

- * @return The task's notification count before it is either cleared to zero or

- * decremented (see the xClearCountOnExit parameter).

- *

- * \defgroup ulTaskNotifyTake ulTaskNotifyTake

- * \ingroup TaskNotifications

- */

-uint32_t ulTaskNotifyTake( BaseType_t xClearCountOnExit, TickType_t xTicksToWait ) PRIVILEGED_FUNCTION;

-

-/*-----------------------------------------------------------

- * SCHEDULER INTERNALS AVAILABLE FOR PORTING PURPOSES

- *----------------------------------------------------------*/

-

-/*

- * THIS FUNCTION MUST NOT BE USED FROM APPLICATION CODE.  IT IS ONLY

- * INTENDED FOR USE WHEN IMPLEMENTING A PORT OF THE SCHEDULER AND IS

- * AN INTERFACE WHICH IS FOR THE EXCLUSIVE USE OF THE SCHEDULER.

- *

- * Called from the real time kernel tick (either preemptive or cooperative),

- * this increments the tick count and checks if any tasks that are blocked

- * for a finite period required removing from a blocked list and placing on

- * a ready list.  If a non-zero value is returned then a context switch is

- * required because either:

- *   + A task was removed from a blocked list because its timeout had expired,

- *     or

- *   + Time slicing is in use and there is a task of equal priority to the

- *     currently running task.

- */

-BaseType_t xTaskIncrementTick( void ) PRIVILEGED_FUNCTION;

-

-/*

- * THIS FUNCTION MUST NOT BE USED FROM APPLICATION CODE.  IT IS AN

- * INTERFACE WHICH IS FOR THE EXCLUSIVE USE OF THE SCHEDULER.

- *

- * THIS FUNCTION MUST BE CALLED WITH INTERRUPTS DISABLED.

- *

- * Removes the calling task from the ready list and places it both

- * on the list of tasks waiting for a particular event, and the

- * list of delayed tasks.  The task will be removed from both lists

- * and replaced on the ready list should either the event occur (and

- * there be no higher priority tasks waiting on the same event) or

- * the delay period expires.

- *

- * The 'unordered' version replaces the event list item value with the

- * xItemValue value, and inserts the list item at the end of the list.

- *

- * The 'ordered' version uses the existing event list item value (which is the

- * owning tasks priority) to insert the list item into the event list is task

- * priority order.

- *

- * @param pxEventList The list containing tasks that are blocked waiting

- * for the event to occur.

- *

- * @param xItemValue The item value to use for the event list item when the

- * event list is not ordered by task priority.

- *

- * @param xTicksToWait The maximum amount of time that the task should wait

- * for the event to occur.  This is specified in kernel ticks,the constant

- * portTICK_PERIOD_MS can be used to convert kernel ticks into a real time

- * period.

- */

-void vTaskPlaceOnEventList( List_t * const pxEventList, const TickType_t xTicksToWait ) PRIVILEGED_FUNCTION;

-void vTaskPlaceOnUnorderedEventList( List_t * pxEventList, const TickType_t xItemValue, const TickType_t xTicksToWait ) PRIVILEGED_FUNCTION;

-

-/*

- * THIS FUNCTION MUST NOT BE USED FROM APPLICATION CODE.  IT IS AN

- * INTERFACE WHICH IS FOR THE EXCLUSIVE USE OF THE SCHEDULER.

- *

- * THIS FUNCTION MUST BE CALLED WITH INTERRUPTS DISABLED.

- *

- * This function performs nearly the same function as vTaskPlaceOnEventList().

- * The difference being that this function does not permit tasks to block

- * indefinitely, whereas vTaskPlaceOnEventList() does.

- *

- */

-void vTaskPlaceOnEventListRestricted( List_t * const pxEventList, const TickType_t xTicksToWait, const BaseType_t xWaitIndefinitely ) PRIVILEGED_FUNCTION;

-

-/*

- * THIS FUNCTION MUST NOT BE USED FROM APPLICATION CODE.  IT IS AN

- * INTERFACE WHICH IS FOR THE EXCLUSIVE USE OF THE SCHEDULER.

- *

- * THIS FUNCTION MUST BE CALLED WITH INTERRUPTS DISABLED.

- *

- * Removes a task from both the specified event list and the list of blocked

- * tasks, and places it on a ready queue.

- *

- * xTaskRemoveFromEventList()/xTaskRemoveFromUnorderedEventList() will be called

- * if either an event occurs to unblock a task, or the block timeout period

- * expires.

- *

- * xTaskRemoveFromEventList() is used when the event list is in task priority

- * order.  It removes the list item from the head of the event list as that will

- * have the highest priority owning task of all the tasks on the event list.

- * xTaskRemoveFromUnorderedEventList() is used when the event list is not

- * ordered and the event list items hold something other than the owning tasks

- * priority.  In this case the event list item value is updated to the value

- * passed in the xItemValue parameter.

- *

- * @return pdTRUE if the task being removed has a higher priority than the task

- * making the call, otherwise pdFALSE.

- */

-BaseType_t xTaskRemoveFromEventList( const List_t * const pxEventList ) PRIVILEGED_FUNCTION;

-BaseType_t xTaskRemoveFromUnorderedEventList( ListItem_t * pxEventListItem, const TickType_t xItemValue ) PRIVILEGED_FUNCTION;

-

-/*

- * THIS FUNCTION MUST NOT BE USED FROM APPLICATION CODE.  IT IS ONLY

- * INTENDED FOR USE WHEN IMPLEMENTING A PORT OF THE SCHEDULER AND IS

- * AN INTERFACE WHICH IS FOR THE EXCLUSIVE USE OF THE SCHEDULER.

- *

- * Sets the pointer to the current TCB to the TCB of the highest priority task

- * that is ready to run.

- */

-void vTaskSwitchContext( void ) PRIVILEGED_FUNCTION;

-

-/*

- * THESE FUNCTIONS MUST NOT BE USED FROM APPLICATION CODE.  THEY ARE USED BY

- * THE EVENT BITS MODULE.

- */

-TickType_t uxTaskResetEventItemValue( void ) PRIVILEGED_FUNCTION;

-

-/*

- * Return the handle of the calling task.

- */

-TaskHandle_t xTaskGetCurrentTaskHandle( void ) PRIVILEGED_FUNCTION;

-

-/*

- * Capture the current time status for future reference.

- */

-void vTaskSetTimeOutState( TimeOut_t * const pxTimeOut ) PRIVILEGED_FUNCTION;

-

-/*

- * Compare the time status now with that previously captured to see if the

- * timeout has expired.

- */

-BaseType_t xTaskCheckForTimeOut( TimeOut_t * const pxTimeOut, TickType_t * const pxTicksToWait ) PRIVILEGED_FUNCTION;

-

-/*

- * Shortcut used by the queue implementation to prevent unnecessary call to

- * taskYIELD();

- */

-void vTaskMissedYield( void ) PRIVILEGED_FUNCTION;

-

-/*

- * Returns the scheduler state as taskSCHEDULER_RUNNING,

- * taskSCHEDULER_NOT_STARTED or taskSCHEDULER_SUSPENDED.

- */

-BaseType_t xTaskGetSchedulerState( void ) PRIVILEGED_FUNCTION;

-

-/*

- * Raises the priority of the mutex holder to that of the calling task should

- * the mutex holder have a priority less than the calling task.

- */

-void vTaskPriorityInherit( TaskHandle_t const pxMutexHolder ) PRIVILEGED_FUNCTION;

-

-/*

- * Set the priority of a task back to its proper priority in the case that it

- * inherited a higher priority while it was holding a semaphore.

- */

-BaseType_t xTaskPriorityDisinherit( TaskHandle_t const pxMutexHolder ) PRIVILEGED_FUNCTION;

-

-/*

- * Generic version of the task creation function which is in turn called by the

- * xTaskCreate() and xTaskCreateRestricted() macros.

- */

-BaseType_t xTaskGenericCreate( TaskFunction_t pxTaskCode, const char * const pcName, const uint16_t usStackDepth, void * const pvParameters, UBaseType_t uxPriority, TaskHandle_t * const pxCreatedTask, StackType_t * const puxStackBuffer, const MemoryRegion_t * const xRegions ) PRIVILEGED_FUNCTION; /*lint !e971 Unqualified char types are allowed for strings and single characters only. */

-

-/*

- * Get the uxTCBNumber assigned to the task referenced by the xTask parameter.

- */

-UBaseType_t uxTaskGetTaskNumber( TaskHandle_t xTask ) PRIVILEGED_FUNCTION;

-

-/*

- * Set the uxTaskNumber of the task referenced by the xTask parameter to

- * uxHandle.

- */

-void vTaskSetTaskNumber( TaskHandle_t xTask, const UBaseType_t uxHandle ) PRIVILEGED_FUNCTION;

-

-/*

- * Only available when configUSE_TICKLESS_IDLE is set to 1.

- * If tickless mode is being used, or a low power mode is implemented, then

- * the tick interrupt will not execute during idle periods.  When this is the

- * case, the tick count value maintained by the scheduler needs to be kept up

- * to date with the actual execution time by being skipped forward by a time

- * equal to the idle period.

- */

-void vTaskStepTick( const TickType_t xTicksToJump ) PRIVILEGED_FUNCTION;

-

-/*

- * Only avilable when configUSE_TICKLESS_IDLE is set to 1.

- * Provided for use within portSUPPRESS_TICKS_AND_SLEEP() to allow the port

- * specific sleep function to determine if it is ok to proceed with the sleep,

- * and if it is ok to proceed, if it is ok to sleep indefinitely.

- *

- * This function is necessary because portSUPPRESS_TICKS_AND_SLEEP() is only

- * called with the scheduler suspended, not from within a critical section.  It

- * is therefore possible for an interrupt to request a context switch between

- * portSUPPRESS_TICKS_AND_SLEEP() and the low power mode actually being

- * entered.  eTaskConfirmSleepModeStatus() should be called from a short

- * critical section between the timer being stopped and the sleep mode being

- * entered to ensure it is ok to proceed into the sleep mode.

- */

-eSleepModeStatus eTaskConfirmSleepModeStatus( void ) PRIVILEGED_FUNCTION;

-

-/*

- * For internal use only.  Increment the mutex held count when a mutex is

- * taken and return the handle of the task that has taken the mutex.

- */

-void *pvTaskIncrementMutexHeldCount( void ) PRIVILEGED_FUNCTION;

-

-#ifdef __cplusplus

-}

-#endif

-#endif /* INC_TASK_H */

-

-

-

diff --git a/FreeRTOS/Demo/Xilinx_FreeRTOS_BSP/repo/bsp/freertos822_xilinx_v1_0/src/Source/include/timers.h b/FreeRTOS/Demo/Xilinx_FreeRTOS_BSP/repo/bsp/freertos822_xilinx_v1_0/src/Source/include/timers.h
deleted file mode 100644
index 0bbbb02..0000000
--- a/FreeRTOS/Demo/Xilinx_FreeRTOS_BSP/repo/bsp/freertos822_xilinx_v1_0/src/Source/include/timers.h
+++ /dev/null
@@ -1,1146 +0,0 @@
-/*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

-    All rights reserved

-

-    VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

-

-    This file is part of the FreeRTOS distribution.

-

-    FreeRTOS is free software; you can redistribute it and/or modify it under

-    the terms of the GNU General Public License (version 2) as published by the

-    Free Software Foundation >>!AND MODIFIED BY!<< the FreeRTOS exception.

-

-    ***************************************************************************

-    >>!   NOTE: The modification to the GPL is included to allow you to     !<<

-    >>!   distribute a combined work that includes FreeRTOS without being   !<<

-    >>!   obliged to provide the source code for proprietary components     !<<

-    >>!   outside of the FreeRTOS kernel.                                   !<<

-    ***************************************************************************

-

-    FreeRTOS is distributed in the hope that it will be useful, but WITHOUT ANY

-    WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS

-    FOR A PARTICULAR PURPOSE.  Full license text is available on the following

-    link: http://www.freertos.org/a00114.html

-

-    ***************************************************************************

-     *                                                                       *

-     *    FreeRTOS provides completely free yet professionally developed,    *

-     *    robust, strictly quality controlled, supported, and cross          *

-     *    platform software that is more than just the market leader, it     *

-     *    is the industry's de facto standard.                               *

-     *                                                                       *

-     *    Help yourself get started quickly while simultaneously helping     *

-     *    to support the FreeRTOS project by purchasing a FreeRTOS           *

-     *    tutorial book, reference manual, or both:                          *

-     *    http://www.FreeRTOS.org/Documentation                              *

-     *                                                                       *

-    ***************************************************************************

-

-    http://www.FreeRTOS.org/FAQHelp.html - Having a problem?  Start by reading

-    the FAQ page "My application does not run, what could be wrong?".  Have you

-    defined configASSERT()?

-

-    http://www.FreeRTOS.org/support - In return for receiving this top quality

-    embedded software for free we request you assist our global community by

-    participating in the support forum.

-

-    http://www.FreeRTOS.org/training - Investing in training allows your team to

-    be as productive as possible as early as possible.  Now you can receive

-    FreeRTOS training directly from Richard Barry, CEO of Real Time Engineers

-    Ltd, and the world's leading authority on the world's leading RTOS.

-

-    http://www.FreeRTOS.org/plus - A selection of FreeRTOS ecosystem products,

-    including FreeRTOS+Trace - an indispensable productivity tool, a DOS

-    compatible FAT file system, and our tiny thread aware UDP/IP stack.

-

-    http://www.FreeRTOS.org/labs - Where new FreeRTOS products go to incubate.

-    Come and try FreeRTOS+TCP, our new open source TCP/IP stack for FreeRTOS.

-

-    http://www.OpenRTOS.com - Real Time Engineers ltd. license FreeRTOS to High

-    Integrity Systems ltd. to sell under the OpenRTOS brand.  Low cost OpenRTOS

-    licenses offer ticketed support, indemnification and commercial middleware.

-

-    http://www.SafeRTOS.com - High Integrity Systems also provide a safety

-    engineered and independently SIL3 certified version for use in safety and

-    mission critical applications that require provable dependability.

-

-    1 tab == 4 spaces!

-*/

-

-

-#ifndef TIMERS_H

-#define TIMERS_H

-

-#ifndef INC_FREERTOS_H

-	#error "include FreeRTOS.h must appear in source files before include timers.h"

-#endif

-

-/*lint -e537 This headers are only multiply included if the application code

-happens to also be including task.h. */

-#include "task.h"

-/*lint +e537 */

-

-#ifdef __cplusplus

-extern "C" {

-#endif

-

-/*-----------------------------------------------------------

- * MACROS AND DEFINITIONS

- *----------------------------------------------------------*/

-

-/* IDs for commands that can be sent/received on the timer queue.  These are to

-be used solely through the macros that make up the public software timer API,

-as defined below.  The commands that are sent from interrupts must use the

-highest numbers as tmrFIRST_FROM_ISR_COMMAND is used to determine if the task

-or interrupt version of the queue send function should be used. */

-#define tmrCOMMAND_EXECUTE_CALLBACK_FROM_ISR 	( ( BaseType_t ) -2 )

-#define tmrCOMMAND_EXECUTE_CALLBACK				( ( BaseType_t ) -1 )

-#define tmrCOMMAND_START_DONT_TRACE				( ( BaseType_t ) 0 )

-#define tmrCOMMAND_START					    ( ( BaseType_t ) 1 )

-#define tmrCOMMAND_RESET						( ( BaseType_t ) 2 )

-#define tmrCOMMAND_STOP							( ( BaseType_t ) 3 )

-#define tmrCOMMAND_CHANGE_PERIOD				( ( BaseType_t ) 4 )

-#define tmrCOMMAND_DELETE						( ( BaseType_t ) 5 )

-

-#define tmrFIRST_FROM_ISR_COMMAND				( ( BaseType_t ) 6 )

-#define tmrCOMMAND_START_FROM_ISR				( ( BaseType_t ) 6 )

-#define tmrCOMMAND_RESET_FROM_ISR				( ( BaseType_t ) 7 )

-#define tmrCOMMAND_STOP_FROM_ISR				( ( BaseType_t ) 8 )

-#define tmrCOMMAND_CHANGE_PERIOD_FROM_ISR		( ( BaseType_t ) 9 )

-

-

-/**

- * Type by which software timers are referenced.  For example, a call to

- * xTimerCreate() returns an TimerHandle_t variable that can then be used to

- * reference the subject timer in calls to other software timer API functions

- * (for example, xTimerStart(), xTimerReset(), etc.).

- */

-typedef void * TimerHandle_t;

-

-/*

- * Defines the prototype to which timer callback functions must conform.

- */

-typedef void (*TimerCallbackFunction_t)( TimerHandle_t xTimer );

-

-/*

- * Defines the prototype to which functions used with the

- * xTimerPendFunctionCallFromISR() function must conform.

- */

-typedef void (*PendedFunction_t)( void *, uint32_t );

-

-/**

- * TimerHandle_t xTimerCreate( 	const char * const pcTimerName,

- * 								TickType_t xTimerPeriodInTicks,

- * 								UBaseType_t uxAutoReload,

- * 								void * pvTimerID,

- * 								TimerCallbackFunction_t pxCallbackFunction );

- *

- * Creates a new software timer instance.  This allocates the storage required

- * by the new timer, initialises the new timers internal state, and returns a

- * handle by which the new timer can be referenced.

- *

- * Timers are created in the dormant state.  The xTimerStart(), xTimerReset(),

- * xTimerStartFromISR(), xTimerResetFromISR(), xTimerChangePeriod() and

- * xTimerChangePeriodFromISR() API functions can all be used to transition a

- * timer into the active state.

- *

- * @param pcTimerName A text name that is assigned to the timer.  This is done

- * purely to assist debugging.  The kernel itself only ever references a timer

- * by its handle, and never by its name.

- *

- * @param xTimerPeriodInTicks The timer period.  The time is defined in tick

- * periods so the constant portTICK_PERIOD_MS can be used to convert a time that

- * has been specified in milliseconds.  For example, if the timer must expire

- * after 100 ticks, then xTimerPeriodInTicks should be set to 100.

- * Alternatively, if the timer must expire after 500ms, then xPeriod can be set

- * to ( 500 / portTICK_PERIOD_MS ) provided configTICK_RATE_HZ is less than or

- * equal to 1000.

- *

- * @param uxAutoReload If uxAutoReload is set to pdTRUE then the timer will

- * expire repeatedly with a frequency set by the xTimerPeriodInTicks parameter.

- * If uxAutoReload is set to pdFALSE then the timer will be a one-shot timer and

- * enter the dormant state after it expires.

- *

- * @param pvTimerID An identifier that is assigned to the timer being created.

- * Typically this would be used in the timer callback function to identify which

- * timer expired when the same callback function is assigned to more than one

- * timer.

- *

- * @param pxCallbackFunction The function to call when the timer expires.

- * Callback functions must have the prototype defined by TimerCallbackFunction_t,

- * which is	"void vCallbackFunction( TimerHandle_t xTimer );".

- *

- * @return If the timer is successfully created then a handle to the newly

- * created timer is returned.  If the timer cannot be created (because either

- * there is insufficient FreeRTOS heap remaining to allocate the timer

- * structures, or the timer period was set to 0) then NULL is returned.

- *

- * Example usage:

- * @verbatim

- * #define NUM_TIMERS 5

- *

- * // An array to hold handles to the created timers.

- * TimerHandle_t xTimers[ NUM_TIMERS ];

- *

- * // An array to hold a count of the number of times each timer expires.

- * int32_t lExpireCounters[ NUM_TIMERS ] = { 0 };

- *

- * // Define a callback function that will be used by multiple timer instances.

- * // The callback function does nothing but count the number of times the

- * // associated timer expires, and stop the timer once the timer has expired

- * // 10 times.

- * void vTimerCallback( TimerHandle_t pxTimer )

- * {

- * int32_t lArrayIndex;

- * const int32_t xMaxExpiryCountBeforeStopping = 10;

- *

- * 	   // Optionally do something if the pxTimer parameter is NULL.

- * 	   configASSERT( pxTimer );

- *

- *     // Which timer expired?

- *     lArrayIndex = ( int32_t ) pvTimerGetTimerID( pxTimer );

- *

- *     // Increment the number of times that pxTimer has expired.

- *     lExpireCounters[ lArrayIndex ] += 1;

- *

- *     // If the timer has expired 10 times then stop it from running.

- *     if( lExpireCounters[ lArrayIndex ] == xMaxExpiryCountBeforeStopping )

- *     {

- *         // Do not use a block time if calling a timer API function from a

- *         // timer callback function, as doing so could cause a deadlock!

- *         xTimerStop( pxTimer, 0 );

- *     }

- * }

- *

- * void main( void )

- * {

- * int32_t x;

- *

- *     // Create then start some timers.  Starting the timers before the scheduler

- *     // has been started means the timers will start running immediately that

- *     // the scheduler starts.

- *     for( x = 0; x < NUM_TIMERS; x++ )

- *     {

- *         xTimers[ x ] = xTimerCreate(    "Timer",       // Just a text name, not used by the kernel.

- *                                         ( 100 * x ),   // The timer period in ticks.

- *                                         pdTRUE,        // The timers will auto-reload themselves when they expire.

- *                                         ( void * ) x,  // Assign each timer a unique id equal to its array index.

- *                                         vTimerCallback // Each timer calls the same callback when it expires.

- *                                     );

- *

- *         if( xTimers[ x ] == NULL )

- *         {

- *             // The timer was not created.

- *         }

- *         else

- *         {

- *             // Start the timer.  No block time is specified, and even if one was

- *             // it would be ignored because the scheduler has not yet been

- *             // started.

- *             if( xTimerStart( xTimers[ x ], 0 ) != pdPASS )

- *             {

- *                 // The timer could not be set into the Active state.

- *             }

- *         }

- *     }

- *

- *     // ...

- *     // Create tasks here.

- *     // ...

- *

- *     // Starting the scheduler will start the timers running as they have already

- *     // been set into the active state.

- *     xTaskStartScheduler();

- *

- *     // Should not reach here.

- *     for( ;; );

- * }

- * @endverbatim

- */

-TimerHandle_t xTimerCreate( const char * const pcTimerName, const TickType_t xTimerPeriodInTicks, const UBaseType_t uxAutoReload, void * const pvTimerID, TimerCallbackFunction_t pxCallbackFunction ) PRIVILEGED_FUNCTION; /*lint !e971 Unqualified char types are allowed for strings and single characters only. */

-

-/**

- * void *pvTimerGetTimerID( TimerHandle_t xTimer );

- *

- * Returns the ID assigned to the timer.

- *

- * IDs are assigned to timers using the pvTimerID parameter of the call to

- * xTimerCreated() that was used to create the timer, and by calling the

- * vTimerSetTimerID() API function.

- *

- * If the same callback function is assigned to multiple timers then the timer

- * ID can be used as time specific (timer local) storage.

- *

- * @param xTimer The timer being queried.

- *

- * @return The ID assigned to the timer being queried.

- *

- * Example usage:

- *

- * See the xTimerCreate() API function example usage scenario.

- */

-void *pvTimerGetTimerID( const TimerHandle_t xTimer ) PRIVILEGED_FUNCTION;

-

-/**

- * void vTimerSetTimerID( TimerHandle_t xTimer, void *pvNewID );

- *

- * Sets the ID assigned to the timer.

- *

- * IDs are assigned to timers using the pvTimerID parameter of the call to

- * xTimerCreated() that was used to create the timer.

- *

- * If the same callback function is assigned to multiple timers then the timer

- * ID can be used as time specific (timer local) storage.

- *

- * @param xTimer The timer being updated.

- *

- * @param pvNewID The ID to assign to the timer.

- *

- * Example usage:

- *

- * See the xTimerCreate() API function example usage scenario.

- */

-void vTimerSetTimerID( TimerHandle_t xTimer, void *pvNewID ) PRIVILEGED_FUNCTION;

-

-/**

- * BaseType_t xTimerIsTimerActive( TimerHandle_t xTimer );

- *

- * Queries a timer to see if it is active or dormant.

- *

- * A timer will be dormant if:

- *     1) It has been created but not started, or

- *     2) It is an expired one-shot timer that has not been restarted.

- *

- * Timers are created in the dormant state.  The xTimerStart(), xTimerReset(),

- * xTimerStartFromISR(), xTimerResetFromISR(), xTimerChangePeriod() and

- * xTimerChangePeriodFromISR() API functions can all be used to transition a timer into the

- * active state.

- *

- * @param xTimer The timer being queried.

- *

- * @return pdFALSE will be returned if the timer is dormant.  A value other than

- * pdFALSE will be returned if the timer is active.

- *

- * Example usage:

- * @verbatim

- * // This function assumes xTimer has already been created.

- * void vAFunction( TimerHandle_t xTimer )

- * {

- *     if( xTimerIsTimerActive( xTimer ) != pdFALSE ) // or more simply and equivalently "if( xTimerIsTimerActive( xTimer ) )"

- *     {

- *         // xTimer is active, do something.

- *     }

- *     else

- *     {

- *         // xTimer is not active, do something else.

- *     }

- * }

- * @endverbatim

- */

-BaseType_t xTimerIsTimerActive( TimerHandle_t xTimer ) PRIVILEGED_FUNCTION;

-

-/**

- * TaskHandle_t xTimerGetTimerDaemonTaskHandle( void );

- *

- * xTimerGetTimerDaemonTaskHandle() is only available if

- * INCLUDE_xTimerGetTimerDaemonTaskHandle is set to 1 in FreeRTOSConfig.h.

- *

- * Simply returns the handle of the timer service/daemon task.  It it not valid

- * to call xTimerGetTimerDaemonTaskHandle() before the scheduler has been started.

- */

-TaskHandle_t xTimerGetTimerDaemonTaskHandle( void ) PRIVILEGED_FUNCTION;

-

-/**

- * BaseType_t xTimerStart( TimerHandle_t xTimer, TickType_t xTicksToWait );

- *

- * Timer functionality is provided by a timer service/daemon task.  Many of the

- * public FreeRTOS timer API functions send commands to the timer service task

- * through a queue called the timer command queue.  The timer command queue is

- * private to the kernel itself and is not directly accessible to application

- * code.  The length of the timer command queue is set by the

- * configTIMER_QUEUE_LENGTH configuration constant.

- *

- * xTimerStart() starts a timer that was previously created using the

- * xTimerCreate() API function.  If the timer had already been started and was

- * already in the active state, then xTimerStart() has equivalent functionality

- * to the xTimerReset() API function.

- *

- * Starting a timer ensures the timer is in the active state.  If the timer

- * is not stopped, deleted, or reset in the mean time, the callback function

- * associated with the timer will get called 'n' ticks after xTimerStart() was

- * called, where 'n' is the timers defined period.

- *

- * It is valid to call xTimerStart() before the scheduler has been started, but

- * when this is done the timer will not actually start until the scheduler is

- * started, and the timers expiry time will be relative to when the scheduler is

- * started, not relative to when xTimerStart() was called.

- *

- * The configUSE_TIMERS configuration constant must be set to 1 for xTimerStart()

- * to be available.

- *

- * @param xTimer The handle of the timer being started/restarted.

- *

- * @param xTicksToWait Specifies the time, in ticks, that the calling task should

- * be held in the Blocked state to wait for the start command to be successfully

- * sent to the timer command queue, should the queue already be full when

- * xTimerStart() was called.  xTicksToWait is ignored if xTimerStart() is called

- * before the scheduler is started.

- *

- * @return pdFAIL will be returned if the start command could not be sent to

- * the timer command queue even after xTicksToWait ticks had passed.  pdPASS will

- * be returned if the command was successfully sent to the timer command queue.

- * When the command is actually processed will depend on the priority of the

- * timer service/daemon task relative to other tasks in the system, although the

- * timers expiry time is relative to when xTimerStart() is actually called.  The

- * timer service/daemon task priority is set by the configTIMER_TASK_PRIORITY

- * configuration constant.

- *

- * Example usage:

- *

- * See the xTimerCreate() API function example usage scenario.

- *

- */

-#define xTimerStart( xTimer, xTicksToWait ) xTimerGenericCommand( ( xTimer ), tmrCOMMAND_START, ( xTaskGetTickCount() ), NULL, ( xTicksToWait ) )

-

-/**

- * BaseType_t xTimerStop( TimerHandle_t xTimer, TickType_t xTicksToWait );

- *

- * Timer functionality is provided by a timer service/daemon task.  Many of the

- * public FreeRTOS timer API functions send commands to the timer service task

- * through a queue called the timer command queue.  The timer command queue is

- * private to the kernel itself and is not directly accessible to application

- * code.  The length of the timer command queue is set by the

- * configTIMER_QUEUE_LENGTH configuration constant.

- *

- * xTimerStop() stops a timer that was previously started using either of the

- * The xTimerStart(), xTimerReset(), xTimerStartFromISR(), xTimerResetFromISR(),

- * xTimerChangePeriod() or xTimerChangePeriodFromISR() API functions.

- *

- * Stopping a timer ensures the timer is not in the active state.

- *

- * The configUSE_TIMERS configuration constant must be set to 1 for xTimerStop()

- * to be available.

- *

- * @param xTimer The handle of the timer being stopped.

- *

- * @param xTicksToWait Specifies the time, in ticks, that the calling task should

- * be held in the Blocked state to wait for the stop command to be successfully

- * sent to the timer command queue, should the queue already be full when

- * xTimerStop() was called.  xTicksToWait is ignored if xTimerStop() is called

- * before the scheduler is started.

- *

- * @return pdFAIL will be returned if the stop command could not be sent to

- * the timer command queue even after xTicksToWait ticks had passed.  pdPASS will

- * be returned if the command was successfully sent to the timer command queue.

- * When the command is actually processed will depend on the priority of the

- * timer service/daemon task relative to other tasks in the system.  The timer

- * service/daemon task priority is set by the configTIMER_TASK_PRIORITY

- * configuration constant.

- *

- * Example usage:

- *

- * See the xTimerCreate() API function example usage scenario.

- *

- */

-#define xTimerStop( xTimer, xTicksToWait ) xTimerGenericCommand( ( xTimer ), tmrCOMMAND_STOP, 0U, NULL, ( xTicksToWait ) )

-

-/**

- * BaseType_t xTimerChangePeriod( 	TimerHandle_t xTimer,

- *										TickType_t xNewPeriod,

- *										TickType_t xTicksToWait );

- *

- * Timer functionality is provided by a timer service/daemon task.  Many of the

- * public FreeRTOS timer API functions send commands to the timer service task

- * through a queue called the timer command queue.  The timer command queue is

- * private to the kernel itself and is not directly accessible to application

- * code.  The length of the timer command queue is set by the

- * configTIMER_QUEUE_LENGTH configuration constant.

- *

- * xTimerChangePeriod() changes the period of a timer that was previously

- * created using the xTimerCreate() API function.

- *

- * xTimerChangePeriod() can be called to change the period of an active or

- * dormant state timer.

- *

- * The configUSE_TIMERS configuration constant must be set to 1 for

- * xTimerChangePeriod() to be available.

- *

- * @param xTimer The handle of the timer that is having its period changed.

- *

- * @param xNewPeriod The new period for xTimer. Timer periods are specified in

- * tick periods, so the constant portTICK_PERIOD_MS can be used to convert a time

- * that has been specified in milliseconds.  For example, if the timer must

- * expire after 100 ticks, then xNewPeriod should be set to 100.  Alternatively,

- * if the timer must expire after 500ms, then xNewPeriod can be set to

- * ( 500 / portTICK_PERIOD_MS ) provided configTICK_RATE_HZ is less than

- * or equal to 1000.

- *

- * @param xTicksToWait Specifies the time, in ticks, that the calling task should

- * be held in the Blocked state to wait for the change period command to be

- * successfully sent to the timer command queue, should the queue already be

- * full when xTimerChangePeriod() was called.  xTicksToWait is ignored if

- * xTimerChangePeriod() is called before the scheduler is started.

- *

- * @return pdFAIL will be returned if the change period command could not be

- * sent to the timer command queue even after xTicksToWait ticks had passed.

- * pdPASS will be returned if the command was successfully sent to the timer

- * command queue.  When the command is actually processed will depend on the

- * priority of the timer service/daemon task relative to other tasks in the

- * system.  The timer service/daemon task priority is set by the

- * configTIMER_TASK_PRIORITY configuration constant.

- *

- * Example usage:

- * @verbatim

- * // This function assumes xTimer has already been created.  If the timer

- * // referenced by xTimer is already active when it is called, then the timer

- * // is deleted.  If the timer referenced by xTimer is not active when it is

- * // called, then the period of the timer is set to 500ms and the timer is

- * // started.

- * void vAFunction( TimerHandle_t xTimer )

- * {

- *     if( xTimerIsTimerActive( xTimer ) != pdFALSE ) // or more simply and equivalently "if( xTimerIsTimerActive( xTimer ) )"

- *     {

- *         // xTimer is already active - delete it.

- *         xTimerDelete( xTimer );

- *     }

- *     else

- *     {

- *         // xTimer is not active, change its period to 500ms.  This will also

- *         // cause the timer to start.  Block for a maximum of 100 ticks if the

- *         // change period command cannot immediately be sent to the timer

- *         // command queue.

- *         if( xTimerChangePeriod( xTimer, 500 / portTICK_PERIOD_MS, 100 ) == pdPASS )

- *         {

- *             // The command was successfully sent.

- *         }

- *         else

- *         {

- *             // The command could not be sent, even after waiting for 100 ticks

- *             // to pass.  Take appropriate action here.

- *         }

- *     }

- * }

- * @endverbatim

- */

- #define xTimerChangePeriod( xTimer, xNewPeriod, xTicksToWait ) xTimerGenericCommand( ( xTimer ), tmrCOMMAND_CHANGE_PERIOD, ( xNewPeriod ), NULL, ( xTicksToWait ) )

-

-/**

- * BaseType_t xTimerDelete( TimerHandle_t xTimer, TickType_t xTicksToWait );

- *

- * Timer functionality is provided by a timer service/daemon task.  Many of the

- * public FreeRTOS timer API functions send commands to the timer service task

- * through a queue called the timer command queue.  The timer command queue is

- * private to the kernel itself and is not directly accessible to application

- * code.  The length of the timer command queue is set by the

- * configTIMER_QUEUE_LENGTH configuration constant.

- *

- * xTimerDelete() deletes a timer that was previously created using the

- * xTimerCreate() API function.

- *

- * The configUSE_TIMERS configuration constant must be set to 1 for

- * xTimerDelete() to be available.

- *

- * @param xTimer The handle of the timer being deleted.

- *

- * @param xTicksToWait Specifies the time, in ticks, that the calling task should

- * be held in the Blocked state to wait for the delete command to be

- * successfully sent to the timer command queue, should the queue already be

- * full when xTimerDelete() was called.  xTicksToWait is ignored if xTimerDelete()

- * is called before the scheduler is started.

- *

- * @return pdFAIL will be returned if the delete command could not be sent to

- * the timer command queue even after xTicksToWait ticks had passed.  pdPASS will

- * be returned if the command was successfully sent to the timer command queue.

- * When the command is actually processed will depend on the priority of the

- * timer service/daemon task relative to other tasks in the system.  The timer

- * service/daemon task priority is set by the configTIMER_TASK_PRIORITY

- * configuration constant.

- *

- * Example usage:

- *

- * See the xTimerChangePeriod() API function example usage scenario.

- */

-#define xTimerDelete( xTimer, xTicksToWait ) xTimerGenericCommand( ( xTimer ), tmrCOMMAND_DELETE, 0U, NULL, ( xTicksToWait ) )

-

-/**

- * BaseType_t xTimerReset( TimerHandle_t xTimer, TickType_t xTicksToWait );

- *

- * Timer functionality is provided by a timer service/daemon task.  Many of the

- * public FreeRTOS timer API functions send commands to the timer service task

- * through a queue called the timer command queue.  The timer command queue is

- * private to the kernel itself and is not directly accessible to application

- * code.  The length of the timer command queue is set by the

- * configTIMER_QUEUE_LENGTH configuration constant.

- *

- * xTimerReset() re-starts a timer that was previously created using the

- * xTimerCreate() API function.  If the timer had already been started and was

- * already in the active state, then xTimerReset() will cause the timer to

- * re-evaluate its expiry time so that it is relative to when xTimerReset() was

- * called.  If the timer was in the dormant state then xTimerReset() has

- * equivalent functionality to the xTimerStart() API function.

- *

- * Resetting a timer ensures the timer is in the active state.  If the timer

- * is not stopped, deleted, or reset in the mean time, the callback function

- * associated with the timer will get called 'n' ticks after xTimerReset() was

- * called, where 'n' is the timers defined period.

- *

- * It is valid to call xTimerReset() before the scheduler has been started, but

- * when this is done the timer will not actually start until the scheduler is

- * started, and the timers expiry time will be relative to when the scheduler is

- * started, not relative to when xTimerReset() was called.

- *

- * The configUSE_TIMERS configuration constant must be set to 1 for xTimerReset()

- * to be available.

- *

- * @param xTimer The handle of the timer being reset/started/restarted.

- *

- * @param xTicksToWait Specifies the time, in ticks, that the calling task should

- * be held in the Blocked state to wait for the reset command to be successfully

- * sent to the timer command queue, should the queue already be full when

- * xTimerReset() was called.  xTicksToWait is ignored if xTimerReset() is called

- * before the scheduler is started.

- *

- * @return pdFAIL will be returned if the reset command could not be sent to

- * the timer command queue even after xTicksToWait ticks had passed.  pdPASS will

- * be returned if the command was successfully sent to the timer command queue.

- * When the command is actually processed will depend on the priority of the

- * timer service/daemon task relative to other tasks in the system, although the

- * timers expiry time is relative to when xTimerStart() is actually called.  The

- * timer service/daemon task priority is set by the configTIMER_TASK_PRIORITY

- * configuration constant.

- *

- * Example usage:

- * @verbatim

- * // When a key is pressed, an LCD back-light is switched on.  If 5 seconds pass

- * // without a key being pressed, then the LCD back-light is switched off.  In

- * // this case, the timer is a one-shot timer.

- *

- * TimerHandle_t xBacklightTimer = NULL;

- *

- * // The callback function assigned to the one-shot timer.  In this case the

- * // parameter is not used.

- * void vBacklightTimerCallback( TimerHandle_t pxTimer )

- * {

- *     // The timer expired, therefore 5 seconds must have passed since a key

- *     // was pressed.  Switch off the LCD back-light.

- *     vSetBacklightState( BACKLIGHT_OFF );

- * }

- *

- * // The key press event handler.

- * void vKeyPressEventHandler( char cKey )

- * {

- *     // Ensure the LCD back-light is on, then reset the timer that is

- *     // responsible for turning the back-light off after 5 seconds of

- *     // key inactivity.  Wait 10 ticks for the command to be successfully sent

- *     // if it cannot be sent immediately.

- *     vSetBacklightState( BACKLIGHT_ON );

- *     if( xTimerReset( xBacklightTimer, 100 ) != pdPASS )

- *     {

- *         // The reset command was not executed successfully.  Take appropriate

- *         // action here.

- *     }

- *

- *     // Perform the rest of the key processing here.

- * }

- *

- * void main( void )

- * {

- * int32_t x;

- *

- *     // Create then start the one-shot timer that is responsible for turning

- *     // the back-light off if no keys are pressed within a 5 second period.

- *     xBacklightTimer = xTimerCreate( "BacklightTimer",           // Just a text name, not used by the kernel.

- *                                     ( 5000 / portTICK_PERIOD_MS), // The timer period in ticks.

- *                                     pdFALSE,                    // The timer is a one-shot timer.

- *                                     0,                          // The id is not used by the callback so can take any value.

- *                                     vBacklightTimerCallback     // The callback function that switches the LCD back-light off.

- *                                   );

- *

- *     if( xBacklightTimer == NULL )

- *     {

- *         // The timer was not created.

- *     }

- *     else

- *     {

- *         // Start the timer.  No block time is specified, and even if one was

- *         // it would be ignored because the scheduler has not yet been

- *         // started.

- *         if( xTimerStart( xBacklightTimer, 0 ) != pdPASS )

- *         {

- *             // The timer could not be set into the Active state.

- *         }

- *     }

- *

- *     // ...

- *     // Create tasks here.

- *     // ...

- *

- *     // Starting the scheduler will start the timer running as it has already

- *     // been set into the active state.

- *     xTaskStartScheduler();

- *

- *     // Should not reach here.

- *     for( ;; );

- * }

- * @endverbatim

- */

-#define xTimerReset( xTimer, xTicksToWait ) xTimerGenericCommand( ( xTimer ), tmrCOMMAND_RESET, ( xTaskGetTickCount() ), NULL, ( xTicksToWait ) )

-

-/**

- * BaseType_t xTimerStartFromISR( 	TimerHandle_t xTimer,

- *									BaseType_t *pxHigherPriorityTaskWoken );

- *

- * A version of xTimerStart() that can be called from an interrupt service

- * routine.

- *

- * @param xTimer The handle of the timer being started/restarted.

- *

- * @param pxHigherPriorityTaskWoken The timer service/daemon task spends most

- * of its time in the Blocked state, waiting for messages to arrive on the timer

- * command queue.  Calling xTimerStartFromISR() writes a message to the timer

- * command queue, so has the potential to transition the timer service/daemon

- * task out of the Blocked state.  If calling xTimerStartFromISR() causes the

- * timer service/daemon task to leave the Blocked state, and the timer service/

- * daemon task has a priority equal to or greater than the currently executing

- * task (the task that was interrupted), then *pxHigherPriorityTaskWoken will

- * get set to pdTRUE internally within the xTimerStartFromISR() function.  If

- * xTimerStartFromISR() sets this value to pdTRUE then a context switch should

- * be performed before the interrupt exits.

- *

- * @return pdFAIL will be returned if the start command could not be sent to

- * the timer command queue.  pdPASS will be returned if the command was

- * successfully sent to the timer command queue.  When the command is actually

- * processed will depend on the priority of the timer service/daemon task

- * relative to other tasks in the system, although the timers expiry time is

- * relative to when xTimerStartFromISR() is actually called.  The timer

- * service/daemon task priority is set by the configTIMER_TASK_PRIORITY

- * configuration constant.

- *

- * Example usage:

- * @verbatim

- * // This scenario assumes xBacklightTimer has already been created.  When a

- * // key is pressed, an LCD back-light is switched on.  If 5 seconds pass

- * // without a key being pressed, then the LCD back-light is switched off.  In

- * // this case, the timer is a one-shot timer, and unlike the example given for

- * // the xTimerReset() function, the key press event handler is an interrupt

- * // service routine.

- *

- * // The callback function assigned to the one-shot timer.  In this case the

- * // parameter is not used.

- * void vBacklightTimerCallback( TimerHandle_t pxTimer )

- * {

- *     // The timer expired, therefore 5 seconds must have passed since a key

- *     // was pressed.  Switch off the LCD back-light.

- *     vSetBacklightState( BACKLIGHT_OFF );

- * }

- *

- * // The key press interrupt service routine.

- * void vKeyPressEventInterruptHandler( void )

- * {

- * BaseType_t xHigherPriorityTaskWoken = pdFALSE;

- *

- *     // Ensure the LCD back-light is on, then restart the timer that is

- *     // responsible for turning the back-light off after 5 seconds of

- *     // key inactivity.  This is an interrupt service routine so can only

- *     // call FreeRTOS API functions that end in "FromISR".

- *     vSetBacklightState( BACKLIGHT_ON );

- *

- *     // xTimerStartFromISR() or xTimerResetFromISR() could be called here

- *     // as both cause the timer to re-calculate its expiry time.

- *     // xHigherPriorityTaskWoken was initialised to pdFALSE when it was

- *     // declared (in this function).

- *     if( xTimerStartFromISR( xBacklightTimer, &xHigherPriorityTaskWoken ) != pdPASS )

- *     {

- *         // The start command was not executed successfully.  Take appropriate

- *         // action here.

- *     }

- *

- *     // Perform the rest of the key processing here.

- *

- *     // If xHigherPriorityTaskWoken equals pdTRUE, then a context switch

- *     // should be performed.  The syntax required to perform a context switch

- *     // from inside an ISR varies from port to port, and from compiler to

- *     // compiler.  Inspect the demos for the port you are using to find the

- *     // actual syntax required.

- *     if( xHigherPriorityTaskWoken != pdFALSE )

- *     {

- *         // Call the interrupt safe yield function here (actual function

- *         // depends on the FreeRTOS port being used).

- *     }

- * }

- * @endverbatim

- */

-#define xTimerStartFromISR( xTimer, pxHigherPriorityTaskWoken ) xTimerGenericCommand( ( xTimer ), tmrCOMMAND_START_FROM_ISR, ( xTaskGetTickCountFromISR() ), ( pxHigherPriorityTaskWoken ), 0U )

-

-/**

- * BaseType_t xTimerStopFromISR( 	TimerHandle_t xTimer,

- *									BaseType_t *pxHigherPriorityTaskWoken );

- *

- * A version of xTimerStop() that can be called from an interrupt service

- * routine.

- *

- * @param xTimer The handle of the timer being stopped.

- *

- * @param pxHigherPriorityTaskWoken The timer service/daemon task spends most

- * of its time in the Blocked state, waiting for messages to arrive on the timer

- * command queue.  Calling xTimerStopFromISR() writes a message to the timer

- * command queue, so has the potential to transition the timer service/daemon

- * task out of the Blocked state.  If calling xTimerStopFromISR() causes the

- * timer service/daemon task to leave the Blocked state, and the timer service/

- * daemon task has a priority equal to or greater than the currently executing

- * task (the task that was interrupted), then *pxHigherPriorityTaskWoken will

- * get set to pdTRUE internally within the xTimerStopFromISR() function.  If

- * xTimerStopFromISR() sets this value to pdTRUE then a context switch should

- * be performed before the interrupt exits.

- *

- * @return pdFAIL will be returned if the stop command could not be sent to

- * the timer command queue.  pdPASS will be returned if the command was

- * successfully sent to the timer command queue.  When the command is actually

- * processed will depend on the priority of the timer service/daemon task

- * relative to other tasks in the system.  The timer service/daemon task

- * priority is set by the configTIMER_TASK_PRIORITY configuration constant.

- *

- * Example usage:

- * @verbatim

- * // This scenario assumes xTimer has already been created and started.  When

- * // an interrupt occurs, the timer should be simply stopped.

- *

- * // The interrupt service routine that stops the timer.

- * void vAnExampleInterruptServiceRoutine( void )

- * {

- * BaseType_t xHigherPriorityTaskWoken = pdFALSE;

- *

- *     // The interrupt has occurred - simply stop the timer.

- *     // xHigherPriorityTaskWoken was set to pdFALSE where it was defined

- *     // (within this function).  As this is an interrupt service routine, only

- *     // FreeRTOS API functions that end in "FromISR" can be used.

- *     if( xTimerStopFromISR( xTimer, &xHigherPriorityTaskWoken ) != pdPASS )

- *     {

- *         // The stop command was not executed successfully.  Take appropriate

- *         // action here.

- *     }

- *

- *     // If xHigherPriorityTaskWoken equals pdTRUE, then a context switch

- *     // should be performed.  The syntax required to perform a context switch

- *     // from inside an ISR varies from port to port, and from compiler to

- *     // compiler.  Inspect the demos for the port you are using to find the

- *     // actual syntax required.

- *     if( xHigherPriorityTaskWoken != pdFALSE )

- *     {

- *         // Call the interrupt safe yield function here (actual function

- *         // depends on the FreeRTOS port being used).

- *     }

- * }

- * @endverbatim

- */

-#define xTimerStopFromISR( xTimer, pxHigherPriorityTaskWoken ) xTimerGenericCommand( ( xTimer ), tmrCOMMAND_STOP_FROM_ISR, 0, ( pxHigherPriorityTaskWoken ), 0U )

-

-/**

- * BaseType_t xTimerChangePeriodFromISR( TimerHandle_t xTimer,

- *										 TickType_t xNewPeriod,

- *										 BaseType_t *pxHigherPriorityTaskWoken );

- *

- * A version of xTimerChangePeriod() that can be called from an interrupt

- * service routine.

- *

- * @param xTimer The handle of the timer that is having its period changed.

- *

- * @param xNewPeriod The new period for xTimer. Timer periods are specified in

- * tick periods, so the constant portTICK_PERIOD_MS can be used to convert a time

- * that has been specified in milliseconds.  For example, if the timer must

- * expire after 100 ticks, then xNewPeriod should be set to 100.  Alternatively,

- * if the timer must expire after 500ms, then xNewPeriod can be set to

- * ( 500 / portTICK_PERIOD_MS ) provided configTICK_RATE_HZ is less than

- * or equal to 1000.

- *

- * @param pxHigherPriorityTaskWoken The timer service/daemon task spends most

- * of its time in the Blocked state, waiting for messages to arrive on the timer

- * command queue.  Calling xTimerChangePeriodFromISR() writes a message to the

- * timer command queue, so has the potential to transition the timer service/

- * daemon task out of the Blocked state.  If calling xTimerChangePeriodFromISR()

- * causes the timer service/daemon task to leave the Blocked state, and the

- * timer service/daemon task has a priority equal to or greater than the

- * currently executing task (the task that was interrupted), then

- * *pxHigherPriorityTaskWoken will get set to pdTRUE internally within the

- * xTimerChangePeriodFromISR() function.  If xTimerChangePeriodFromISR() sets

- * this value to pdTRUE then a context switch should be performed before the

- * interrupt exits.

- *

- * @return pdFAIL will be returned if the command to change the timers period

- * could not be sent to the timer command queue.  pdPASS will be returned if the

- * command was successfully sent to the timer command queue.  When the command

- * is actually processed will depend on the priority of the timer service/daemon

- * task relative to other tasks in the system.  The timer service/daemon task

- * priority is set by the configTIMER_TASK_PRIORITY configuration constant.

- *

- * Example usage:

- * @verbatim

- * // This scenario assumes xTimer has already been created and started.  When

- * // an interrupt occurs, the period of xTimer should be changed to 500ms.

- *

- * // The interrupt service routine that changes the period of xTimer.

- * void vAnExampleInterruptServiceRoutine( void )

- * {

- * BaseType_t xHigherPriorityTaskWoken = pdFALSE;

- *

- *     // The interrupt has occurred - change the period of xTimer to 500ms.

- *     // xHigherPriorityTaskWoken was set to pdFALSE where it was defined

- *     // (within this function).  As this is an interrupt service routine, only

- *     // FreeRTOS API functions that end in "FromISR" can be used.

- *     if( xTimerChangePeriodFromISR( xTimer, &xHigherPriorityTaskWoken ) != pdPASS )

- *     {

- *         // The command to change the timers period was not executed

- *         // successfully.  Take appropriate action here.

- *     }

- *

- *     // If xHigherPriorityTaskWoken equals pdTRUE, then a context switch

- *     // should be performed.  The syntax required to perform a context switch

- *     // from inside an ISR varies from port to port, and from compiler to

- *     // compiler.  Inspect the demos for the port you are using to find the

- *     // actual syntax required.

- *     if( xHigherPriorityTaskWoken != pdFALSE )

- *     {

- *         // Call the interrupt safe yield function here (actual function

- *         // depends on the FreeRTOS port being used).

- *     }

- * }

- * @endverbatim

- */

-#define xTimerChangePeriodFromISR( xTimer, xNewPeriod, pxHigherPriorityTaskWoken ) xTimerGenericCommand( ( xTimer ), tmrCOMMAND_CHANGE_PERIOD_FROM_ISR, ( xNewPeriod ), ( pxHigherPriorityTaskWoken ), 0U )

-

-/**

- * BaseType_t xTimerResetFromISR( 	TimerHandle_t xTimer,

- *									BaseType_t *pxHigherPriorityTaskWoken );

- *

- * A version of xTimerReset() that can be called from an interrupt service

- * routine.

- *

- * @param xTimer The handle of the timer that is to be started, reset, or

- * restarted.

- *

- * @param pxHigherPriorityTaskWoken The timer service/daemon task spends most

- * of its time in the Blocked state, waiting for messages to arrive on the timer

- * command queue.  Calling xTimerResetFromISR() writes a message to the timer

- * command queue, so has the potential to transition the timer service/daemon

- * task out of the Blocked state.  If calling xTimerResetFromISR() causes the

- * timer service/daemon task to leave the Blocked state, and the timer service/

- * daemon task has a priority equal to or greater than the currently executing

- * task (the task that was interrupted), then *pxHigherPriorityTaskWoken will

- * get set to pdTRUE internally within the xTimerResetFromISR() function.  If

- * xTimerResetFromISR() sets this value to pdTRUE then a context switch should

- * be performed before the interrupt exits.

- *

- * @return pdFAIL will be returned if the reset command could not be sent to

- * the timer command queue.  pdPASS will be returned if the command was

- * successfully sent to the timer command queue.  When the command is actually

- * processed will depend on the priority of the timer service/daemon task

- * relative to other tasks in the system, although the timers expiry time is

- * relative to when xTimerResetFromISR() is actually called.  The timer service/daemon

- * task priority is set by the configTIMER_TASK_PRIORITY configuration constant.

- *

- * Example usage:

- * @verbatim

- * // This scenario assumes xBacklightTimer has already been created.  When a

- * // key is pressed, an LCD back-light is switched on.  If 5 seconds pass

- * // without a key being pressed, then the LCD back-light is switched off.  In

- * // this case, the timer is a one-shot timer, and unlike the example given for

- * // the xTimerReset() function, the key press event handler is an interrupt

- * // service routine.

- *

- * // The callback function assigned to the one-shot timer.  In this case the

- * // parameter is not used.

- * void vBacklightTimerCallback( TimerHandle_t pxTimer )

- * {

- *     // The timer expired, therefore 5 seconds must have passed since a key

- *     // was pressed.  Switch off the LCD back-light.

- *     vSetBacklightState( BACKLIGHT_OFF );

- * }

- *

- * // The key press interrupt service routine.

- * void vKeyPressEventInterruptHandler( void )

- * {

- * BaseType_t xHigherPriorityTaskWoken = pdFALSE;

- *

- *     // Ensure the LCD back-light is on, then reset the timer that is

- *     // responsible for turning the back-light off after 5 seconds of

- *     // key inactivity.  This is an interrupt service routine so can only

- *     // call FreeRTOS API functions that end in "FromISR".

- *     vSetBacklightState( BACKLIGHT_ON );

- *

- *     // xTimerStartFromISR() or xTimerResetFromISR() could be called here

- *     // as both cause the timer to re-calculate its expiry time.

- *     // xHigherPriorityTaskWoken was initialised to pdFALSE when it was

- *     // declared (in this function).

- *     if( xTimerResetFromISR( xBacklightTimer, &xHigherPriorityTaskWoken ) != pdPASS )

- *     {

- *         // The reset command was not executed successfully.  Take appropriate

- *         // action here.

- *     }

- *

- *     // Perform the rest of the key processing here.

- *

- *     // If xHigherPriorityTaskWoken equals pdTRUE, then a context switch

- *     // should be performed.  The syntax required to perform a context switch

- *     // from inside an ISR varies from port to port, and from compiler to

- *     // compiler.  Inspect the demos for the port you are using to find the

- *     // actual syntax required.

- *     if( xHigherPriorityTaskWoken != pdFALSE )

- *     {

- *         // Call the interrupt safe yield function here (actual function

- *         // depends on the FreeRTOS port being used).

- *     }

- * }

- * @endverbatim

- */

-#define xTimerResetFromISR( xTimer, pxHigherPriorityTaskWoken ) xTimerGenericCommand( ( xTimer ), tmrCOMMAND_RESET_FROM_ISR, ( xTaskGetTickCountFromISR() ), ( pxHigherPriorityTaskWoken ), 0U )

-

-

-/**

- * BaseType_t xTimerPendFunctionCallFromISR( PendedFunction_t xFunctionToPend,

- *                                          void *pvParameter1,

- *                                          uint32_t ulParameter2,

- *                                          BaseType_t *pxHigherPriorityTaskWoken );

- *

- *

- * Used from application interrupt service routines to defer the execution of a

- * function to the RTOS daemon task (the timer service task, hence this function

- * is implemented in timers.c and is prefixed with 'Timer').

- *

- * Ideally an interrupt service routine (ISR) is kept as short as possible, but

- * sometimes an ISR either has a lot of processing to do, or needs to perform

- * processing that is not deterministic.  In these cases

- * xTimerPendFunctionCallFromISR() can be used to defer processing of a function

- * to the RTOS daemon task.

- *

- * A mechanism is provided that allows the interrupt to return directly to the

- * task that will subsequently execute the pended callback function.  This

- * allows the callback function to execute contiguously in time with the

- * interrupt - just as if the callback had executed in the interrupt itself.

- *

- * @param xFunctionToPend The function to execute from the timer service/

- * daemon task.  The function must conform to the PendedFunction_t

- * prototype.

- *

- * @param pvParameter1 The value of the callback function's first parameter.

- * The parameter has a void * type to allow it to be used to pass any type.

- * For example, unsigned longs can be cast to a void *, or the void * can be

- * used to point to a structure.

- *

- * @param ulParameter2 The value of the callback function's second parameter.

- *

- * @param pxHigherPriorityTaskWoken As mentioned above, calling this function

- * will result in a message being sent to the timer daemon task.  If the

- * priority of the timer daemon task (which is set using

- * configTIMER_TASK_PRIORITY in FreeRTOSConfig.h) is higher than the priority of

- * the currently running task (the task the interrupt interrupted) then

- * *pxHigherPriorityTaskWoken will be set to pdTRUE within

- * xTimerPendFunctionCallFromISR(), indicating that a context switch should be

- * requested before the interrupt exits.  For that reason

- * *pxHigherPriorityTaskWoken must be initialised to pdFALSE.  See the

- * example code below.

- *

- * @return pdPASS is returned if the message was successfully sent to the

- * timer daemon task, otherwise pdFALSE is returned.

- *

- * Example usage:

- * @verbatim

- *

- *	// The callback function that will execute in the context of the daemon task.

- *  // Note callback functions must all use this same prototype.

- *  void vProcessInterface( void *pvParameter1, uint32_t ulParameter2 )

- *	{

- *		BaseType_t xInterfaceToService;

- *

- *		// The interface that requires servicing is passed in the second

- *      // parameter.  The first parameter is not used in this case.

- *		xInterfaceToService = ( BaseType_t ) ulParameter2;

- *

- *		// ...Perform the processing here...

- *	}

- *

- *	// An ISR that receives data packets from multiple interfaces

- *  void vAnISR( void )

- *	{

- *		BaseType_t xInterfaceToService, xHigherPriorityTaskWoken;

- *

- *		// Query the hardware to determine which interface needs processing.

- *		xInterfaceToService = prvCheckInterfaces();

- *

- *      // The actual processing is to be deferred to a task.  Request the

- *      // vProcessInterface() callback function is executed, passing in the

- *		// number of the interface that needs processing.  The interface to

- *		// service is passed in the second parameter.  The first parameter is

- *		// not used in this case.

- *		xHigherPriorityTaskWoken = pdFALSE;

- *		xTimerPendFunctionCallFromISR( vProcessInterface, NULL, ( uint32_t ) xInterfaceToService, &xHigherPriorityTaskWoken );

- *

- *		// If xHigherPriorityTaskWoken is now set to pdTRUE then a context

- *		// switch should be requested.  The macro used is port specific and will

- *		// be either portYIELD_FROM_ISR() or portEND_SWITCHING_ISR() - refer to

- *		// the documentation page for the port being used.

- *		portYIELD_FROM_ISR( xHigherPriorityTaskWoken );

- *

- *	}

- * @endverbatim

- */

-BaseType_t xTimerPendFunctionCallFromISR( PendedFunction_t xFunctionToPend, void *pvParameter1, uint32_t ulParameter2, BaseType_t *pxHigherPriorityTaskWoken ) PRIVILEGED_FUNCTION;

-

- /**

-  * BaseType_t xTimerPendFunctionCall( PendedFunction_t xFunctionToPend,

-  *                                    void *pvParameter1,

-  *                                    uint32_t ulParameter2,

-  *                                    TickType_t xTicksToWait );

-  *

-  *

-  * Used to defer the execution of a function to the RTOS daemon task (the timer

-  * service task, hence this function is implemented in timers.c and is prefixed

-  * with 'Timer').

-  *

-  * @param xFunctionToPend The function to execute from the timer service/

-  * daemon task.  The function must conform to the PendedFunction_t

-  * prototype.

-  *

-  * @param pvParameter1 The value of the callback function's first parameter.

-  * The parameter has a void * type to allow it to be used to pass any type.

-  * For example, unsigned longs can be cast to a void *, or the void * can be

-  * used to point to a structure.

-  *

-  * @param ulParameter2 The value of the callback function's second parameter.

-  *

-  * @param xTicksToWait Calling this function will result in a message being

-  * sent to the timer daemon task on a queue.  xTicksToWait is the amount of

-  * time the calling task should remain in the Blocked state (so not using any

-  * processing time) for space to become available on the timer queue if the

-  * queue is found to be full.

-  *

-  * @return pdPASS is returned if the message was successfully sent to the

-  * timer daemon task, otherwise pdFALSE is returned.

-  *

-  */

-BaseType_t xTimerPendFunctionCall( PendedFunction_t xFunctionToPend, void *pvParameter1, uint32_t ulParameter2, TickType_t xTicksToWait ) PRIVILEGED_FUNCTION;

-

-/**

- * const char * const pcTimerGetTimerName( TimerHandle_t xTimer );

- *

- * Returns the name that was assigned to a timer when the timer was created.

- *

- * @param xTimer The handle of the timer being queried.

- *

- * @return The name assigned to the timer specified by the xTimer parameter.

- */

-const char * pcTimerGetTimerName( TimerHandle_t xTimer ) PRIVILEGED_FUNCTION; /*lint !e971 Unqualified char types are allowed for strings and single characters only. */

-

-/*

- * Functions beyond this part are not part of the public API and are intended

- * for use by the kernel only.

- */

-BaseType_t xTimerCreateTimerTask( void ) PRIVILEGED_FUNCTION;

-BaseType_t xTimerGenericCommand( TimerHandle_t xTimer, const BaseType_t xCommandID, const TickType_t xOptionalValue, BaseType_t * const pxHigherPriorityTaskWoken, const TickType_t xTicksToWait ) PRIVILEGED_FUNCTION;

-

-#ifdef __cplusplus

-}

-#endif

-#endif /* TIMERS_H */

-

-

-

diff --git a/FreeRTOS/Demo/Xilinx_FreeRTOS_BSP/repo/bsp/freertos822_xilinx_v1_0/src/Source/portable/GCC/ARM_CA9/portZynq7000.c b/FreeRTOS/Demo/Xilinx_FreeRTOS_BSP/repo/bsp/freertos822_xilinx_v1_0/src/Source/portable/GCC/ARM_CA9/portZynq7000.c
index 19f9e11..86734bf 100644
--- a/FreeRTOS/Demo/Xilinx_FreeRTOS_BSP/repo/bsp/freertos822_xilinx_v1_0/src/Source/portable/GCC/ARM_CA9/portZynq7000.c
+++ b/FreeRTOS/Demo/Xilinx_FreeRTOS_BSP/repo/bsp/freertos822_xilinx_v1_0/src/Source/portable/GCC/ARM_CA9/portZynq7000.c
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Demo/Xilinx_FreeRTOS_BSP/repo/bsp/freertos822_xilinx_v1_0/src/Source/portable/GCC/MicroBlazeV8/portmicroblaze.c b/FreeRTOS/Demo/Xilinx_FreeRTOS_BSP/repo/bsp/freertos822_xilinx_v1_0/src/Source/portable/GCC/MicroBlazeV8/portmicroblaze.c
index e5def74..79effdc 100644
--- a/FreeRTOS/Demo/Xilinx_FreeRTOS_BSP/repo/bsp/freertos822_xilinx_v1_0/src/Source/portable/GCC/MicroBlazeV8/portmicroblaze.c
+++ b/FreeRTOS/Demo/Xilinx_FreeRTOS_BSP/repo/bsp/freertos822_xilinx_v1_0/src/Source/portable/GCC/MicroBlazeV8/portmicroblaze.c
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Demo/Xilinx_FreeRTOS_BSP/repo/sw_apps/freertos_hello_world/src/freertos_hello_world.c b/FreeRTOS/Demo/Xilinx_FreeRTOS_BSP/repo/sw_apps/freertos_hello_world/src/freertos_hello_world.c
index a624fd4..e2bb576 100644
--- a/FreeRTOS/Demo/Xilinx_FreeRTOS_BSP/repo/sw_apps/freertos_hello_world/src/freertos_hello_world.c
+++ b/FreeRTOS/Demo/Xilinx_FreeRTOS_BSP/repo/sw_apps/freertos_hello_world/src/freertos_hello_world.c
@@ -1,179 +1,179 @@
-/*
-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.
-    All rights reserved
-
-    VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.
-
-    This file is part of the FreeRTOS distribution.
-
-    FreeRTOS is free software; you can redistribute it and/or modify it under
-    the terms of the GNU General Public License (version 2) as published by the
-    Free Software Foundation >>!AND MODIFIED BY!<< the FreeRTOS exception.
-
-    ***************************************************************************
-    >>!   NOTE: The modification to the GPL is included to allow you to     !<<
-    >>!   distribute a combined work that includes FreeRTOS without being   !<<
-    >>!   obliged to provide the source code for proprietary components     !<<
-    >>!   outside of the FreeRTOS kernel.                                   !<<
-    ***************************************************************************
-
-    FreeRTOS is distributed in the hope that it will be useful, but WITHOUT ANY
-    WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
-    FOR A PARTICULAR PURPOSE.  Full license text is available on the following
-    link: http://www.freertos.org/a00114.html
-
-    ***************************************************************************
-     *                                                                       *
-     *    FreeRTOS provides completely free yet professionally developed,    *
-     *    robust, strictly quality controlled, supported, and cross          *
-     *    platform software that is more than just the market leader, it     *
-     *    is the industry's de facto standard.                               *
-     *                                                                       *
-     *    Help yourself get started quickly while simultaneously helping     *
-     *    to support the FreeRTOS project by purchasing a FreeRTOS           *
-     *    tutorial book, reference manual, or both:                          *
-     *    http://www.FreeRTOS.org/Documentation                              *
-     *                                                                       *
-    ***************************************************************************
-
-    http://www.FreeRTOS.org/FAQHelp.html - Having a problem?  Start by reading
-    the FAQ page "My application does not run, what could be wrong?".  Have you
-    defined configASSERT()?
-
-    http://www.FreeRTOS.org/support - In return for receiving this top quality
-    embedded software for free we request you assist our global community by
-    participating in the support forum.
-
-    http://www.FreeRTOS.org/training - Investing in training allows your team to
-    be as productive as possible as early as possible.  Now you can receive
-    FreeRTOS training directly from Richard Barry, CEO of Real Time Engineers
-    Ltd, and the world's leading authority on the world's leading RTOS.
-
-    http://www.FreeRTOS.org/plus - A selection of FreeRTOS ecosystem products,
-    including FreeRTOS+Trace - an indispensable productivity tool, a DOS
-    compatible FAT file system, and our tiny thread aware UDP/IP stack.
-
-    http://www.FreeRTOS.org/labs - Where new FreeRTOS products go to incubate.
-    Come and try FreeRTOS+TCP, our new open source TCP/IP stack for FreeRTOS.
-
-    http://www.OpenRTOS.com - Real Time Engineers ltd. license FreeRTOS to High
-    Integrity Systems ltd. to sell under the OpenRTOS brand.  Low cost OpenRTOS
-    licenses offer ticketed support, indemnification and commercial middleware.
-
-    http://www.SafeRTOS.com - High Integrity Systems also provide a safety
-    engineered and independently SIL3 certified version for use in safety and
-    mission critical applications that require provable dependability.
-
-    1 tab == 4 spaces!
-*/
-
-/*
- * This is a very simply blinky style example that can be generated
- * automatically by the Xilinx SDK.
- *
- * The example generates a Tx task, an Rx task, and a queue.  The Tx task
- * simply uses the queue to send a value to the Rx task every 500ms.  The Rx
- * prints out a message each time it receives the value.
- *
- * The demo does little in the way of hardware configuration.  Separate projects
- * are provided that include comprehensive demos which demonstrate additional
- * hardware configuration, and additional FreeRTOS features.  See the following
- * link for more details: http://www.freertos.org/a00090.html#XILINX
- */
-
-/* FreeRTOS includes. */
-#include "FreeRTOS.h"
-#include "task.h"
-#include "queue.h"
-
-/* Xilinx includes. */
-#include "xil_printf.h"
-#include "xparameters.h"
-
-/*-----------------------------------------------------------*/
-
-/* The Tx and Rx tasks as described at the top of this file. */
-static void prvTxTask( void *pvParameters );
-static void prvRxTask( void *pvParameters );
-
-/*-----------------------------------------------------------*/
-
-/* The queue used by the Tx and Rx tasks, as described at the top of this
-file. */
-static QueueHandle_t xQueue = NULL;
-
-int main( void )
-{
-	xil_printf( "Hello from Freertos\r\n" );
-
-	/* Create the two tasks.  The Tx task is given a lower priority than the
-	Rx task, so the Rx task will leave the Blocked state and pre-empt the Tx
-	task as soon as the Tx task places an item in the queue. */
-	xTaskCreate( 	prvTxTask, 					/* The function that implements the task. */
-					( const char * ) "Tx", 		/* Text name for the task, provided to assist debugging only. */
-					configMINIMAL_STACK_SIZE, 	/* The stack allocated to the task. */
-					NULL, 						/* The task parameter is not used, so set to NULL. */
-					tskIDLE_PRIORITY,			/* The task runs at the idle priority. */
-					NULL );
-
-	xTaskCreate( prvRxTask, ( const char * ) "GB",	configMINIMAL_STACK_SIZE, NULL,	tskIDLE_PRIORITY + 1, NULL );
-
-	/* Create the queue used by the tasks.  The Rx task has a higher priority
-	than the Tx task, so will preempt the Tx task and remove values from the
-	queue as soon as the Tx task writes to the queue - therefore the queue can
-	never have more than one item in it. */
-	xQueue = xQueueCreate( 	1,						/* There is only one space in the queue. */
-							sizeof( uint32_t ) );	/* Each space in the queue is large enough to hold a uint32_t. */
-
-	/* Check the queue was created. */
-	configASSERT( xQueue );
-
-	/* 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. */
-	for( ;; );
-}
-
-
-/*-----------------------------------------------------------*/
-static void prvTxTask( void *pvParameters )
-{
-const TickType_t x500ms = pdMS_TO_TICKS( 500UL );
-uint32_t ulValueToSend = 0;
-
-	for( ;; )
-	{
-		/* Delay for 500ms. */
-		vTaskDelay( x500ms );
-
-		/* Send the next value on the queue.  The queue should always be
-		empty at this point so a block time of 0 is used. */
-		xQueueSend( xQueue,			/* The queue being written to. */
-					&ulValueToSend, /* The address of the data being sent. */
-					0UL );			/* The block time. */
-	}
-}
-
-/*-----------------------------------------------------------*/
-static void prvRxTask( void *pvParameters )
-{
-uint32_t ulValueReceived;
-
-	for( ;; )
-	{
-		/* Block to wait for data arriving on the queue. */
-		xQueueReceive( 	xQueue,				/* The queue being read. */
-						&ulValueReceived,	/* Data is read into this address. */
-						portMAX_DELAY );	/* Wait without a timeout for data. */
-
-		/* Print the received data. */
-		xil_printf( "Rx task received %u\r\n", ( unsigned int ) ulValueReceived );
-	}
-}
-
-
+/*

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

+    All rights reserved

+

+    VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

+

+    This file is part of the FreeRTOS distribution.

+

+    FreeRTOS is free software; you can redistribute it and/or modify it under

+    the terms of the GNU General Public License (version 2) as published by the

+    Free Software Foundation >>!AND MODIFIED BY!<< the FreeRTOS exception.

+

+    ***************************************************************************

+    >>!   NOTE: The modification to the GPL is included to allow you to     !<<

+    >>!   distribute a combined work that includes FreeRTOS without being   !<<

+    >>!   obliged to provide the source code for proprietary components     !<<

+    >>!   outside of the FreeRTOS kernel.                                   !<<

+    ***************************************************************************

+

+    FreeRTOS is distributed in the hope that it will be useful, but WITHOUT ANY

+    WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS

+    FOR A PARTICULAR PURPOSE.  Full license text is available on the following

+    link: http://www.freertos.org/a00114.html

+

+    ***************************************************************************

+     *                                                                       *

+     *    FreeRTOS provides completely free yet professionally developed,    *

+     *    robust, strictly quality controlled, supported, and cross          *

+     *    platform software that is more than just the market leader, it     *

+     *    is the industry's de facto standard.                               *

+     *                                                                       *

+     *    Help yourself get started quickly while simultaneously helping     *

+     *    to support the FreeRTOS project by purchasing a FreeRTOS           *

+     *    tutorial book, reference manual, or both:                          *

+     *    http://www.FreeRTOS.org/Documentation                              *

+     *                                                                       *

+    ***************************************************************************

+

+    http://www.FreeRTOS.org/FAQHelp.html - Having a problem?  Start by reading

+    the FAQ page "My application does not run, what could be wrong?".  Have you

+    defined configASSERT()?

+

+    http://www.FreeRTOS.org/support - In return for receiving this top quality

+    embedded software for free we request you assist our global community by

+    participating in the support forum.

+

+    http://www.FreeRTOS.org/training - Investing in training allows your team to

+    be as productive as possible as early as possible.  Now you can receive

+    FreeRTOS training directly from Richard Barry, CEO of Real Time Engineers

+    Ltd, and the world's leading authority on the world's leading RTOS.

+

+    http://www.FreeRTOS.org/plus - A selection of FreeRTOS ecosystem products,

+    including FreeRTOS+Trace - an indispensable productivity tool, a DOS

+    compatible FAT file system, and our tiny thread aware UDP/IP stack.

+

+    http://www.FreeRTOS.org/labs - Where new FreeRTOS products go to incubate.

+    Come and try FreeRTOS+TCP, our new open source TCP/IP stack for FreeRTOS.

+

+    http://www.OpenRTOS.com - Real Time Engineers ltd. license FreeRTOS to High

+    Integrity Systems ltd. to sell under the OpenRTOS brand.  Low cost OpenRTOS

+    licenses offer ticketed support, indemnification and commercial middleware.

+

+    http://www.SafeRTOS.com - High Integrity Systems also provide a safety

+    engineered and independently SIL3 certified version for use in safety and

+    mission critical applications that require provable dependability.

+

+    1 tab == 4 spaces!

+*/

+

+/*

+ * This is a very simply blinky style example that can be generated

+ * automatically by the Xilinx SDK.

+ *

+ * The example generates a Tx task, an Rx task, and a queue.  The Tx task

+ * simply uses the queue to send a value to the Rx task every 500ms.  The Rx

+ * prints out a message each time it receives the value.

+ *

+ * The demo does little in the way of hardware configuration.  Separate projects

+ * are provided that include comprehensive demos which demonstrate additional

+ * hardware configuration, and additional FreeRTOS features.  See the following

+ * link for more details: http://www.freertos.org/a00090.html#XILINX

+ */

+

+/* FreeRTOS includes. */

+#include "FreeRTOS.h"

+#include "task.h"

+#include "queue.h"

+

+/* Xilinx includes. */

+#include "xil_printf.h"

+#include "xparameters.h"

+

+/*-----------------------------------------------------------*/

+

+/* The Tx and Rx tasks as described at the top of this file. */

+static void prvTxTask( void *pvParameters );

+static void prvRxTask( void *pvParameters );

+

+/*-----------------------------------------------------------*/

+

+/* The queue used by the Tx and Rx tasks, as described at the top of this

+file. */

+static QueueHandle_t xQueue = NULL;

+

+int main( void )

+{

+	xil_printf( "Hello from Freertos\r\n" );

+

+	/* Create the two tasks.  The Tx task is given a lower priority than the

+	Rx task, so the Rx task will leave the Blocked state and pre-empt the Tx

+	task as soon as the Tx task places an item in the queue. */

+	xTaskCreate( 	prvTxTask, 					/* The function that implements the task. */

+					( const char * ) "Tx", 		/* Text name for the task, provided to assist debugging only. */

+					configMINIMAL_STACK_SIZE, 	/* The stack allocated to the task. */

+					NULL, 						/* The task parameter is not used, so set to NULL. */

+					tskIDLE_PRIORITY,			/* The task runs at the idle priority. */

+					NULL );

+

+	xTaskCreate( prvRxTask, ( const char * ) "GB",	configMINIMAL_STACK_SIZE, NULL,	tskIDLE_PRIORITY + 1, NULL );

+

+	/* Create the queue used by the tasks.  The Rx task has a higher priority

+	than the Tx task, so will preempt the Tx task and remove values from the

+	queue as soon as the Tx task writes to the queue - therefore the queue can

+	never have more than one item in it. */

+	xQueue = xQueueCreate( 	1,						/* There is only one space in the queue. */

+							sizeof( uint32_t ) );	/* Each space in the queue is large enough to hold a uint32_t. */

+

+	/* Check the queue was created. */

+	configASSERT( xQueue );

+

+	/* 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. */

+	for( ;; );

+}

+

+

+/*-----------------------------------------------------------*/

+static void prvTxTask( void *pvParameters )

+{

+const TickType_t x500ms = pdMS_TO_TICKS( 500UL );

+uint32_t ulValueToSend = 0;

+

+	for( ;; )

+	{

+		/* Delay for 500ms. */

+		vTaskDelay( x500ms );

+

+		/* Send the next value on the queue.  The queue should always be

+		empty at this point so a block time of 0 is used. */

+		xQueueSend( xQueue,			/* The queue being written to. */

+					&ulValueToSend, /* The address of the data being sent. */

+					0UL );			/* The block time. */

+	}

+}

+

+/*-----------------------------------------------------------*/

+static void prvRxTask( void *pvParameters )

+{

+uint32_t ulValueReceived;

+

+	for( ;; )

+	{

+		/* Block to wait for data arriving on the queue. */

+		xQueueReceive( 	xQueue,				/* The queue being read. */

+						&ulValueReceived,	/* Data is read into this address. */

+						portMAX_DELAY );	/* Wait without a timeout for data. */

+

+		/* Print the received data. */

+		xil_printf( "Rx task received %u\r\n", ( unsigned int ) ulValueReceived );

+	}

+}

+

+

diff --git a/FreeRTOS/Demo/dsPIC_MPLAB/FreeRTOSConfig.h b/FreeRTOS/Demo/dsPIC_MPLAB/FreeRTOSConfig.h
index f5df6e6..b32fdc2 100644
--- a/FreeRTOS/Demo/dsPIC_MPLAB/FreeRTOSConfig.h
+++ b/FreeRTOS/Demo/dsPIC_MPLAB/FreeRTOSConfig.h
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Demo/dsPIC_MPLAB/ParTest/ParTest.c b/FreeRTOS/Demo/dsPIC_MPLAB/ParTest/ParTest.c
index 056c731..14d5000 100644
--- a/FreeRTOS/Demo/dsPIC_MPLAB/ParTest/ParTest.c
+++ b/FreeRTOS/Demo/dsPIC_MPLAB/ParTest/ParTest.c
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Demo/dsPIC_MPLAB/lcd.c b/FreeRTOS/Demo/dsPIC_MPLAB/lcd.c
index 8379484..0d703a2 100644
--- a/FreeRTOS/Demo/dsPIC_MPLAB/lcd.c
+++ b/FreeRTOS/Demo/dsPIC_MPLAB/lcd.c
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Demo/dsPIC_MPLAB/lcd.h b/FreeRTOS/Demo/dsPIC_MPLAB/lcd.h
index 5e13e34..6bfb0905 100644
--- a/FreeRTOS/Demo/dsPIC_MPLAB/lcd.h
+++ b/FreeRTOS/Demo/dsPIC_MPLAB/lcd.h
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Demo/dsPIC_MPLAB/main.c b/FreeRTOS/Demo/dsPIC_MPLAB/main.c
index cc26bb6..4e30076 100644
--- a/FreeRTOS/Demo/dsPIC_MPLAB/main.c
+++ b/FreeRTOS/Demo/dsPIC_MPLAB/main.c
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Demo/dsPIC_MPLAB/serial/serial.c b/FreeRTOS/Demo/dsPIC_MPLAB/serial/serial.c
index 2052e73..aa9f49f 100644
--- a/FreeRTOS/Demo/dsPIC_MPLAB/serial/serial.c
+++ b/FreeRTOS/Demo/dsPIC_MPLAB/serial/serial.c
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Demo/dsPIC_MPLAB/timertest.c b/FreeRTOS/Demo/dsPIC_MPLAB/timertest.c
index c57bb82..e31900c 100644
--- a/FreeRTOS/Demo/dsPIC_MPLAB/timertest.c
+++ b/FreeRTOS/Demo/dsPIC_MPLAB/timertest.c
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Demo/dsPIC_MPLAB/timertest.h b/FreeRTOS/Demo/dsPIC_MPLAB/timertest.h
index a5d264c..3326d3d 100644
--- a/FreeRTOS/Demo/dsPIC_MPLAB/timertest.h
+++ b/FreeRTOS/Demo/dsPIC_MPLAB/timertest.h
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Demo/lwIP_Demo_Rowley_ARM7/BasicWEB.c b/FreeRTOS/Demo/lwIP_Demo_Rowley_ARM7/BasicWEB.c
index 374ecd2..e34a282 100644
--- a/FreeRTOS/Demo/lwIP_Demo_Rowley_ARM7/BasicWEB.c
+++ b/FreeRTOS/Demo/lwIP_Demo_Rowley_ARM7/BasicWEB.c
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Demo/lwIP_Demo_Rowley_ARM7/BasicWEB.h b/FreeRTOS/Demo/lwIP_Demo_Rowley_ARM7/BasicWEB.h
index 2367a95..ccf6c43 100644
--- a/FreeRTOS/Demo/lwIP_Demo_Rowley_ARM7/BasicWEB.h
+++ b/FreeRTOS/Demo/lwIP_Demo_Rowley_ARM7/BasicWEB.h
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

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 6639f7c..20c0c34 100644
--- a/FreeRTOS/Demo/lwIP_Demo_Rowley_ARM7/EMAC/SAM7_EMAC.c
+++ b/FreeRTOS/Demo/lwIP_Demo_Rowley_ARM7/EMAC/SAM7_EMAC.c
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

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 576b0ca..14509f3 100644
--- a/FreeRTOS/Demo/lwIP_Demo_Rowley_ARM7/EMAC/SAM7_EMAC.h
+++ b/FreeRTOS/Demo/lwIP_Demo_Rowley_ARM7/EMAC/SAM7_EMAC.h
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

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 b49ec15..0afc62e 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,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Demo/lwIP_Demo_Rowley_ARM7/FreeRTOSConfig.h b/FreeRTOS/Demo/lwIP_Demo_Rowley_ARM7/FreeRTOSConfig.h
index f3f2d93..0e597ab 100644
--- a/FreeRTOS/Demo/lwIP_Demo_Rowley_ARM7/FreeRTOSConfig.h
+++ b/FreeRTOS/Demo/lwIP_Demo_Rowley_ARM7/FreeRTOSConfig.h
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Demo/lwIP_Demo_Rowley_ARM7/ParTest/ParTest.c b/FreeRTOS/Demo/lwIP_Demo_Rowley_ARM7/ParTest/ParTest.c
index 4c5c73a..e1478c3 100644
--- a/FreeRTOS/Demo/lwIP_Demo_Rowley_ARM7/ParTest/ParTest.c
+++ b/FreeRTOS/Demo/lwIP_Demo_Rowley_ARM7/ParTest/ParTest.c
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

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 ae1b303..1bd7816 100644
--- a/FreeRTOS/Demo/lwIP_Demo_Rowley_ARM7/USB/USB-CDC.c
+++ b/FreeRTOS/Demo/lwIP_Demo_Rowley_ARM7/USB/USB-CDC.c
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

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 8f4fa78..3728182 100644
--- a/FreeRTOS/Demo/lwIP_Demo_Rowley_ARM7/USB/USB-CDC.h
+++ b/FreeRTOS/Demo/lwIP_Demo_Rowley_ARM7/USB/USB-CDC.h
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Demo/lwIP_Demo_Rowley_ARM7/USB/USBIsr.c b/FreeRTOS/Demo/lwIP_Demo_Rowley_ARM7/USB/USBIsr.c
index 27c21ed..a06c8da 100644
--- a/FreeRTOS/Demo/lwIP_Demo_Rowley_ARM7/USB/USBIsr.c
+++ b/FreeRTOS/Demo/lwIP_Demo_Rowley_ARM7/USB/USBIsr.c
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Demo/lwIP_Demo_Rowley_ARM7/USB/descriptors.h b/FreeRTOS/Demo/lwIP_Demo_Rowley_ARM7/USB/descriptors.h
index bbd5f2b..03f310e 100644
--- a/FreeRTOS/Demo/lwIP_Demo_Rowley_ARM7/USB/descriptors.h
+++ b/FreeRTOS/Demo/lwIP_Demo_Rowley_ARM7/USB/descriptors.h
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Demo/lwIP_Demo_Rowley_ARM7/USB/usb.h b/FreeRTOS/Demo/lwIP_Demo_Rowley_ARM7/USB/usb.h
index 7637576..be70452 100644
--- a/FreeRTOS/Demo/lwIP_Demo_Rowley_ARM7/USB/usb.h
+++ b/FreeRTOS/Demo/lwIP_Demo_Rowley_ARM7/USB/usb.h
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Demo/lwIP_Demo_Rowley_ARM7/main.c b/FreeRTOS/Demo/lwIP_Demo_Rowley_ARM7/main.c
index 23607f9..c0c381a 100644
--- a/FreeRTOS/Demo/lwIP_Demo_Rowley_ARM7/main.c
+++ b/FreeRTOS/Demo/lwIP_Demo_Rowley_ARM7/main.c
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Demo/lwIP_Demo_Rowley_ARM7/makefile b/FreeRTOS/Demo/lwIP_Demo_Rowley_ARM7/makefile
index c491e50..749b0fa 100644
--- a/FreeRTOS/Demo/lwIP_Demo_Rowley_ARM7/makefile
+++ b/FreeRTOS/Demo/lwIP_Demo_Rowley_ARM7/makefile
@@ -1,5 +1,5 @@
 #/*

-#    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+#    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

 #	

 #

 #    ***************************************************************************

diff --git a/FreeRTOS/Demo/msp430_CrossWorks/FreeRTOSConfig.h b/FreeRTOS/Demo/msp430_CrossWorks/FreeRTOSConfig.h
index d589215..660444f 100644
--- a/FreeRTOS/Demo/msp430_CrossWorks/FreeRTOSConfig.h
+++ b/FreeRTOS/Demo/msp430_CrossWorks/FreeRTOSConfig.h
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Demo/msp430_CrossWorks/ParTest/ParTest.c b/FreeRTOS/Demo/msp430_CrossWorks/ParTest/ParTest.c
index f24de40..e1eb69a 100644
--- a/FreeRTOS/Demo/msp430_CrossWorks/ParTest/ParTest.c
+++ b/FreeRTOS/Demo/msp430_CrossWorks/ParTest/ParTest.c
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Demo/msp430_CrossWorks/main.c b/FreeRTOS/Demo/msp430_CrossWorks/main.c
index fab8bf9..4fbd2de 100644
--- a/FreeRTOS/Demo/msp430_CrossWorks/main.c
+++ b/FreeRTOS/Demo/msp430_CrossWorks/main.c
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Demo/msp430_CrossWorks/serial/serial.c b/FreeRTOS/Demo/msp430_CrossWorks/serial/serial.c
index 06b36eb..16c039d 100644
--- a/FreeRTOS/Demo/msp430_CrossWorks/serial/serial.c
+++ b/FreeRTOS/Demo/msp430_CrossWorks/serial/serial.c
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Demo/msp430_CrossWorks/serial/serialASM.asm b/FreeRTOS/Demo/msp430_CrossWorks/serial/serialASM.asm
index a6a947c..10cc067 100644
--- a/FreeRTOS/Demo/msp430_CrossWorks/serial/serialASM.asm
+++ b/FreeRTOS/Demo/msp430_CrossWorks/serial/serialASM.asm
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Demo/msp430_GCC/FreeRTOSConfig.h b/FreeRTOS/Demo/msp430_GCC/FreeRTOSConfig.h
index d43e015..dc37056 100644
--- a/FreeRTOS/Demo/msp430_GCC/FreeRTOSConfig.h
+++ b/FreeRTOS/Demo/msp430_GCC/FreeRTOSConfig.h
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Demo/msp430_GCC/ParTest/ParTest.c b/FreeRTOS/Demo/msp430_GCC/ParTest/ParTest.c
index a1ea757..77057bb 100644
--- a/FreeRTOS/Demo/msp430_GCC/ParTest/ParTest.c
+++ b/FreeRTOS/Demo/msp430_GCC/ParTest/ParTest.c
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Demo/msp430_GCC/main.c b/FreeRTOS/Demo/msp430_GCC/main.c
index 2e0ab50..026b0ae 100644
--- a/FreeRTOS/Demo/msp430_GCC/main.c
+++ b/FreeRTOS/Demo/msp430_GCC/main.c
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Demo/msp430_GCC/makefile b/FreeRTOS/Demo/msp430_GCC/makefile
index a2a363c..15b5f8c 100644
--- a/FreeRTOS/Demo/msp430_GCC/makefile
+++ b/FreeRTOS/Demo/msp430_GCC/makefile
@@ -1,5 +1,5 @@
 #/*

-#    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+#    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

 #	

 #

 #    ***************************************************************************

diff --git a/FreeRTOS/Demo/msp430_GCC/serial/serial.c b/FreeRTOS/Demo/msp430_GCC/serial/serial.c
index 82ddd83..0eac8a5 100644
--- a/FreeRTOS/Demo/msp430_GCC/serial/serial.c
+++ b/FreeRTOS/Demo/msp430_GCC/serial/serial.c
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Demo/msp430_IAR/FreeRTOSConfig.h b/FreeRTOS/Demo/msp430_IAR/FreeRTOSConfig.h
index ab49001..40ecf66 100644
--- a/FreeRTOS/Demo/msp430_IAR/FreeRTOSConfig.h
+++ b/FreeRTOS/Demo/msp430_IAR/FreeRTOSConfig.h
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Demo/msp430_IAR/ParTest/ParTest.c b/FreeRTOS/Demo/msp430_IAR/ParTest/ParTest.c
index f24de40..e1eb69a 100644
--- a/FreeRTOS/Demo/msp430_IAR/ParTest/ParTest.c
+++ b/FreeRTOS/Demo/msp430_IAR/ParTest/ParTest.c
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Demo/msp430_IAR/main.c b/FreeRTOS/Demo/msp430_IAR/main.c
index 14f9834..308f7d4 100644
--- a/FreeRTOS/Demo/msp430_IAR/main.c
+++ b/FreeRTOS/Demo/msp430_IAR/main.c
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Demo/msp430_IAR/serial/serial.c b/FreeRTOS/Demo/msp430_IAR/serial/serial.c
index 4cb14c3..3dd8cc1 100644
--- a/FreeRTOS/Demo/msp430_IAR/serial/serial.c
+++ b/FreeRTOS/Demo/msp430_IAR/serial/serial.c
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Demo/msp430_IAR/serial/serialASM.s43 b/FreeRTOS/Demo/msp430_IAR/serial/serialASM.s43
index 9078451..94424e3 100644
--- a/FreeRTOS/Demo/msp430_IAR/serial/serialASM.s43
+++ b/FreeRTOS/Demo/msp430_IAR/serial/serialASM.s43
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Demo/uIP_Demo_IAR_ARM7/EMAC/EMAClISR.s79 b/FreeRTOS/Demo/uIP_Demo_IAR_ARM7/EMAC/EMAClISR.s79
index 3610222..997a9bb 100644
--- a/FreeRTOS/Demo/uIP_Demo_IAR_ARM7/EMAC/EMAClISR.s79
+++ b/FreeRTOS/Demo/uIP_Demo_IAR_ARM7/EMAC/EMAClISR.s79
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Demo/uIP_Demo_IAR_ARM7/EMAC/SAM7_EMAC.c b/FreeRTOS/Demo/uIP_Demo_IAR_ARM7/EMAC/SAM7_EMAC.c
index bb352a2..68a32a5 100644
--- a/FreeRTOS/Demo/uIP_Demo_IAR_ARM7/EMAC/SAM7_EMAC.c
+++ b/FreeRTOS/Demo/uIP_Demo_IAR_ARM7/EMAC/SAM7_EMAC.c
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Demo/uIP_Demo_IAR_ARM7/FreeRTOSConfig.h b/FreeRTOS/Demo/uIP_Demo_IAR_ARM7/FreeRTOSConfig.h
index 5c9a575..98fa289 100644
--- a/FreeRTOS/Demo/uIP_Demo_IAR_ARM7/FreeRTOSConfig.h
+++ b/FreeRTOS/Demo/uIP_Demo_IAR_ARM7/FreeRTOSConfig.h
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Demo/uIP_Demo_IAR_ARM7/ParTest/ParTest.c b/FreeRTOS/Demo/uIP_Demo_IAR_ARM7/ParTest/ParTest.c
index dcf5482..cc17b8c 100644
--- a/FreeRTOS/Demo/uIP_Demo_IAR_ARM7/ParTest/ParTest.c
+++ b/FreeRTOS/Demo/uIP_Demo_IAR_ARM7/ParTest/ParTest.c
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Demo/uIP_Demo_IAR_ARM7/main.c b/FreeRTOS/Demo/uIP_Demo_IAR_ARM7/main.c
index 4c2a957..da435ed 100644
--- a/FreeRTOS/Demo/uIP_Demo_IAR_ARM7/main.c
+++ b/FreeRTOS/Demo/uIP_Demo_IAR_ARM7/main.c
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Demo/uIP_Demo_Rowley_ARM7/FreeRTOSConfig.h b/FreeRTOS/Demo/uIP_Demo_Rowley_ARM7/FreeRTOSConfig.h
index cb81e68..f810c6d 100644
--- a/FreeRTOS/Demo/uIP_Demo_Rowley_ARM7/FreeRTOSConfig.h
+++ b/FreeRTOS/Demo/uIP_Demo_Rowley_ARM7/FreeRTOSConfig.h
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Demo/uIP_Demo_Rowley_ARM7/main.c b/FreeRTOS/Demo/uIP_Demo_Rowley_ARM7/main.c
index 5c4ffe3..a1ac41b 100644
--- a/FreeRTOS/Demo/uIP_Demo_Rowley_ARM7/main.c
+++ b/FreeRTOS/Demo/uIP_Demo_Rowley_ARM7/main.c
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Source/croutine.c b/FreeRTOS/Source/croutine.c
index 785e9a2..5cbe415 100644
--- a/FreeRTOS/Source/croutine.c
+++ b/FreeRTOS/Source/croutine.c
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Source/event_groups.c b/FreeRTOS/Source/event_groups.c
index a54c89b..484e840 100644
--- a/FreeRTOS/Source/event_groups.c
+++ b/FreeRTOS/Source/event_groups.c
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Source/include/FreeRTOS.h b/FreeRTOS/Source/include/FreeRTOS.h
index 9b8bae2..ae01cdb 100644
--- a/FreeRTOS/Source/include/FreeRTOS.h
+++ b/FreeRTOS/Source/include/FreeRTOS.h
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Source/include/StackMacros.h b/FreeRTOS/Source/include/StackMacros.h
index 18c6a7f..8a71156 100644
--- a/FreeRTOS/Source/include/StackMacros.h
+++ b/FreeRTOS/Source/include/StackMacros.h
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Source/include/croutine.h b/FreeRTOS/Source/include/croutine.h
index b833067..5579ec4 100644
--- a/FreeRTOS/Source/include/croutine.h
+++ b/FreeRTOS/Source/include/croutine.h
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Source/include/deprecated_definitions.h b/FreeRTOS/Source/include/deprecated_definitions.h
index 83f0931..d904a2e 100644
--- a/FreeRTOS/Source/include/deprecated_definitions.h
+++ b/FreeRTOS/Source/include/deprecated_definitions.h
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Source/include/event_groups.h b/FreeRTOS/Source/include/event_groups.h
index 70dc5f2..106ed60 100644
--- a/FreeRTOS/Source/include/event_groups.h
+++ b/FreeRTOS/Source/include/event_groups.h
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Source/include/list.h b/FreeRTOS/Source/include/list.h
index ca5719c..140e56c 100644
--- a/FreeRTOS/Source/include/list.h
+++ b/FreeRTOS/Source/include/list.h
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Source/include/mpu_wrappers.h b/FreeRTOS/Source/include/mpu_wrappers.h
index b7073a9..8706003 100644
--- a/FreeRTOS/Source/include/mpu_wrappers.h
+++ b/FreeRTOS/Source/include/mpu_wrappers.h
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

@@ -103,6 +103,9 @@
 		#define xTaskGetSchedulerState			MPU_xTaskGetSchedulerState

 		#define xTaskGetIdleTaskHandle			MPU_xTaskGetIdleTaskHandle

 		#define uxTaskGetSystemState			MPU_uxTaskGetSystemState

+		#define xTaskGenericNotify				MPU_xTaskGenericNotify

+		#define xTaskNotifyWait					MPU_xTaskNotifyWait

+		#define ulTaskNotifyTake				MPU_ulTaskNotifyTake

 

 		#define xQueueGenericCreate				MPU_xQueueGenericCreate

 		#define xQueueCreateMutex				MPU_xQueueCreateMutex

@@ -120,19 +123,36 @@
 		#define xQueueSelectFromSet				MPU_xQueueSelectFromSet

 		#define xQueueAddToSet					MPU_xQueueAddToSet

 		#define xQueueRemoveFromSet				MPU_xQueueRemoveFromSet

-		#define xQueuePeekFromISR				MPU_xQueuePeekFromISR

+		#define xQueueGetMutexHolder			MPU_xQueueGetMutexHolder

 		#define xQueueGetMutexHolder			MPU_xQueueGetMutexHolder

 

 		#define pvPortMalloc					MPU_pvPortMalloc

 		#define vPortFree						MPU_vPortFree

 		#define xPortGetFreeHeapSize			MPU_xPortGetFreeHeapSize

 		#define vPortInitialiseBlocks			MPU_vPortInitialiseBlocks

+		#define xPortGetMinimumEverFreeHeapSize	MPU_xPortGetMinimumEverFreeHeapSize

 

 		#if configQUEUE_REGISTRY_SIZE > 0

 			#define vQueueAddToRegistry				MPU_vQueueAddToRegistry

 			#define vQueueUnregisterQueue			MPU_vQueueUnregisterQueue

 		#endif

 

+		#define xTimerCreate					MPU_xTimerCreate

+		#define pvTimerGetTimerID				MPU_pvTimerGetTimerID

+		#define vTimerSetTimerID				MPU_vTimerSetTimerID

+		#define xTimerIsTimerActive				MPU_xTimerIsTimerActive

+		#define xTimerGetTimerDaemonTaskHandle	MPU_xTimerGetTimerDaemonTaskHandle

+		#define xTimerPendFunctionCall			MPU_xTimerPendFunctionCall

+		#define pcTimerGetTimerName				MPU_pcTimerGetTimerName

+		#define xTimerGenericCommand			MPU_xTimerGenericCommand

+

+		#define xEventGroupCreate				MPU_xEventGroupCreate

+		#define xEventGroupWaitBits				MPU_xEventGroupWaitBits

+		#define xEventGroupClearBits			MPU_xEventGroupClearBits

+		#define xEventGroupSetBits				MPU_xEventGroupSetBits

+		#define xEventGroupSync					MPU_xEventGroupSync

+		#define vEventGroupDelete				MPU_vEventGroupDelete

+

 		/* Remove the privileged function macro. */

 		#define PRIVILEGED_FUNCTION

 

diff --git a/FreeRTOS/Source/include/portable.h b/FreeRTOS/Source/include/portable.h
index 8e30301..fd9be79 100644
--- a/FreeRTOS/Source/include/portable.h
+++ b/FreeRTOS/Source/include/portable.h
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Source/include/projdefs.h b/FreeRTOS/Source/include/projdefs.h
index 115d356..fe51999 100644
--- a/FreeRTOS/Source/include/projdefs.h
+++ b/FreeRTOS/Source/include/projdefs.h
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Source/include/queue.h b/FreeRTOS/Source/include/queue.h
index 623497a..4ab7fd9 100644
--- a/FreeRTOS/Source/include/queue.h
+++ b/FreeRTOS/Source/include/queue.h
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Source/include/semphr.h b/FreeRTOS/Source/include/semphr.h
index 20afb76..2266bb9 100644
--- a/FreeRTOS/Source/include/semphr.h
+++ b/FreeRTOS/Source/include/semphr.h
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Source/include/task.h b/FreeRTOS/Source/include/task.h
index 7dd9f87..deda894 100644
--- a/FreeRTOS/Source/include/task.h
+++ b/FreeRTOS/Source/include/task.h
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

@@ -85,10 +85,10 @@
  * MACROS AND DEFINITIONS

  *----------------------------------------------------------*/

 

-#define tskKERNEL_VERSION_NUMBER "V8.2.1"

+#define tskKERNEL_VERSION_NUMBER "V8.2.2"

 #define tskKERNEL_VERSION_MAJOR 8

 #define tskKERNEL_VERSION_MINOR 2

-#define tskKERNEL_VERSION_BUILD 1

+#define tskKERNEL_VERSION_BUILD 2

 

 /**

  * task. h

diff --git a/FreeRTOS/Source/include/timers.h b/FreeRTOS/Source/include/timers.h
index 0bbbb02..ac2bedc 100644
--- a/FreeRTOS/Source/include/timers.h
+++ b/FreeRTOS/Source/include/timers.h
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Source/list.c b/FreeRTOS/Source/list.c
index b8ebafb..22e8623 100644
--- a/FreeRTOS/Source/list.c
+++ b/FreeRTOS/Source/list.c
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Source/portable/BCC/16BitDOS/Flsh186/port.c b/FreeRTOS/Source/portable/BCC/16BitDOS/Flsh186/port.c
index 17321df..d24231d 100644
--- a/FreeRTOS/Source/portable/BCC/16BitDOS/Flsh186/port.c
+++ b/FreeRTOS/Source/portable/BCC/16BitDOS/Flsh186/port.c
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Source/portable/BCC/16BitDOS/Flsh186/prtmacro.h b/FreeRTOS/Source/portable/BCC/16BitDOS/Flsh186/prtmacro.h
index f0c6be3..6af6da6 100644
--- a/FreeRTOS/Source/portable/BCC/16BitDOS/Flsh186/prtmacro.h
+++ b/FreeRTOS/Source/portable/BCC/16BitDOS/Flsh186/prtmacro.h
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Source/portable/BCC/16BitDOS/PC/port.c b/FreeRTOS/Source/portable/BCC/16BitDOS/PC/port.c
index 7f30018..e00acc4 100644
--- a/FreeRTOS/Source/portable/BCC/16BitDOS/PC/port.c
+++ b/FreeRTOS/Source/portable/BCC/16BitDOS/PC/port.c
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Source/portable/BCC/16BitDOS/PC/prtmacro.h b/FreeRTOS/Source/portable/BCC/16BitDOS/PC/prtmacro.h
index deb75ca..242dfba 100644
--- a/FreeRTOS/Source/portable/BCC/16BitDOS/PC/prtmacro.h
+++ b/FreeRTOS/Source/portable/BCC/16BitDOS/PC/prtmacro.h
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Source/portable/BCC/16BitDOS/common/portasm.h b/FreeRTOS/Source/portable/BCC/16BitDOS/common/portasm.h
index af8734f..db17c63 100644
--- a/FreeRTOS/Source/portable/BCC/16BitDOS/common/portasm.h
+++ b/FreeRTOS/Source/portable/BCC/16BitDOS/common/portasm.h
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Source/portable/BCC/16BitDOS/common/portcomn.c b/FreeRTOS/Source/portable/BCC/16BitDOS/common/portcomn.c
index 18c77c0..69d4f5d 100644
--- a/FreeRTOS/Source/portable/BCC/16BitDOS/common/portcomn.c
+++ b/FreeRTOS/Source/portable/BCC/16BitDOS/common/portcomn.c
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Source/portable/CCS/ARM_CM4F/port.c b/FreeRTOS/Source/portable/CCS/ARM_CM4F/port.c
index d133bff..c6e1646 100644
--- a/FreeRTOS/Source/portable/CCS/ARM_CM4F/port.c
+++ b/FreeRTOS/Source/portable/CCS/ARM_CM4F/port.c
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Source/portable/CCS/ARM_CM4F/portasm.asm b/FreeRTOS/Source/portable/CCS/ARM_CM4F/portasm.asm
index 0522d98..8880327 100644
--- a/FreeRTOS/Source/portable/CCS/ARM_CM4F/portasm.asm
+++ b/FreeRTOS/Source/portable/CCS/ARM_CM4F/portasm.asm
@@ -1,5 +1,5 @@
 ;/*

-;    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+;    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

 ;    All rights reserved

 ;

 ;    VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Source/portable/CCS/ARM_CM4F/portmacro.h b/FreeRTOS/Source/portable/CCS/ARM_CM4F/portmacro.h
index 0408f27..3ba5408 100644
--- a/FreeRTOS/Source/portable/CCS/ARM_CM4F/portmacro.h
+++ b/FreeRTOS/Source/portable/CCS/ARM_CM4F/portmacro.h
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Source/portable/CCS/ARM_Cortex-R4/port.c b/FreeRTOS/Source/portable/CCS/ARM_Cortex-R4/port.c
index 9063a2d..75e59fb 100644
--- a/FreeRTOS/Source/portable/CCS/ARM_Cortex-R4/port.c
+++ b/FreeRTOS/Source/portable/CCS/ARM_Cortex-R4/port.c
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Source/portable/CCS/ARM_Cortex-R4/portASM.asm b/FreeRTOS/Source/portable/CCS/ARM_Cortex-R4/portASM.asm
index 8c418ff..9e9620b 100644
--- a/FreeRTOS/Source/portable/CCS/ARM_Cortex-R4/portASM.asm
+++ b/FreeRTOS/Source/portable/CCS/ARM_Cortex-R4/portASM.asm
@@ -1,5 +1,5 @@
 ;/*

-;    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+;    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

 ;    All rights reserved

 ;

 ;

diff --git a/FreeRTOS/Source/portable/CCS/ARM_Cortex-R4/portmacro.h b/FreeRTOS/Source/portable/CCS/ARM_Cortex-R4/portmacro.h
index 721f971..a5b3c80 100644
--- a/FreeRTOS/Source/portable/CCS/ARM_Cortex-R4/portmacro.h
+++ b/FreeRTOS/Source/portable/CCS/ARM_Cortex-R4/portmacro.h
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Source/portable/CCS/MSP430X/data_model.h b/FreeRTOS/Source/portable/CCS/MSP430X/data_model.h
index fbf0de7..4f03ff5 100644
--- a/FreeRTOS/Source/portable/CCS/MSP430X/data_model.h
+++ b/FreeRTOS/Source/portable/CCS/MSP430X/data_model.h
@@ -1,5 +1,5 @@
 ;/*

-;    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+;    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

 ;    All rights reserved

 ;	

 ;

diff --git a/FreeRTOS/Source/portable/CCS/MSP430X/port.c b/FreeRTOS/Source/portable/CCS/MSP430X/port.c
index 1fa200b..192bef2 100644
--- a/FreeRTOS/Source/portable/CCS/MSP430X/port.c
+++ b/FreeRTOS/Source/portable/CCS/MSP430X/port.c
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Source/portable/CCS/MSP430X/portext.asm b/FreeRTOS/Source/portable/CCS/MSP430X/portext.asm
index f61344f..609a1e1 100644
--- a/FreeRTOS/Source/portable/CCS/MSP430X/portext.asm
+++ b/FreeRTOS/Source/portable/CCS/MSP430X/portext.asm
@@ -1,6 +1,6 @@
 ;

 ;/*

-;    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+;    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

 ;    All rights reserved

 ;

 ;

diff --git a/FreeRTOS/Source/portable/CCS/MSP430X/portmacro.h b/FreeRTOS/Source/portable/CCS/MSP430X/portmacro.h
index 8206ec0..7a4ee65 100644
--- a/FreeRTOS/Source/portable/CCS/MSP430X/portmacro.h
+++ b/FreeRTOS/Source/portable/CCS/MSP430X/portmacro.h
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Source/portable/CodeWarrior/ColdFire_V1/port.c b/FreeRTOS/Source/portable/CodeWarrior/ColdFire_V1/port.c
index 16a1977..4b088ee 100644
--- a/FreeRTOS/Source/portable/CodeWarrior/ColdFire_V1/port.c
+++ b/FreeRTOS/Source/portable/CodeWarrior/ColdFire_V1/port.c
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Source/portable/CodeWarrior/ColdFire_V1/portasm.S b/FreeRTOS/Source/portable/CodeWarrior/ColdFire_V1/portasm.S
index 8ac30b6..4bd3ef2 100644
--- a/FreeRTOS/Source/portable/CodeWarrior/ColdFire_V1/portasm.S
+++ b/FreeRTOS/Source/portable/CodeWarrior/ColdFire_V1/portasm.S
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Source/portable/CodeWarrior/ColdFire_V1/portmacro.h b/FreeRTOS/Source/portable/CodeWarrior/ColdFire_V1/portmacro.h
index 959fd91..22f6d3f 100644
--- a/FreeRTOS/Source/portable/CodeWarrior/ColdFire_V1/portmacro.h
+++ b/FreeRTOS/Source/portable/CodeWarrior/ColdFire_V1/portmacro.h
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Source/portable/CodeWarrior/ColdFire_V2/port.c b/FreeRTOS/Source/portable/CodeWarrior/ColdFire_V2/port.c
index 1603d39..ec830c7 100644
--- a/FreeRTOS/Source/portable/CodeWarrior/ColdFire_V2/port.c
+++ b/FreeRTOS/Source/portable/CodeWarrior/ColdFire_V2/port.c
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Source/portable/CodeWarrior/ColdFire_V2/portasm.S b/FreeRTOS/Source/portable/CodeWarrior/ColdFire_V2/portasm.S
index 0b412d3..71b5c36 100644
--- a/FreeRTOS/Source/portable/CodeWarrior/ColdFire_V2/portasm.S
+++ b/FreeRTOS/Source/portable/CodeWarrior/ColdFire_V2/portasm.S
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Source/portable/CodeWarrior/ColdFire_V2/portmacro.h b/FreeRTOS/Source/portable/CodeWarrior/ColdFire_V2/portmacro.h
index c0f479b..e86306c 100644
--- a/FreeRTOS/Source/portable/CodeWarrior/ColdFire_V2/portmacro.h
+++ b/FreeRTOS/Source/portable/CodeWarrior/ColdFire_V2/portmacro.h
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Source/portable/CodeWarrior/HCS12/port.c b/FreeRTOS/Source/portable/CodeWarrior/HCS12/port.c
index beda749..83e9860 100644
--- a/FreeRTOS/Source/portable/CodeWarrior/HCS12/port.c
+++ b/FreeRTOS/Source/portable/CodeWarrior/HCS12/port.c
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Source/portable/CodeWarrior/HCS12/portmacro.h b/FreeRTOS/Source/portable/CodeWarrior/HCS12/portmacro.h
index 01dcddc..66696f3 100644
--- a/FreeRTOS/Source/portable/CodeWarrior/HCS12/portmacro.h
+++ b/FreeRTOS/Source/portable/CodeWarrior/HCS12/portmacro.h
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Source/portable/GCC/ARM7_AT91FR40008/port.c b/FreeRTOS/Source/portable/GCC/ARM7_AT91FR40008/port.c
index 6c27e06..6c9c419 100644
--- a/FreeRTOS/Source/portable/GCC/ARM7_AT91FR40008/port.c
+++ b/FreeRTOS/Source/portable/GCC/ARM7_AT91FR40008/port.c
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Source/portable/GCC/ARM7_AT91FR40008/portISR.c b/FreeRTOS/Source/portable/GCC/ARM7_AT91FR40008/portISR.c
index 2b0990a..cd486f2 100644
--- a/FreeRTOS/Source/portable/GCC/ARM7_AT91FR40008/portISR.c
+++ b/FreeRTOS/Source/portable/GCC/ARM7_AT91FR40008/portISR.c
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Source/portable/GCC/ARM7_AT91FR40008/portmacro.h b/FreeRTOS/Source/portable/GCC/ARM7_AT91FR40008/portmacro.h
index 6306742..0b5f732 100644
--- a/FreeRTOS/Source/portable/GCC/ARM7_AT91FR40008/portmacro.h
+++ b/FreeRTOS/Source/portable/GCC/ARM7_AT91FR40008/portmacro.h
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Source/portable/GCC/ARM7_AT91SAM7S/port.c b/FreeRTOS/Source/portable/GCC/ARM7_AT91SAM7S/port.c
index 67f9aa1..35ac768 100644
--- a/FreeRTOS/Source/portable/GCC/ARM7_AT91SAM7S/port.c
+++ b/FreeRTOS/Source/portable/GCC/ARM7_AT91SAM7S/port.c
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Source/portable/GCC/ARM7_AT91SAM7S/portISR.c b/FreeRTOS/Source/portable/GCC/ARM7_AT91SAM7S/portISR.c
index 697fd52..1ea0847 100644
--- a/FreeRTOS/Source/portable/GCC/ARM7_AT91SAM7S/portISR.c
+++ b/FreeRTOS/Source/portable/GCC/ARM7_AT91SAM7S/portISR.c
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Source/portable/GCC/ARM7_AT91SAM7S/portmacro.h b/FreeRTOS/Source/portable/GCC/ARM7_AT91SAM7S/portmacro.h
index f9a5dee..f14b284 100644
--- a/FreeRTOS/Source/portable/GCC/ARM7_AT91SAM7S/portmacro.h
+++ b/FreeRTOS/Source/portable/GCC/ARM7_AT91SAM7S/portmacro.h
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Source/portable/GCC/ARM7_LPC2000/port.c b/FreeRTOS/Source/portable/GCC/ARM7_LPC2000/port.c
index 39a261d..3650423 100644
--- a/FreeRTOS/Source/portable/GCC/ARM7_LPC2000/port.c
+++ b/FreeRTOS/Source/portable/GCC/ARM7_LPC2000/port.c
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Source/portable/GCC/ARM7_LPC2000/portISR.c b/FreeRTOS/Source/portable/GCC/ARM7_LPC2000/portISR.c
index 4d35626..3fb05d9 100644
--- a/FreeRTOS/Source/portable/GCC/ARM7_LPC2000/portISR.c
+++ b/FreeRTOS/Source/portable/GCC/ARM7_LPC2000/portISR.c
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Source/portable/GCC/ARM7_LPC2000/portmacro.h b/FreeRTOS/Source/portable/GCC/ARM7_LPC2000/portmacro.h
index b7f2b0a..4155eea 100644
--- a/FreeRTOS/Source/portable/GCC/ARM7_LPC2000/portmacro.h
+++ b/FreeRTOS/Source/portable/GCC/ARM7_LPC2000/portmacro.h
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Source/portable/GCC/ARM7_LPC23xx/port.c b/FreeRTOS/Source/portable/GCC/ARM7_LPC23xx/port.c
index faf5dfb..f5e2f76 100644
--- a/FreeRTOS/Source/portable/GCC/ARM7_LPC23xx/port.c
+++ b/FreeRTOS/Source/portable/GCC/ARM7_LPC23xx/port.c
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Source/portable/GCC/ARM7_LPC23xx/portISR.c b/FreeRTOS/Source/portable/GCC/ARM7_LPC23xx/portISR.c
index a9f656f..f7bcc6f 100644
--- a/FreeRTOS/Source/portable/GCC/ARM7_LPC23xx/portISR.c
+++ b/FreeRTOS/Source/portable/GCC/ARM7_LPC23xx/portISR.c
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Source/portable/GCC/ARM7_LPC23xx/portmacro.h b/FreeRTOS/Source/portable/GCC/ARM7_LPC23xx/portmacro.h
index 52d9b8a..b1db679 100644
--- a/FreeRTOS/Source/portable/GCC/ARM7_LPC23xx/portmacro.h
+++ b/FreeRTOS/Source/portable/GCC/ARM7_LPC23xx/portmacro.h
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Source/portable/GCC/ARM_CA9/port.c b/FreeRTOS/Source/portable/GCC/ARM_CA9/port.c
index 7fb4f7e..c57b0ce 100644
--- a/FreeRTOS/Source/portable/GCC/ARM_CA9/port.c
+++ b/FreeRTOS/Source/portable/GCC/ARM_CA9/port.c
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Source/portable/GCC/ARM_CA9/portASM.S b/FreeRTOS/Source/portable/GCC/ARM_CA9/portASM.S
index 262b10f..cdae8fc 100644
--- a/FreeRTOS/Source/portable/GCC/ARM_CA9/portASM.S
+++ b/FreeRTOS/Source/portable/GCC/ARM_CA9/portASM.S
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

 

diff --git a/FreeRTOS/Source/portable/GCC/ARM_CA9/portmacro.h b/FreeRTOS/Source/portable/GCC/ARM_CA9/portmacro.h
index ba1ca3d..c83dd3d 100644
--- a/FreeRTOS/Source/portable/GCC/ARM_CA9/portmacro.h
+++ b/FreeRTOS/Source/portable/GCC/ARM_CA9/portmacro.h
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Source/portable/GCC/ARM_CM0/port.c b/FreeRTOS/Source/portable/GCC/ARM_CM0/port.c
index 6654a93..3946bad 100644
--- a/FreeRTOS/Source/portable/GCC/ARM_CM0/port.c
+++ b/FreeRTOS/Source/portable/GCC/ARM_CM0/port.c
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Source/portable/GCC/ARM_CM0/portmacro.h b/FreeRTOS/Source/portable/GCC/ARM_CM0/portmacro.h
index 54c219e..d324883 100644
--- a/FreeRTOS/Source/portable/GCC/ARM_CM0/portmacro.h
+++ b/FreeRTOS/Source/portable/GCC/ARM_CM0/portmacro.h
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Source/portable/GCC/ARM_CM3/port.c b/FreeRTOS/Source/portable/GCC/ARM_CM3/port.c
index 64cf151..28f5889 100644
--- a/FreeRTOS/Source/portable/GCC/ARM_CM3/port.c
+++ b/FreeRTOS/Source/portable/GCC/ARM_CM3/port.c
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Source/portable/GCC/ARM_CM3/portmacro.h b/FreeRTOS/Source/portable/GCC/ARM_CM3/portmacro.h
index 7c06291..fa39952 100644
--- a/FreeRTOS/Source/portable/GCC/ARM_CM3/portmacro.h
+++ b/FreeRTOS/Source/portable/GCC/ARM_CM3/portmacro.h
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Source/portable/GCC/ARM_CM3_MPU/port.c b/FreeRTOS/Source/portable/GCC/ARM_CM3_MPU/port.c
index 3ff5d55..356cabe 100644
--- a/FreeRTOS/Source/portable/GCC/ARM_CM3_MPU/port.c
+++ b/FreeRTOS/Source/portable/GCC/ARM_CM3_MPU/port.c
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Source/portable/GCC/ARM_CM3_MPU/portmacro.h b/FreeRTOS/Source/portable/GCC/ARM_CM3_MPU/portmacro.h
index 7e22ccb..0725d9e 100644
--- a/FreeRTOS/Source/portable/GCC/ARM_CM3_MPU/portmacro.h
+++ b/FreeRTOS/Source/portable/GCC/ARM_CM3_MPU/portmacro.h
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Source/portable/GCC/ARM_CM4F/port.c b/FreeRTOS/Source/portable/GCC/ARM_CM4F/port.c
index 6292671..b99fdfb 100644
--- a/FreeRTOS/Source/portable/GCC/ARM_CM4F/port.c
+++ b/FreeRTOS/Source/portable/GCC/ARM_CM4F/port.c
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Source/portable/GCC/ARM_CM4F/portmacro.h b/FreeRTOS/Source/portable/GCC/ARM_CM4F/portmacro.h
index d00592b..8bff41d 100644
--- a/FreeRTOS/Source/portable/GCC/ARM_CM4F/portmacro.h
+++ b/FreeRTOS/Source/portable/GCC/ARM_CM4F/portmacro.h
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Source/portable/GCC/ARM_CM7/r0p1/port.c b/FreeRTOS/Source/portable/GCC/ARM_CM7/r0p1/port.c
index 588cbf0..3285390 100644
--- a/FreeRTOS/Source/portable/GCC/ARM_CM7/r0p1/port.c
+++ b/FreeRTOS/Source/portable/GCC/ARM_CM7/r0p1/port.c
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Source/portable/GCC/ARM_CM7/r0p1/portmacro.h b/FreeRTOS/Source/portable/GCC/ARM_CM7/r0p1/portmacro.h
index dd331ef..60df2b1 100644
--- a/FreeRTOS/Source/portable/GCC/ARM_CM7/r0p1/portmacro.h
+++ b/FreeRTOS/Source/portable/GCC/ARM_CM7/r0p1/portmacro.h
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Source/portable/GCC/ATMega323/port.c b/FreeRTOS/Source/portable/GCC/ATMega323/port.c
index c82c3f9..e010b31 100644
--- a/FreeRTOS/Source/portable/GCC/ATMega323/port.c
+++ b/FreeRTOS/Source/portable/GCC/ATMega323/port.c
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Source/portable/GCC/ATMega323/portmacro.h b/FreeRTOS/Source/portable/GCC/ATMega323/portmacro.h
index 839e76c..b0fee7d 100644
--- a/FreeRTOS/Source/portable/GCC/ATMega323/portmacro.h
+++ b/FreeRTOS/Source/portable/GCC/ATMega323/portmacro.h
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Source/portable/GCC/AVR32_UC3/port.c b/FreeRTOS/Source/portable/GCC/AVR32_UC3/port.c
index 395cea6..99d70fe 100644
--- a/FreeRTOS/Source/portable/GCC/AVR32_UC3/port.c
+++ b/FreeRTOS/Source/portable/GCC/AVR32_UC3/port.c
@@ -13,7 +13,7 @@
  *****************************************************************************/

 

 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Source/portable/GCC/AVR32_UC3/portmacro.h b/FreeRTOS/Source/portable/GCC/AVR32_UC3/portmacro.h
index a02f712..1e051f8 100644
--- a/FreeRTOS/Source/portable/GCC/AVR32_UC3/portmacro.h
+++ b/FreeRTOS/Source/portable/GCC/AVR32_UC3/portmacro.h
@@ -13,7 +13,7 @@
  *****************************************************************************/

 

 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Source/portable/GCC/CORTUS_APS3/port.c b/FreeRTOS/Source/portable/GCC/CORTUS_APS3/port.c
index 52ca374..281bca5 100644
--- a/FreeRTOS/Source/portable/GCC/CORTUS_APS3/port.c
+++ b/FreeRTOS/Source/portable/GCC/CORTUS_APS3/port.c
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Source/portable/GCC/CORTUS_APS3/portmacro.h b/FreeRTOS/Source/portable/GCC/CORTUS_APS3/portmacro.h
index 20f84be..0bfe3c9 100644
--- a/FreeRTOS/Source/portable/GCC/CORTUS_APS3/portmacro.h
+++ b/FreeRTOS/Source/portable/GCC/CORTUS_APS3/portmacro.h
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Source/portable/GCC/ColdFire_V2/port.c b/FreeRTOS/Source/portable/GCC/ColdFire_V2/port.c
index 8c73229..0f41e4c 100644
--- a/FreeRTOS/Source/portable/GCC/ColdFire_V2/port.c
+++ b/FreeRTOS/Source/portable/GCC/ColdFire_V2/port.c
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Source/portable/GCC/ColdFire_V2/portasm.S b/FreeRTOS/Source/portable/GCC/ColdFire_V2/portasm.S
index 6e57c16..af2b77a 100644
--- a/FreeRTOS/Source/portable/GCC/ColdFire_V2/portasm.S
+++ b/FreeRTOS/Source/portable/GCC/ColdFire_V2/portasm.S
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Source/portable/GCC/ColdFire_V2/portmacro.h b/FreeRTOS/Source/portable/GCC/ColdFire_V2/portmacro.h
index b59a637..6e94481 100644
--- a/FreeRTOS/Source/portable/GCC/ColdFire_V2/portmacro.h
+++ b/FreeRTOS/Source/portable/GCC/ColdFire_V2/portmacro.h
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Source/portable/GCC/H8S2329/port.c b/FreeRTOS/Source/portable/GCC/H8S2329/port.c
index 029279f..62f3f8f 100644
--- a/FreeRTOS/Source/portable/GCC/H8S2329/port.c
+++ b/FreeRTOS/Source/portable/GCC/H8S2329/port.c
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Source/portable/GCC/H8S2329/portmacro.h b/FreeRTOS/Source/portable/GCC/H8S2329/portmacro.h
index ee4bdad..62b2c85 100644
--- a/FreeRTOS/Source/portable/GCC/H8S2329/portmacro.h
+++ b/FreeRTOS/Source/portable/GCC/H8S2329/portmacro.h
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Source/portable/GCC/HCS12/port.c b/FreeRTOS/Source/portable/GCC/HCS12/port.c
index 3a15c5a..0c46ff8 100644
--- a/FreeRTOS/Source/portable/GCC/HCS12/port.c
+++ b/FreeRTOS/Source/portable/GCC/HCS12/port.c
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Source/portable/GCC/HCS12/portmacro.h b/FreeRTOS/Source/portable/GCC/HCS12/portmacro.h
index 5edd26e..ea10596 100644
--- a/FreeRTOS/Source/portable/GCC/HCS12/portmacro.h
+++ b/FreeRTOS/Source/portable/GCC/HCS12/portmacro.h
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Source/portable/GCC/IA32_flat/ISR_Support.h b/FreeRTOS/Source/portable/GCC/IA32_flat/ISR_Support.h
index 10a4335..dc50088 100644
--- a/FreeRTOS/Source/portable/GCC/IA32_flat/ISR_Support.h
+++ b/FreeRTOS/Source/portable/GCC/IA32_flat/ISR_Support.h
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Source/portable/GCC/IA32_flat/port.c b/FreeRTOS/Source/portable/GCC/IA32_flat/port.c
index e277195..8907864 100644
--- a/FreeRTOS/Source/portable/GCC/IA32_flat/port.c
+++ b/FreeRTOS/Source/portable/GCC/IA32_flat/port.c
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Source/portable/GCC/IA32_flat/portASM.S b/FreeRTOS/Source/portable/GCC/IA32_flat/portASM.S
index a8029ae..0fe732e 100644
--- a/FreeRTOS/Source/portable/GCC/IA32_flat/portASM.S
+++ b/FreeRTOS/Source/portable/GCC/IA32_flat/portASM.S
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Source/portable/GCC/IA32_flat/portmacro.h b/FreeRTOS/Source/portable/GCC/IA32_flat/portmacro.h
index 4cf7dc8..d78f366 100644
--- a/FreeRTOS/Source/portable/GCC/IA32_flat/portmacro.h
+++ b/FreeRTOS/Source/portable/GCC/IA32_flat/portmacro.h
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Source/portable/GCC/MSP430F449/port.c b/FreeRTOS/Source/portable/GCC/MSP430F449/port.c
index 996706f..fc28f5c 100644
--- a/FreeRTOS/Source/portable/GCC/MSP430F449/port.c
+++ b/FreeRTOS/Source/portable/GCC/MSP430F449/port.c
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Source/portable/GCC/MSP430F449/portmacro.h b/FreeRTOS/Source/portable/GCC/MSP430F449/portmacro.h
index 843b40c..c0df4de 100644
--- a/FreeRTOS/Source/portable/GCC/MSP430F449/portmacro.h
+++ b/FreeRTOS/Source/portable/GCC/MSP430F449/portmacro.h
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Source/portable/GCC/MicroBlaze/port.c b/FreeRTOS/Source/portable/GCC/MicroBlaze/port.c
index 3ae975a..a3ebdde 100644
--- a/FreeRTOS/Source/portable/GCC/MicroBlaze/port.c
+++ b/FreeRTOS/Source/portable/GCC/MicroBlaze/port.c
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Source/portable/GCC/MicroBlaze/portasm.s b/FreeRTOS/Source/portable/GCC/MicroBlaze/portasm.s
index 1f9a97e..a4ec114 100644
--- a/FreeRTOS/Source/portable/GCC/MicroBlaze/portasm.s
+++ b/FreeRTOS/Source/portable/GCC/MicroBlaze/portasm.s
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Source/portable/GCC/MicroBlaze/portmacro.h b/FreeRTOS/Source/portable/GCC/MicroBlaze/portmacro.h
index 69ac04a..52b1950 100644
--- a/FreeRTOS/Source/portable/GCC/MicroBlaze/portmacro.h
+++ b/FreeRTOS/Source/portable/GCC/MicroBlaze/portmacro.h
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Source/portable/GCC/MicroBlazeV8/port.c b/FreeRTOS/Source/portable/GCC/MicroBlazeV8/port.c
index 83fe8ab..8f5ebbf 100644
--- a/FreeRTOS/Source/portable/GCC/MicroBlazeV8/port.c
+++ b/FreeRTOS/Source/portable/GCC/MicroBlazeV8/port.c
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Source/portable/GCC/MicroBlazeV8/port_exceptions.c b/FreeRTOS/Source/portable/GCC/MicroBlazeV8/port_exceptions.c
index 69d1fc7..2081c4f 100644
--- a/FreeRTOS/Source/portable/GCC/MicroBlazeV8/port_exceptions.c
+++ b/FreeRTOS/Source/portable/GCC/MicroBlazeV8/port_exceptions.c
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Source/portable/GCC/MicroBlazeV8/portasm.S b/FreeRTOS/Source/portable/GCC/MicroBlazeV8/portasm.S
index 33211e7..097f0e5 100644
--- a/FreeRTOS/Source/portable/GCC/MicroBlazeV8/portasm.S
+++ b/FreeRTOS/Source/portable/GCC/MicroBlazeV8/portasm.S
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Source/portable/GCC/MicroBlazeV8/portmacro.h b/FreeRTOS/Source/portable/GCC/MicroBlazeV8/portmacro.h
index fb7b87b..1b4d701 100644
--- a/FreeRTOS/Source/portable/GCC/MicroBlazeV8/portmacro.h
+++ b/FreeRTOS/Source/portable/GCC/MicroBlazeV8/portmacro.h
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Source/portable/GCC/NiosII/port.c b/FreeRTOS/Source/portable/GCC/NiosII/port.c
index 11f953a..54a2175 100644
--- a/FreeRTOS/Source/portable/GCC/NiosII/port.c
+++ b/FreeRTOS/Source/portable/GCC/NiosII/port.c
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Source/portable/GCC/NiosII/port_asm.S b/FreeRTOS/Source/portable/GCC/NiosII/port_asm.S
index d26f472..2bc4a87 100644
--- a/FreeRTOS/Source/portable/GCC/NiosII/port_asm.S
+++ b/FreeRTOS/Source/portable/GCC/NiosII/port_asm.S
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Source/portable/GCC/NiosII/portmacro.h b/FreeRTOS/Source/portable/GCC/NiosII/portmacro.h
index 5b9958c..0ffba99 100644
--- a/FreeRTOS/Source/portable/GCC/NiosII/portmacro.h
+++ b/FreeRTOS/Source/portable/GCC/NiosII/portmacro.h
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Source/portable/GCC/PPC405_Xilinx/FPU_Macros.h b/FreeRTOS/Source/portable/GCC/PPC405_Xilinx/FPU_Macros.h
index 7d6894b..0c9f319 100644
--- a/FreeRTOS/Source/portable/GCC/PPC405_Xilinx/FPU_Macros.h
+++ b/FreeRTOS/Source/portable/GCC/PPC405_Xilinx/FPU_Macros.h
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Source/portable/GCC/PPC405_Xilinx/port.c b/FreeRTOS/Source/portable/GCC/PPC405_Xilinx/port.c
index 477e28c..1aa40c7 100644
--- a/FreeRTOS/Source/portable/GCC/PPC405_Xilinx/port.c
+++ b/FreeRTOS/Source/portable/GCC/PPC405_Xilinx/port.c
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Source/portable/GCC/PPC405_Xilinx/portasm.S b/FreeRTOS/Source/portable/GCC/PPC405_Xilinx/portasm.S
index cc25f5c..d42b7aa 100644
--- a/FreeRTOS/Source/portable/GCC/PPC405_Xilinx/portasm.S
+++ b/FreeRTOS/Source/portable/GCC/PPC405_Xilinx/portasm.S
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Source/portable/GCC/PPC405_Xilinx/portmacro.h b/FreeRTOS/Source/portable/GCC/PPC405_Xilinx/portmacro.h
index 2fef1cd..1f65d23 100644
--- a/FreeRTOS/Source/portable/GCC/PPC405_Xilinx/portmacro.h
+++ b/FreeRTOS/Source/portable/GCC/PPC405_Xilinx/portmacro.h
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Source/portable/GCC/PPC440_Xilinx/FPU_Macros.h b/FreeRTOS/Source/portable/GCC/PPC440_Xilinx/FPU_Macros.h
index 7d6894b..0c9f319 100644
--- a/FreeRTOS/Source/portable/GCC/PPC440_Xilinx/FPU_Macros.h
+++ b/FreeRTOS/Source/portable/GCC/PPC440_Xilinx/FPU_Macros.h
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Source/portable/GCC/PPC440_Xilinx/port.c b/FreeRTOS/Source/portable/GCC/PPC440_Xilinx/port.c
index 50fcc34..a7aa8c7 100644
--- a/FreeRTOS/Source/portable/GCC/PPC440_Xilinx/port.c
+++ b/FreeRTOS/Source/portable/GCC/PPC440_Xilinx/port.c
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Source/portable/GCC/PPC440_Xilinx/portasm.S b/FreeRTOS/Source/portable/GCC/PPC440_Xilinx/portasm.S
index cc25f5c..d42b7aa 100644
--- a/FreeRTOS/Source/portable/GCC/PPC440_Xilinx/portasm.S
+++ b/FreeRTOS/Source/portable/GCC/PPC440_Xilinx/portasm.S
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Source/portable/GCC/PPC440_Xilinx/portmacro.h b/FreeRTOS/Source/portable/GCC/PPC440_Xilinx/portmacro.h
index 2fef1cd..1f65d23 100644
--- a/FreeRTOS/Source/portable/GCC/PPC440_Xilinx/portmacro.h
+++ b/FreeRTOS/Source/portable/GCC/PPC440_Xilinx/portmacro.h
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Source/portable/GCC/RX100/port.c b/FreeRTOS/Source/portable/GCC/RX100/port.c
index 1fdabe8..8ba84cd 100644
--- a/FreeRTOS/Source/portable/GCC/RX100/port.c
+++ b/FreeRTOS/Source/portable/GCC/RX100/port.c
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Source/portable/GCC/RX100/portmacro.h b/FreeRTOS/Source/portable/GCC/RX100/portmacro.h
index e87e79a..d1595de 100644
--- a/FreeRTOS/Source/portable/GCC/RX100/portmacro.h
+++ b/FreeRTOS/Source/portable/GCC/RX100/portmacro.h
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Source/portable/GCC/RX600/port.c b/FreeRTOS/Source/portable/GCC/RX600/port.c
index 205f4cf..0f4fb15 100644
--- a/FreeRTOS/Source/portable/GCC/RX600/port.c
+++ b/FreeRTOS/Source/portable/GCC/RX600/port.c
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Source/portable/GCC/RX600/portmacro.h b/FreeRTOS/Source/portable/GCC/RX600/portmacro.h
index 625a506..0c76e12 100644
--- a/FreeRTOS/Source/portable/GCC/RX600/portmacro.h
+++ b/FreeRTOS/Source/portable/GCC/RX600/portmacro.h
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Source/portable/GCC/RX600v2/port.c b/FreeRTOS/Source/portable/GCC/RX600v2/port.c
index 033a090..88ee12c 100644
--- a/FreeRTOS/Source/portable/GCC/RX600v2/port.c
+++ b/FreeRTOS/Source/portable/GCC/RX600v2/port.c
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Source/portable/GCC/RX600v2/portmacro.h b/FreeRTOS/Source/portable/GCC/RX600v2/portmacro.h
index 625a506..0c76e12 100644
--- a/FreeRTOS/Source/portable/GCC/RX600v2/portmacro.h
+++ b/FreeRTOS/Source/portable/GCC/RX600v2/portmacro.h
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Source/portable/GCC/STR75x/port.c b/FreeRTOS/Source/portable/GCC/STR75x/port.c
index 5806e36..628d579 100644
--- a/FreeRTOS/Source/portable/GCC/STR75x/port.c
+++ b/FreeRTOS/Source/portable/GCC/STR75x/port.c
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Source/portable/GCC/STR75x/portISR.c b/FreeRTOS/Source/portable/GCC/STR75x/portISR.c
index f5c9367..9056d35 100644
--- a/FreeRTOS/Source/portable/GCC/STR75x/portISR.c
+++ b/FreeRTOS/Source/portable/GCC/STR75x/portISR.c
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Source/portable/GCC/STR75x/portmacro.h b/FreeRTOS/Source/portable/GCC/STR75x/portmacro.h
index d705d3d..7266f46 100644
--- a/FreeRTOS/Source/portable/GCC/STR75x/portmacro.h
+++ b/FreeRTOS/Source/portable/GCC/STR75x/portmacro.h
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Source/portable/GCC/TriCore_1782/port.c b/FreeRTOS/Source/portable/GCC/TriCore_1782/port.c
index 07825c1..d86db4d 100644
--- a/FreeRTOS/Source/portable/GCC/TriCore_1782/port.c
+++ b/FreeRTOS/Source/portable/GCC/TriCore_1782/port.c
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Source/portable/GCC/TriCore_1782/portmacro.h b/FreeRTOS/Source/portable/GCC/TriCore_1782/portmacro.h
index 929c854..65ceebf 100644
--- a/FreeRTOS/Source/portable/GCC/TriCore_1782/portmacro.h
+++ b/FreeRTOS/Source/portable/GCC/TriCore_1782/portmacro.h
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Source/portable/GCC/TriCore_1782/porttrap.c b/FreeRTOS/Source/portable/GCC/TriCore_1782/porttrap.c
index 538fe22..624c9ab 100644
--- a/FreeRTOS/Source/portable/GCC/TriCore_1782/porttrap.c
+++ b/FreeRTOS/Source/portable/GCC/TriCore_1782/porttrap.c
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Source/portable/IAR/78K0R/ISR_Support.h b/FreeRTOS/Source/portable/IAR/78K0R/ISR_Support.h
index 255ebae..baabc16 100644
--- a/FreeRTOS/Source/portable/IAR/78K0R/ISR_Support.h
+++ b/FreeRTOS/Source/portable/IAR/78K0R/ISR_Support.h
@@ -1,5 +1,5 @@
 ;/*

-;    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+;    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

 ;    All rights reserved

 ;	

 ;

diff --git a/FreeRTOS/Source/portable/IAR/78K0R/port.c b/FreeRTOS/Source/portable/IAR/78K0R/port.c
index 2a92b70..8c264c3 100644
--- a/FreeRTOS/Source/portable/IAR/78K0R/port.c
+++ b/FreeRTOS/Source/portable/IAR/78K0R/port.c
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Source/portable/IAR/78K0R/portasm.s26 b/FreeRTOS/Source/portable/IAR/78K0R/portasm.s26
index c16fb3a..b98bad1 100644
--- a/FreeRTOS/Source/portable/IAR/78K0R/portasm.s26
+++ b/FreeRTOS/Source/portable/IAR/78K0R/portasm.s26
@@ -1,5 +1,5 @@
 ;/*

-;    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+;    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

 ;    All rights reserved

 ;	

 ;

diff --git a/FreeRTOS/Source/portable/IAR/78K0R/portmacro.h b/FreeRTOS/Source/portable/IAR/78K0R/portmacro.h
index d645e05..2ebcecc 100644
--- a/FreeRTOS/Source/portable/IAR/78K0R/portmacro.h
+++ b/FreeRTOS/Source/portable/IAR/78K0R/portmacro.h
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

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 c4bb908..54f8b39 100644
--- a/FreeRTOS/Source/portable/IAR/ARM_CA5_No_GIC/port.c
+++ b/FreeRTOS/Source/portable/IAR/ARM_CA5_No_GIC/port.c
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

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 60f289c..f1c1319 100644
--- a/FreeRTOS/Source/portable/IAR/ARM_CA5_No_GIC/portASM.h
+++ b/FreeRTOS/Source/portable/IAR/ARM_CA5_No_GIC/portASM.h
@@ -1,5 +1,5 @@
 ;/*

-;    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+;    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

 ;    All rights reserved

 ;

 ;

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 af7e33e..6c17cf3 100644
--- a/FreeRTOS/Source/portable/IAR/ARM_CA5_No_GIC/portASM.s
+++ b/FreeRTOS/Source/portable/IAR/ARM_CA5_No_GIC/portASM.s
@@ -1,5 +1,5 @@
 ;/*

-;    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+;    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

 ;    All rights reserved

 ;

 ;

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 719a47b..9c90647 100644
--- a/FreeRTOS/Source/portable/IAR/ARM_CA5_No_GIC/portmacro.h
+++ b/FreeRTOS/Source/portable/IAR/ARM_CA5_No_GIC/portmacro.h
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Source/portable/IAR/ARM_CA9/port.c b/FreeRTOS/Source/portable/IAR/ARM_CA9/port.c
index 138a6b0..4460a33 100644
--- a/FreeRTOS/Source/portable/IAR/ARM_CA9/port.c
+++ b/FreeRTOS/Source/portable/IAR/ARM_CA9/port.c
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Source/portable/IAR/ARM_CA9/portASM.h b/FreeRTOS/Source/portable/IAR/ARM_CA9/portASM.h
index 0812f53..d24cc02 100644
--- a/FreeRTOS/Source/portable/IAR/ARM_CA9/portASM.h
+++ b/FreeRTOS/Source/portable/IAR/ARM_CA9/portASM.h
@@ -1,5 +1,5 @@
 ;/*

-;    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+;    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

 ;    All rights reserved

 ;

 ;

diff --git a/FreeRTOS/Source/portable/IAR/ARM_CA9/portASM.s b/FreeRTOS/Source/portable/IAR/ARM_CA9/portASM.s
index e7b3920..4bf4992 100644
--- a/FreeRTOS/Source/portable/IAR/ARM_CA9/portASM.s
+++ b/FreeRTOS/Source/portable/IAR/ARM_CA9/portASM.s
@@ -1,5 +1,5 @@
 ;/*

-;    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+;    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

 ;    All rights reserved

 ;

 ;

diff --git a/FreeRTOS/Source/portable/IAR/ARM_CA9/portmacro.h b/FreeRTOS/Source/portable/IAR/ARM_CA9/portmacro.h
index 4f2f925..6ff71f2 100644
--- a/FreeRTOS/Source/portable/IAR/ARM_CA9/portmacro.h
+++ b/FreeRTOS/Source/portable/IAR/ARM_CA9/portmacro.h
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Source/portable/IAR/ARM_CM0/port.c b/FreeRTOS/Source/portable/IAR/ARM_CM0/port.c
index 5ba5f19..e98e910 100644
--- a/FreeRTOS/Source/portable/IAR/ARM_CM0/port.c
+++ b/FreeRTOS/Source/portable/IAR/ARM_CM0/port.c
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Source/portable/IAR/ARM_CM0/portasm.s b/FreeRTOS/Source/portable/IAR/ARM_CM0/portasm.s
index c9cb431..f5132fd 100644
--- a/FreeRTOS/Source/portable/IAR/ARM_CM0/portasm.s
+++ b/FreeRTOS/Source/portable/IAR/ARM_CM0/portasm.s
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Source/portable/IAR/ARM_CM0/portmacro.h b/FreeRTOS/Source/portable/IAR/ARM_CM0/portmacro.h
index c8a1501..ffd05de 100644
--- a/FreeRTOS/Source/portable/IAR/ARM_CM0/portmacro.h
+++ b/FreeRTOS/Source/portable/IAR/ARM_CM0/portmacro.h
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Source/portable/IAR/ARM_CM3/port.c b/FreeRTOS/Source/portable/IAR/ARM_CM3/port.c
index 58963f5..b47ae70 100644
--- a/FreeRTOS/Source/portable/IAR/ARM_CM3/port.c
+++ b/FreeRTOS/Source/portable/IAR/ARM_CM3/port.c
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Source/portable/IAR/ARM_CM3/portasm.s b/FreeRTOS/Source/portable/IAR/ARM_CM3/portasm.s
index 50f1012..237a7eb 100644
--- a/FreeRTOS/Source/portable/IAR/ARM_CM3/portasm.s
+++ b/FreeRTOS/Source/portable/IAR/ARM_CM3/portasm.s
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Source/portable/IAR/ARM_CM3/portmacro.h b/FreeRTOS/Source/portable/IAR/ARM_CM3/portmacro.h
index 1acb363..90cd933 100644
--- a/FreeRTOS/Source/portable/IAR/ARM_CM3/portmacro.h
+++ b/FreeRTOS/Source/portable/IAR/ARM_CM3/portmacro.h
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Source/portable/IAR/ARM_CM4F/port.c b/FreeRTOS/Source/portable/IAR/ARM_CM4F/port.c
index c2cc7a5..d473ecb 100644
--- a/FreeRTOS/Source/portable/IAR/ARM_CM4F/port.c
+++ b/FreeRTOS/Source/portable/IAR/ARM_CM4F/port.c
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Source/portable/IAR/ARM_CM4F/portasm.s b/FreeRTOS/Source/portable/IAR/ARM_CM4F/portasm.s
index 06a94b1..a4df4a2 100644
--- a/FreeRTOS/Source/portable/IAR/ARM_CM4F/portasm.s
+++ b/FreeRTOS/Source/portable/IAR/ARM_CM4F/portasm.s
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Source/portable/IAR/ARM_CM4F/portmacro.h b/FreeRTOS/Source/portable/IAR/ARM_CM4F/portmacro.h
index 7cdad6c..71f612d 100644
--- a/FreeRTOS/Source/portable/IAR/ARM_CM4F/portmacro.h
+++ b/FreeRTOS/Source/portable/IAR/ARM_CM4F/portmacro.h
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Source/portable/IAR/ARM_CM7/r0p1/port.c b/FreeRTOS/Source/portable/IAR/ARM_CM7/r0p1/port.c
index de0a7c7..849552b 100644
--- a/FreeRTOS/Source/portable/IAR/ARM_CM7/r0p1/port.c
+++ b/FreeRTOS/Source/portable/IAR/ARM_CM7/r0p1/port.c
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Source/portable/IAR/ARM_CM7/r0p1/portasm.s b/FreeRTOS/Source/portable/IAR/ARM_CM7/r0p1/portasm.s
index a43e9b6..a945aa6 100644
--- a/FreeRTOS/Source/portable/IAR/ARM_CM7/r0p1/portasm.s
+++ b/FreeRTOS/Source/portable/IAR/ARM_CM7/r0p1/portasm.s
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Source/portable/IAR/ARM_CM7/r0p1/portmacro.h b/FreeRTOS/Source/portable/IAR/ARM_CM7/r0p1/portmacro.h
index 23a704d..fdb2525 100644
--- a/FreeRTOS/Source/portable/IAR/ARM_CM7/r0p1/portmacro.h
+++ b/FreeRTOS/Source/portable/IAR/ARM_CM7/r0p1/portmacro.h
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Source/portable/IAR/ATMega323/port.c b/FreeRTOS/Source/portable/IAR/ATMega323/port.c
index 0171371..34651ef 100644
--- a/FreeRTOS/Source/portable/IAR/ATMega323/port.c
+++ b/FreeRTOS/Source/portable/IAR/ATMega323/port.c
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Source/portable/IAR/ATMega323/portmacro.h b/FreeRTOS/Source/portable/IAR/ATMega323/portmacro.h
index c7fbbd7..eef7b0e 100644
--- a/FreeRTOS/Source/portable/IAR/ATMega323/portmacro.h
+++ b/FreeRTOS/Source/portable/IAR/ATMega323/portmacro.h
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Source/portable/IAR/ATMega323/portmacro.s90 b/FreeRTOS/Source/portable/IAR/ATMega323/portmacro.s90
index d87d5ac..bd53f95 100644
--- a/FreeRTOS/Source/portable/IAR/ATMega323/portmacro.s90
+++ b/FreeRTOS/Source/portable/IAR/ATMega323/portmacro.s90
@@ -1,5 +1,5 @@
 ;/*

-;    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+;    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

 ;    All rights reserved

 ;

 ;

diff --git a/FreeRTOS/Source/portable/IAR/AVR32_UC3/port.c b/FreeRTOS/Source/portable/IAR/AVR32_UC3/port.c
index f152a5e..dfe644a 100644
--- a/FreeRTOS/Source/portable/IAR/AVR32_UC3/port.c
+++ b/FreeRTOS/Source/portable/IAR/AVR32_UC3/port.c
@@ -13,7 +13,7 @@
  *****************************************************************************/

 

 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Source/portable/IAR/AVR32_UC3/portmacro.h b/FreeRTOS/Source/portable/IAR/AVR32_UC3/portmacro.h
index 0c18f19..d72a0ba 100644
--- a/FreeRTOS/Source/portable/IAR/AVR32_UC3/portmacro.h
+++ b/FreeRTOS/Source/portable/IAR/AVR32_UC3/portmacro.h
@@ -13,7 +13,7 @@
  *****************************************************************************/

 

 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Source/portable/IAR/AtmelSAM7S64/ISR_Support.h b/FreeRTOS/Source/portable/IAR/AtmelSAM7S64/ISR_Support.h
index fb65233..28a5d03 100644
--- a/FreeRTOS/Source/portable/IAR/AtmelSAM7S64/ISR_Support.h
+++ b/FreeRTOS/Source/portable/IAR/AtmelSAM7S64/ISR_Support.h
@@ -1,5 +1,5 @@
 ;/*

-;    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+;    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

 ;    All rights reserved

 ;

 ;

diff --git a/FreeRTOS/Source/portable/IAR/AtmelSAM7S64/port.c b/FreeRTOS/Source/portable/IAR/AtmelSAM7S64/port.c
index 615f2cd..b812630 100644
--- a/FreeRTOS/Source/portable/IAR/AtmelSAM7S64/port.c
+++ b/FreeRTOS/Source/portable/IAR/AtmelSAM7S64/port.c
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Source/portable/IAR/AtmelSAM7S64/portasm.s79 b/FreeRTOS/Source/portable/IAR/AtmelSAM7S64/portasm.s79
index 1f1e7e4..91c17d5 100644
--- a/FreeRTOS/Source/portable/IAR/AtmelSAM7S64/portasm.s79
+++ b/FreeRTOS/Source/portable/IAR/AtmelSAM7S64/portasm.s79
@@ -1,5 +1,5 @@
 ;/*

-;    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+;    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

 ;    All rights reserved

 ;

 ;

diff --git a/FreeRTOS/Source/portable/IAR/AtmelSAM7S64/portmacro.h b/FreeRTOS/Source/portable/IAR/AtmelSAM7S64/portmacro.h
index 700e3e0..c048033 100644
--- a/FreeRTOS/Source/portable/IAR/AtmelSAM7S64/portmacro.h
+++ b/FreeRTOS/Source/portable/IAR/AtmelSAM7S64/portmacro.h
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Source/portable/IAR/AtmelSAM9XE/port.c b/FreeRTOS/Source/portable/IAR/AtmelSAM9XE/port.c
index 9c451a0..bddc4bf 100644
--- a/FreeRTOS/Source/portable/IAR/AtmelSAM9XE/port.c
+++ b/FreeRTOS/Source/portable/IAR/AtmelSAM9XE/port.c
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Source/portable/IAR/AtmelSAM9XE/portmacro.h b/FreeRTOS/Source/portable/IAR/AtmelSAM9XE/portmacro.h
index 76d25d1..9ff7d16 100644
--- a/FreeRTOS/Source/portable/IAR/AtmelSAM9XE/portmacro.h
+++ b/FreeRTOS/Source/portable/IAR/AtmelSAM9XE/portmacro.h
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Source/portable/IAR/LPC2000/ISR_Support.h b/FreeRTOS/Source/portable/IAR/LPC2000/ISR_Support.h
index fb65233..28a5d03 100644
--- a/FreeRTOS/Source/portable/IAR/LPC2000/ISR_Support.h
+++ b/FreeRTOS/Source/portable/IAR/LPC2000/ISR_Support.h
@@ -1,5 +1,5 @@
 ;/*

-;    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+;    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

 ;    All rights reserved

 ;

 ;

diff --git a/FreeRTOS/Source/portable/IAR/LPC2000/port.c b/FreeRTOS/Source/portable/IAR/LPC2000/port.c
index 0992bdd..f2f6809 100644
--- a/FreeRTOS/Source/portable/IAR/LPC2000/port.c
+++ b/FreeRTOS/Source/portable/IAR/LPC2000/port.c
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Source/portable/IAR/LPC2000/portasm.s79 b/FreeRTOS/Source/portable/IAR/LPC2000/portasm.s79
index f23ec45..a7dd218 100644
--- a/FreeRTOS/Source/portable/IAR/LPC2000/portasm.s79
+++ b/FreeRTOS/Source/portable/IAR/LPC2000/portasm.s79
@@ -1,5 +1,5 @@
 ;/*

-;    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+;    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

 ;    All rights reserved

 ;

 ;

diff --git a/FreeRTOS/Source/portable/IAR/LPC2000/portmacro.h b/FreeRTOS/Source/portable/IAR/LPC2000/portmacro.h
index 3933f89..390ee7c 100644
--- a/FreeRTOS/Source/portable/IAR/LPC2000/portmacro.h
+++ b/FreeRTOS/Source/portable/IAR/LPC2000/portmacro.h
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Source/portable/IAR/MSP430/port.c b/FreeRTOS/Source/portable/IAR/MSP430/port.c
index b721293..536c7ec 100644
--- a/FreeRTOS/Source/portable/IAR/MSP430/port.c
+++ b/FreeRTOS/Source/portable/IAR/MSP430/port.c
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Source/portable/IAR/MSP430/portasm.h b/FreeRTOS/Source/portable/IAR/MSP430/portasm.h
index 82b7bbd..7b37e0b 100644
--- a/FreeRTOS/Source/portable/IAR/MSP430/portasm.h
+++ b/FreeRTOS/Source/portable/IAR/MSP430/portasm.h
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Source/portable/IAR/MSP430/portext.s43 b/FreeRTOS/Source/portable/IAR/MSP430/portext.s43
index 27293a8..14961f8 100644
--- a/FreeRTOS/Source/portable/IAR/MSP430/portext.s43
+++ b/FreeRTOS/Source/portable/IAR/MSP430/portext.s43
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Source/portable/IAR/MSP430/portmacro.h b/FreeRTOS/Source/portable/IAR/MSP430/portmacro.h
index 89b094c..c545bbc 100644
--- a/FreeRTOS/Source/portable/IAR/MSP430/portmacro.h
+++ b/FreeRTOS/Source/portable/IAR/MSP430/portmacro.h
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Source/portable/IAR/MSP430X/data_model.h b/FreeRTOS/Source/portable/IAR/MSP430X/data_model.h
index 1c341b5..2e32061 100644
--- a/FreeRTOS/Source/portable/IAR/MSP430X/data_model.h
+++ b/FreeRTOS/Source/portable/IAR/MSP430X/data_model.h
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Source/portable/IAR/MSP430X/port.c b/FreeRTOS/Source/portable/IAR/MSP430X/port.c
index 96314f8..03dcca2 100644
--- a/FreeRTOS/Source/portable/IAR/MSP430X/port.c
+++ b/FreeRTOS/Source/portable/IAR/MSP430X/port.c
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Source/portable/IAR/MSP430X/portext.s43 b/FreeRTOS/Source/portable/IAR/MSP430X/portext.s43
index 112b75c..93ffba3 100644
--- a/FreeRTOS/Source/portable/IAR/MSP430X/portext.s43
+++ b/FreeRTOS/Source/portable/IAR/MSP430X/portext.s43
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Source/portable/IAR/MSP430X/portmacro.h b/FreeRTOS/Source/portable/IAR/MSP430X/portmacro.h
index f6ce18d..3d7ac28 100644
--- a/FreeRTOS/Source/portable/IAR/MSP430X/portmacro.h
+++ b/FreeRTOS/Source/portable/IAR/MSP430X/portmacro.h
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Source/portable/IAR/RL78/ISR_Support.h b/FreeRTOS/Source/portable/IAR/RL78/ISR_Support.h
index 5799dfa..b9cb63f 100644
--- a/FreeRTOS/Source/portable/IAR/RL78/ISR_Support.h
+++ b/FreeRTOS/Source/portable/IAR/RL78/ISR_Support.h
@@ -1,5 +1,5 @@
 ;/*

-;    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+;    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

 ;    All rights reserved

 ;	

 ;

diff --git a/FreeRTOS/Source/portable/IAR/RL78/port.c b/FreeRTOS/Source/portable/IAR/RL78/port.c
index 1576130..5242238 100644
--- a/FreeRTOS/Source/portable/IAR/RL78/port.c
+++ b/FreeRTOS/Source/portable/IAR/RL78/port.c
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Source/portable/IAR/RL78/portasm.s87 b/FreeRTOS/Source/portable/IAR/RL78/portasm.s87
index 97551b8..9847a9c 100644
--- a/FreeRTOS/Source/portable/IAR/RL78/portasm.s87
+++ b/FreeRTOS/Source/portable/IAR/RL78/portasm.s87
@@ -1,5 +1,5 @@
 ;/*

-;    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+;    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

 ;    All rights reserved

 ;

 ;

diff --git a/FreeRTOS/Source/portable/IAR/RL78/portmacro.h b/FreeRTOS/Source/portable/IAR/RL78/portmacro.h
index 3e18c8f..ae5932b 100644
--- a/FreeRTOS/Source/portable/IAR/RL78/portmacro.h
+++ b/FreeRTOS/Source/portable/IAR/RL78/portmacro.h
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Source/portable/IAR/RX100/port.c b/FreeRTOS/Source/portable/IAR/RX100/port.c
index eb52783..c600499 100644
--- a/FreeRTOS/Source/portable/IAR/RX100/port.c
+++ b/FreeRTOS/Source/portable/IAR/RX100/port.c
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Source/portable/IAR/RX100/port_asm.s b/FreeRTOS/Source/portable/IAR/RX100/port_asm.s
index bfd7180..6e799a0 100644
--- a/FreeRTOS/Source/portable/IAR/RX100/port_asm.s
+++ b/FreeRTOS/Source/portable/IAR/RX100/port_asm.s
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Source/portable/IAR/RX100/portmacro.h b/FreeRTOS/Source/portable/IAR/RX100/portmacro.h
index 8f2b88b..041be34 100644
--- a/FreeRTOS/Source/portable/IAR/RX100/portmacro.h
+++ b/FreeRTOS/Source/portable/IAR/RX100/portmacro.h
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Source/portable/IAR/RX600/port.c b/FreeRTOS/Source/portable/IAR/RX600/port.c
index 300e309..37c8b52 100644
--- a/FreeRTOS/Source/portable/IAR/RX600/port.c
+++ b/FreeRTOS/Source/portable/IAR/RX600/port.c
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Source/portable/IAR/RX600/port_asm.s b/FreeRTOS/Source/portable/IAR/RX600/port_asm.s
index 7b60dff..e5e9e7d 100644
--- a/FreeRTOS/Source/portable/IAR/RX600/port_asm.s
+++ b/FreeRTOS/Source/portable/IAR/RX600/port_asm.s
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Source/portable/IAR/RX600/portmacro.h b/FreeRTOS/Source/portable/IAR/RX600/portmacro.h
index 192d49f..2dbefc6 100644
--- a/FreeRTOS/Source/portable/IAR/RX600/portmacro.h
+++ b/FreeRTOS/Source/portable/IAR/RX600/portmacro.h
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Source/portable/IAR/STR71x/ISR_Support.h b/FreeRTOS/Source/portable/IAR/STR71x/ISR_Support.h
index fb65233..28a5d03 100644
--- a/FreeRTOS/Source/portable/IAR/STR71x/ISR_Support.h
+++ b/FreeRTOS/Source/portable/IAR/STR71x/ISR_Support.h
@@ -1,5 +1,5 @@
 ;/*

-;    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+;    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

 ;    All rights reserved

 ;

 ;

diff --git a/FreeRTOS/Source/portable/IAR/STR71x/port.c b/FreeRTOS/Source/portable/IAR/STR71x/port.c
index 50ceaac..955255e 100644
--- a/FreeRTOS/Source/portable/IAR/STR71x/port.c
+++ b/FreeRTOS/Source/portable/IAR/STR71x/port.c
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Source/portable/IAR/STR71x/portasm.s79 b/FreeRTOS/Source/portable/IAR/STR71x/portasm.s79
index 1968550..a0b5dc7 100644
--- a/FreeRTOS/Source/portable/IAR/STR71x/portasm.s79
+++ b/FreeRTOS/Source/portable/IAR/STR71x/portasm.s79
@@ -1,5 +1,5 @@
 ;/*

-;    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+;    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

 ;    All rights reserved

 ;

 ;

diff --git a/FreeRTOS/Source/portable/IAR/STR71x/portmacro.h b/FreeRTOS/Source/portable/IAR/STR71x/portmacro.h
index 98be6a7..f2ea582 100644
--- a/FreeRTOS/Source/portable/IAR/STR71x/portmacro.h
+++ b/FreeRTOS/Source/portable/IAR/STR71x/portmacro.h
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Source/portable/IAR/STR75x/ISR_Support.h b/FreeRTOS/Source/portable/IAR/STR75x/ISR_Support.h
index 19bc643..8f29482 100644
--- a/FreeRTOS/Source/portable/IAR/STR75x/ISR_Support.h
+++ b/FreeRTOS/Source/portable/IAR/STR75x/ISR_Support.h
@@ -1,5 +1,5 @@
 ;/*

-;    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+;    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

 ;    All rights reserved

 ;	

 ;

diff --git a/FreeRTOS/Source/portable/IAR/STR75x/port.c b/FreeRTOS/Source/portable/IAR/STR75x/port.c
index a721f82..0eb2e5f 100644
--- a/FreeRTOS/Source/portable/IAR/STR75x/port.c
+++ b/FreeRTOS/Source/portable/IAR/STR75x/port.c
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Source/portable/IAR/STR75x/portasm.s79 b/FreeRTOS/Source/portable/IAR/STR75x/portasm.s79
index 404a136..44769f8 100644
--- a/FreeRTOS/Source/portable/IAR/STR75x/portasm.s79
+++ b/FreeRTOS/Source/portable/IAR/STR75x/portasm.s79
@@ -1,5 +1,5 @@
 ;/*

-;    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+;    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

 ;    All rights reserved

 ;	

 ;

diff --git a/FreeRTOS/Source/portable/IAR/STR75x/portmacro.h b/FreeRTOS/Source/portable/IAR/STR75x/portmacro.h
index b0a18fc..7c17f30 100644
--- a/FreeRTOS/Source/portable/IAR/STR75x/portmacro.h
+++ b/FreeRTOS/Source/portable/IAR/STR75x/portmacro.h
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Source/portable/IAR/STR91x/ISR_Support.h b/FreeRTOS/Source/portable/IAR/STR91x/ISR_Support.h
index eb2e28e..9be3f4f 100644
--- a/FreeRTOS/Source/portable/IAR/STR91x/ISR_Support.h
+++ b/FreeRTOS/Source/portable/IAR/STR91x/ISR_Support.h
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Source/portable/IAR/STR91x/port.c b/FreeRTOS/Source/portable/IAR/STR91x/port.c
index 5d74194..706e995 100644
--- a/FreeRTOS/Source/portable/IAR/STR91x/port.c
+++ b/FreeRTOS/Source/portable/IAR/STR91x/port.c
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Source/portable/IAR/STR91x/portasm.s79 b/FreeRTOS/Source/portable/IAR/STR91x/portasm.s79
index 0657b0f..388d90f 100644
--- a/FreeRTOS/Source/portable/IAR/STR91x/portasm.s79
+++ b/FreeRTOS/Source/portable/IAR/STR91x/portasm.s79
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Source/portable/IAR/STR91x/portmacro.h b/FreeRTOS/Source/portable/IAR/STR91x/portmacro.h
index 9d11bc0..d03abc7 100644
--- a/FreeRTOS/Source/portable/IAR/STR91x/portmacro.h
+++ b/FreeRTOS/Source/portable/IAR/STR91x/portmacro.h
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Source/portable/IAR/V850ES/ISR_Support.h b/FreeRTOS/Source/portable/IAR/V850ES/ISR_Support.h
index b8101a1..4746b47 100644
--- a/FreeRTOS/Source/portable/IAR/V850ES/ISR_Support.h
+++ b/FreeRTOS/Source/portable/IAR/V850ES/ISR_Support.h
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Source/portable/IAR/V850ES/port.c b/FreeRTOS/Source/portable/IAR/V850ES/port.c
index 7aff474..591d348 100644
--- a/FreeRTOS/Source/portable/IAR/V850ES/port.c
+++ b/FreeRTOS/Source/portable/IAR/V850ES/port.c
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Source/portable/IAR/V850ES/portasm.s85 b/FreeRTOS/Source/portable/IAR/V850ES/portasm.s85
index 63c2305..f25d039 100644
--- a/FreeRTOS/Source/portable/IAR/V850ES/portasm.s85
+++ b/FreeRTOS/Source/portable/IAR/V850ES/portasm.s85
@@ -1,5 +1,5 @@
 ;/*

-;    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+;    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

 ;    All rights reserved

 ;	

 ;

diff --git a/FreeRTOS/Source/portable/IAR/V850ES/portasm_Fx3.s85 b/FreeRTOS/Source/portable/IAR/V850ES/portasm_Fx3.s85
index bfc2610..d1160d7 100644
--- a/FreeRTOS/Source/portable/IAR/V850ES/portasm_Fx3.s85
+++ b/FreeRTOS/Source/portable/IAR/V850ES/portasm_Fx3.s85
@@ -1,5 +1,5 @@
 ;/*

-;    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+;    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

 ;    All rights reserved

 ;	

 ;

diff --git a/FreeRTOS/Source/portable/IAR/V850ES/portasm_Hx2.s85 b/FreeRTOS/Source/portable/IAR/V850ES/portasm_Hx2.s85
index 7d192f0..f18c9be 100644
--- a/FreeRTOS/Source/portable/IAR/V850ES/portasm_Hx2.s85
+++ b/FreeRTOS/Source/portable/IAR/V850ES/portasm_Hx2.s85
@@ -1,5 +1,5 @@
 ;/*

-;    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+;    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

 ;    All rights reserved

 ;	

 ;

diff --git a/FreeRTOS/Source/portable/IAR/V850ES/portmacro.h b/FreeRTOS/Source/portable/IAR/V850ES/portmacro.h
index 73c0a95..8e227e9 100644
--- a/FreeRTOS/Source/portable/IAR/V850ES/portmacro.h
+++ b/FreeRTOS/Source/portable/IAR/V850ES/portmacro.h
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Source/portable/MPLAB/PIC18F/port.c b/FreeRTOS/Source/portable/MPLAB/PIC18F/port.c
index db07516..ad06fb5 100644
--- a/FreeRTOS/Source/portable/MPLAB/PIC18F/port.c
+++ b/FreeRTOS/Source/portable/MPLAB/PIC18F/port.c
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Source/portable/MPLAB/PIC18F/portmacro.h b/FreeRTOS/Source/portable/MPLAB/PIC18F/portmacro.h
index 06d0ea4..637f57d 100644
--- a/FreeRTOS/Source/portable/MPLAB/PIC18F/portmacro.h
+++ b/FreeRTOS/Source/portable/MPLAB/PIC18F/portmacro.h
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Source/portable/MPLAB/PIC24_dsPIC/port.c b/FreeRTOS/Source/portable/MPLAB/PIC24_dsPIC/port.c
index 161d65d..bf826fc 100644
--- a/FreeRTOS/Source/portable/MPLAB/PIC24_dsPIC/port.c
+++ b/FreeRTOS/Source/portable/MPLAB/PIC24_dsPIC/port.c
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Source/portable/MPLAB/PIC24_dsPIC/portasm_PIC24.S b/FreeRTOS/Source/portable/MPLAB/PIC24_dsPIC/portasm_PIC24.S
index 8f27863..3ed3ae9 100644
--- a/FreeRTOS/Source/portable/MPLAB/PIC24_dsPIC/portasm_PIC24.S
+++ b/FreeRTOS/Source/portable/MPLAB/PIC24_dsPIC/portasm_PIC24.S
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Source/portable/MPLAB/PIC24_dsPIC/portasm_dsPIC.S b/FreeRTOS/Source/portable/MPLAB/PIC24_dsPIC/portasm_dsPIC.S
index 47962cf..a6e23c9 100644
--- a/FreeRTOS/Source/portable/MPLAB/PIC24_dsPIC/portasm_dsPIC.S
+++ b/FreeRTOS/Source/portable/MPLAB/PIC24_dsPIC/portasm_dsPIC.S
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Source/portable/MPLAB/PIC24_dsPIC/portmacro.h b/FreeRTOS/Source/portable/MPLAB/PIC24_dsPIC/portmacro.h
index 5ef3be5..05252fe 100644
--- a/FreeRTOS/Source/portable/MPLAB/PIC24_dsPIC/portmacro.h
+++ b/FreeRTOS/Source/portable/MPLAB/PIC24_dsPIC/portmacro.h
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Source/portable/MPLAB/PIC32MX/ISR_Support.h b/FreeRTOS/Source/portable/MPLAB/PIC32MX/ISR_Support.h
index 0c6705b..d25b0fc 100644
--- a/FreeRTOS/Source/portable/MPLAB/PIC32MX/ISR_Support.h
+++ b/FreeRTOS/Source/portable/MPLAB/PIC32MX/ISR_Support.h
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Source/portable/MPLAB/PIC32MX/port.c b/FreeRTOS/Source/portable/MPLAB/PIC32MX/port.c
index e27ed0b..7665b90 100644
--- a/FreeRTOS/Source/portable/MPLAB/PIC32MX/port.c
+++ b/FreeRTOS/Source/portable/MPLAB/PIC32MX/port.c
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Source/portable/MPLAB/PIC32MX/port_asm.S b/FreeRTOS/Source/portable/MPLAB/PIC32MX/port_asm.S
index 88077ca..0297265 100644
--- a/FreeRTOS/Source/portable/MPLAB/PIC32MX/port_asm.S
+++ b/FreeRTOS/Source/portable/MPLAB/PIC32MX/port_asm.S
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Source/portable/MPLAB/PIC32MX/portmacro.h b/FreeRTOS/Source/portable/MPLAB/PIC32MX/portmacro.h
index 1cbfcb8..a551303 100644
--- a/FreeRTOS/Source/portable/MPLAB/PIC32MX/portmacro.h
+++ b/FreeRTOS/Source/portable/MPLAB/PIC32MX/portmacro.h
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Source/portable/MPLAB/PIC32MZ/ISR_Support.h b/FreeRTOS/Source/portable/MPLAB/PIC32MZ/ISR_Support.h
index bb2194f..a5b0fd4 100644
--- a/FreeRTOS/Source/portable/MPLAB/PIC32MZ/ISR_Support.h
+++ b/FreeRTOS/Source/portable/MPLAB/PIC32MZ/ISR_Support.h
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Source/portable/MPLAB/PIC32MZ/port.c b/FreeRTOS/Source/portable/MPLAB/PIC32MZ/port.c
index 5cf3d2d..3b46592 100644
--- a/FreeRTOS/Source/portable/MPLAB/PIC32MZ/port.c
+++ b/FreeRTOS/Source/portable/MPLAB/PIC32MZ/port.c
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Source/portable/MPLAB/PIC32MZ/port_asm.S b/FreeRTOS/Source/portable/MPLAB/PIC32MZ/port_asm.S
index 9dfb097..05da997 100644
--- a/FreeRTOS/Source/portable/MPLAB/PIC32MZ/port_asm.S
+++ b/FreeRTOS/Source/portable/MPLAB/PIC32MZ/port_asm.S
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Source/portable/MPLAB/PIC32MZ/portmacro.h b/FreeRTOS/Source/portable/MPLAB/PIC32MZ/portmacro.h
index 86bd8b0..7b5034f 100644
--- a/FreeRTOS/Source/portable/MPLAB/PIC32MZ/portmacro.h
+++ b/FreeRTOS/Source/portable/MPLAB/PIC32MZ/portmacro.h
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Source/portable/MSVC-MingW/port.c b/FreeRTOS/Source/portable/MSVC-MingW/port.c
index b90a814..54ca3ca 100644
--- a/FreeRTOS/Source/portable/MSVC-MingW/port.c
+++ b/FreeRTOS/Source/portable/MSVC-MingW/port.c
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Source/portable/MSVC-MingW/portmacro.h b/FreeRTOS/Source/portable/MSVC-MingW/portmacro.h
index 6ed948d..390c8cc 100644
--- a/FreeRTOS/Source/portable/MSVC-MingW/portmacro.h
+++ b/FreeRTOS/Source/portable/MSVC-MingW/portmacro.h
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Source/portable/MemMang/heap_1.c b/FreeRTOS/Source/portable/MemMang/heap_1.c
index 25619f1..560b256 100644
--- a/FreeRTOS/Source/portable/MemMang/heap_1.c
+++ b/FreeRTOS/Source/portable/MemMang/heap_1.c
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Source/portable/MemMang/heap_2.c b/FreeRTOS/Source/portable/MemMang/heap_2.c
index cb9114b..4e0c92e 100644
--- a/FreeRTOS/Source/portable/MemMang/heap_2.c
+++ b/FreeRTOS/Source/portable/MemMang/heap_2.c
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Source/portable/MemMang/heap_3.c b/FreeRTOS/Source/portable/MemMang/heap_3.c
index 8235bfe..0fa88f5 100644
--- a/FreeRTOS/Source/portable/MemMang/heap_3.c
+++ b/FreeRTOS/Source/portable/MemMang/heap_3.c
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Source/portable/MemMang/heap_4.c b/FreeRTOS/Source/portable/MemMang/heap_4.c
index 3b2d942..ce482d0 100644
--- a/FreeRTOS/Source/portable/MemMang/heap_4.c
+++ b/FreeRTOS/Source/portable/MemMang/heap_4.c
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Source/portable/MemMang/heap_5.c b/FreeRTOS/Source/portable/MemMang/heap_5.c
index 1f90202..666ec65 100644
--- a/FreeRTOS/Source/portable/MemMang/heap_5.c
+++ b/FreeRTOS/Source/portable/MemMang/heap_5.c
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

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 4e3ddbb..ce17471 100644
--- a/FreeRTOS/Source/portable/Paradigm/Tern_EE/large_untested/port.c
+++ b/FreeRTOS/Source/portable/Paradigm/Tern_EE/large_untested/port.c
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

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 cd16e2b..877109e 100644
--- a/FreeRTOS/Source/portable/Paradigm/Tern_EE/large_untested/portasm.h
+++ b/FreeRTOS/Source/portable/Paradigm/Tern_EE/large_untested/portasm.h
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

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 5ea1e0d..7043ea4 100644
--- a/FreeRTOS/Source/portable/Paradigm/Tern_EE/large_untested/portmacro.h
+++ b/FreeRTOS/Source/portable/Paradigm/Tern_EE/large_untested/portmacro.h
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Source/portable/Paradigm/Tern_EE/small/port.c b/FreeRTOS/Source/portable/Paradigm/Tern_EE/small/port.c
index 1c40b69..b8f4285 100644
--- a/FreeRTOS/Source/portable/Paradigm/Tern_EE/small/port.c
+++ b/FreeRTOS/Source/portable/Paradigm/Tern_EE/small/port.c
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Source/portable/Paradigm/Tern_EE/small/portasm.h b/FreeRTOS/Source/portable/Paradigm/Tern_EE/small/portasm.h
index 1f179c7..35962c9 100644
--- a/FreeRTOS/Source/portable/Paradigm/Tern_EE/small/portasm.h
+++ b/FreeRTOS/Source/portable/Paradigm/Tern_EE/small/portasm.h
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Source/portable/Paradigm/Tern_EE/small/portmacro.h b/FreeRTOS/Source/portable/Paradigm/Tern_EE/small/portmacro.h
index 2395abe..adb0e29 100644
--- a/FreeRTOS/Source/portable/Paradigm/Tern_EE/small/portmacro.h
+++ b/FreeRTOS/Source/portable/Paradigm/Tern_EE/small/portmacro.h
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Source/portable/RVDS/ARM7_LPC21xx/port.c b/FreeRTOS/Source/portable/RVDS/ARM7_LPC21xx/port.c
index 255784d..fb373a1 100644
--- a/FreeRTOS/Source/portable/RVDS/ARM7_LPC21xx/port.c
+++ b/FreeRTOS/Source/portable/RVDS/ARM7_LPC21xx/port.c
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Source/portable/RVDS/ARM7_LPC21xx/portASM.s b/FreeRTOS/Source/portable/RVDS/ARM7_LPC21xx/portASM.s
index de9beeb..ac45a5b 100644
--- a/FreeRTOS/Source/portable/RVDS/ARM7_LPC21xx/portASM.s
+++ b/FreeRTOS/Source/portable/RVDS/ARM7_LPC21xx/portASM.s
@@ -1,5 +1,5 @@
 ;/*

-;    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+;    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

 ;    All rights reserved

 ;	

 ;

diff --git a/FreeRTOS/Source/portable/RVDS/ARM7_LPC21xx/portmacro.h b/FreeRTOS/Source/portable/RVDS/ARM7_LPC21xx/portmacro.h
index 77db37d..25f97e3 100644
--- a/FreeRTOS/Source/portable/RVDS/ARM7_LPC21xx/portmacro.h
+++ b/FreeRTOS/Source/portable/RVDS/ARM7_LPC21xx/portmacro.h
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Source/portable/RVDS/ARM7_LPC21xx/portmacro.inc b/FreeRTOS/Source/portable/RVDS/ARM7_LPC21xx/portmacro.inc
index 8e0f79e..9eaf845 100644
--- a/FreeRTOS/Source/portable/RVDS/ARM7_LPC21xx/portmacro.inc
+++ b/FreeRTOS/Source/portable/RVDS/ARM7_LPC21xx/portmacro.inc
@@ -1,5 +1,5 @@
 ;/*

-;    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+;    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

 ;    All rights reserved

 ;	

 ;

diff --git a/FreeRTOS/Source/portable/RVDS/ARM_CA9/port.c b/FreeRTOS/Source/portable/RVDS/ARM_CA9/port.c
index 1ee711a..c9eac57 100644
--- a/FreeRTOS/Source/portable/RVDS/ARM_CA9/port.c
+++ b/FreeRTOS/Source/portable/RVDS/ARM_CA9/port.c
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Source/portable/RVDS/ARM_CA9/portASM.s b/FreeRTOS/Source/portable/RVDS/ARM_CA9/portASM.s
index c8a62dd..ab38516 100644
--- a/FreeRTOS/Source/portable/RVDS/ARM_CA9/portASM.s
+++ b/FreeRTOS/Source/portable/RVDS/ARM_CA9/portASM.s
@@ -1,5 +1,5 @@
 ;/*

-;    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+;    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

 ;    All rights reserved

 ;

 ;

diff --git a/FreeRTOS/Source/portable/RVDS/ARM_CA9/portmacro.h b/FreeRTOS/Source/portable/RVDS/ARM_CA9/portmacro.h
index 7eed8b0..9efc510 100644
--- a/FreeRTOS/Source/portable/RVDS/ARM_CA9/portmacro.h
+++ b/FreeRTOS/Source/portable/RVDS/ARM_CA9/portmacro.h
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Source/portable/RVDS/ARM_CA9/portmacro.inc b/FreeRTOS/Source/portable/RVDS/ARM_CA9/portmacro.inc
index ce7201e..fc8ec75 100644
--- a/FreeRTOS/Source/portable/RVDS/ARM_CA9/portmacro.inc
+++ b/FreeRTOS/Source/portable/RVDS/ARM_CA9/portmacro.inc
@@ -1,5 +1,5 @@
 ;/*

-;    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+;    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

 ;    All rights reserved

 ;

 ;

diff --git a/FreeRTOS/Source/portable/RVDS/ARM_CM0/port.c b/FreeRTOS/Source/portable/RVDS/ARM_CM0/port.c
index 08c61d4..9b8577d 100644
--- a/FreeRTOS/Source/portable/RVDS/ARM_CM0/port.c
+++ b/FreeRTOS/Source/portable/RVDS/ARM_CM0/port.c
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Source/portable/RVDS/ARM_CM0/portmacro.h b/FreeRTOS/Source/portable/RVDS/ARM_CM0/portmacro.h
index 8d34de7..7fed298 100644
--- a/FreeRTOS/Source/portable/RVDS/ARM_CM0/portmacro.h
+++ b/FreeRTOS/Source/portable/RVDS/ARM_CM0/portmacro.h
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Source/portable/RVDS/ARM_CM3/port.c b/FreeRTOS/Source/portable/RVDS/ARM_CM3/port.c
index 89cd2c0..4142a11 100644
--- a/FreeRTOS/Source/portable/RVDS/ARM_CM3/port.c
+++ b/FreeRTOS/Source/portable/RVDS/ARM_CM3/port.c
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Source/portable/RVDS/ARM_CM3/portmacro.h b/FreeRTOS/Source/portable/RVDS/ARM_CM3/portmacro.h
index 64d8ec1..9912376 100644
--- a/FreeRTOS/Source/portable/RVDS/ARM_CM3/portmacro.h
+++ b/FreeRTOS/Source/portable/RVDS/ARM_CM3/portmacro.h
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Source/portable/RVDS/ARM_CM4F/port.c b/FreeRTOS/Source/portable/RVDS/ARM_CM4F/port.c
index 8f9018f..9c32726 100644
--- a/FreeRTOS/Source/portable/RVDS/ARM_CM4F/port.c
+++ b/FreeRTOS/Source/portable/RVDS/ARM_CM4F/port.c
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Source/portable/RVDS/ARM_CM4F/portmacro.h b/FreeRTOS/Source/portable/RVDS/ARM_CM4F/portmacro.h
index 8d574c4..ab06aa3 100644
--- a/FreeRTOS/Source/portable/RVDS/ARM_CM4F/portmacro.h
+++ b/FreeRTOS/Source/portable/RVDS/ARM_CM4F/portmacro.h
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Source/portable/RVDS/ARM_CM7/r0p1/port.c b/FreeRTOS/Source/portable/RVDS/ARM_CM7/r0p1/port.c
index d1535f3..3801785 100644
--- a/FreeRTOS/Source/portable/RVDS/ARM_CM7/r0p1/port.c
+++ b/FreeRTOS/Source/portable/RVDS/ARM_CM7/r0p1/port.c
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Source/portable/RVDS/ARM_CM7/r0p1/portmacro.h b/FreeRTOS/Source/portable/RVDS/ARM_CM7/r0p1/portmacro.h
index a92624c..be40096 100644
--- a/FreeRTOS/Source/portable/RVDS/ARM_CM7/r0p1/portmacro.h
+++ b/FreeRTOS/Source/portable/RVDS/ARM_CM7/r0p1/portmacro.h
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Source/portable/Renesas/RX100/port.c b/FreeRTOS/Source/portable/Renesas/RX100/port.c
index db29e10..a8015c6 100644
--- a/FreeRTOS/Source/portable/Renesas/RX100/port.c
+++ b/FreeRTOS/Source/portable/Renesas/RX100/port.c
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Source/portable/Renesas/RX100/port_asm.src b/FreeRTOS/Source/portable/Renesas/RX100/port_asm.src
index 5ffdd11..71ea35c 100644
--- a/FreeRTOS/Source/portable/Renesas/RX100/port_asm.src
+++ b/FreeRTOS/Source/portable/Renesas/RX100/port_asm.src
@@ -1,5 +1,5 @@
 ;/*

-;    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+;    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

 ;    All rights reserved

 ;

 ;

diff --git a/FreeRTOS/Source/portable/Renesas/RX100/portmacro.h b/FreeRTOS/Source/portable/Renesas/RX100/portmacro.h
index e1851ba..898d84d 100644
--- a/FreeRTOS/Source/portable/Renesas/RX100/portmacro.h
+++ b/FreeRTOS/Source/portable/Renesas/RX100/portmacro.h
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Source/portable/Renesas/RX200/port.c b/FreeRTOS/Source/portable/Renesas/RX200/port.c
index 86b1b65..202024c 100644
--- a/FreeRTOS/Source/portable/Renesas/RX200/port.c
+++ b/FreeRTOS/Source/portable/Renesas/RX200/port.c
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Source/portable/Renesas/RX200/port_asm.src b/FreeRTOS/Source/portable/Renesas/RX200/port_asm.src
index 5ffdd11..71ea35c 100644
--- a/FreeRTOS/Source/portable/Renesas/RX200/port_asm.src
+++ b/FreeRTOS/Source/portable/Renesas/RX200/port_asm.src
@@ -1,5 +1,5 @@
 ;/*

-;    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+;    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

 ;    All rights reserved

 ;

 ;

diff --git a/FreeRTOS/Source/portable/Renesas/RX200/portmacro.h b/FreeRTOS/Source/portable/Renesas/RX200/portmacro.h
index 8ac001d..ecd7f4b 100644
--- a/FreeRTOS/Source/portable/Renesas/RX200/portmacro.h
+++ b/FreeRTOS/Source/portable/Renesas/RX200/portmacro.h
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Source/portable/Renesas/RX600/port.c b/FreeRTOS/Source/portable/Renesas/RX600/port.c
index 8e56250..bae4a82 100644
--- a/FreeRTOS/Source/portable/Renesas/RX600/port.c
+++ b/FreeRTOS/Source/portable/Renesas/RX600/port.c
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Source/portable/Renesas/RX600/port_asm.src b/FreeRTOS/Source/portable/Renesas/RX600/port_asm.src
index 5ffdd11..71ea35c 100644
--- a/FreeRTOS/Source/portable/Renesas/RX600/port_asm.src
+++ b/FreeRTOS/Source/portable/Renesas/RX600/port_asm.src
@@ -1,5 +1,5 @@
 ;/*

-;    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+;    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

 ;    All rights reserved

 ;

 ;

diff --git a/FreeRTOS/Source/portable/Renesas/RX600/portmacro.h b/FreeRTOS/Source/portable/Renesas/RX600/portmacro.h
index 7f04101..31b3dbe 100644
--- a/FreeRTOS/Source/portable/Renesas/RX600/portmacro.h
+++ b/FreeRTOS/Source/portable/Renesas/RX600/portmacro.h
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Source/portable/Renesas/RX600v2/port.c b/FreeRTOS/Source/portable/Renesas/RX600v2/port.c
index c11514a..96f9ee8 100644
--- a/FreeRTOS/Source/portable/Renesas/RX600v2/port.c
+++ b/FreeRTOS/Source/portable/Renesas/RX600v2/port.c
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Source/portable/Renesas/RX600v2/port_asm.src b/FreeRTOS/Source/portable/Renesas/RX600v2/port_asm.src
index 438fab9..fcb9e15 100644
--- a/FreeRTOS/Source/portable/Renesas/RX600v2/port_asm.src
+++ b/FreeRTOS/Source/portable/Renesas/RX600v2/port_asm.src
@@ -1,5 +1,5 @@
 ;/*

-;    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+;    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

 ;    All rights reserved

 ;

 ;

diff --git a/FreeRTOS/Source/portable/Renesas/RX600v2/portmacro.h b/FreeRTOS/Source/portable/Renesas/RX600v2/portmacro.h
index f703e49..5dccf85 100644
--- a/FreeRTOS/Source/portable/Renesas/RX600v2/portmacro.h
+++ b/FreeRTOS/Source/portable/Renesas/RX600v2/portmacro.h
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Source/portable/Renesas/SH2A_FPU/ISR_Support.inc b/FreeRTOS/Source/portable/Renesas/SH2A_FPU/ISR_Support.inc
index 472145e..b5db025 100644
--- a/FreeRTOS/Source/portable/Renesas/SH2A_FPU/ISR_Support.inc
+++ b/FreeRTOS/Source/portable/Renesas/SH2A_FPU/ISR_Support.inc
@@ -1,5 +1,5 @@
 ;/*

-;    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+;    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

 ;    All rights reserved

 ;

 ;

diff --git a/FreeRTOS/Source/portable/Renesas/SH2A_FPU/port.c b/FreeRTOS/Source/portable/Renesas/SH2A_FPU/port.c
index 2c50254..d9ccd08 100644
--- a/FreeRTOS/Source/portable/Renesas/SH2A_FPU/port.c
+++ b/FreeRTOS/Source/portable/Renesas/SH2A_FPU/port.c
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Source/portable/Renesas/SH2A_FPU/portasm.src b/FreeRTOS/Source/portable/Renesas/SH2A_FPU/portasm.src
index e658ed3..f6953ae 100644
--- a/FreeRTOS/Source/portable/Renesas/SH2A_FPU/portasm.src
+++ b/FreeRTOS/Source/portable/Renesas/SH2A_FPU/portasm.src
@@ -1,5 +1,5 @@
 ;/*

-;    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+;    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

 ;    All rights reserved

 ;	

 ;

diff --git a/FreeRTOS/Source/portable/Renesas/SH2A_FPU/portmacro.h b/FreeRTOS/Source/portable/Renesas/SH2A_FPU/portmacro.h
index 27689e6..c6037c3 100644
--- a/FreeRTOS/Source/portable/Renesas/SH2A_FPU/portmacro.h
+++ b/FreeRTOS/Source/portable/Renesas/SH2A_FPU/portmacro.h
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Source/portable/Rowley/MSP430F449/port.c b/FreeRTOS/Source/portable/Rowley/MSP430F449/port.c
index a2ae7d9..e9e8412 100644
--- a/FreeRTOS/Source/portable/Rowley/MSP430F449/port.c
+++ b/FreeRTOS/Source/portable/Rowley/MSP430F449/port.c
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Source/portable/Rowley/MSP430F449/portasm.h b/FreeRTOS/Source/portable/Rowley/MSP430F449/portasm.h
index 49d2f1b..0d8f021 100644
--- a/FreeRTOS/Source/portable/Rowley/MSP430F449/portasm.h
+++ b/FreeRTOS/Source/portable/Rowley/MSP430F449/portasm.h
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Source/portable/Rowley/MSP430F449/portext.asm b/FreeRTOS/Source/portable/Rowley/MSP430F449/portext.asm
index 907e49c..2c3d33a 100644
--- a/FreeRTOS/Source/portable/Rowley/MSP430F449/portext.asm
+++ b/FreeRTOS/Source/portable/Rowley/MSP430F449/portext.asm
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Source/portable/Rowley/MSP430F449/portmacro.h b/FreeRTOS/Source/portable/Rowley/MSP430F449/portmacro.h
index a4a867f..174ab54 100644
--- a/FreeRTOS/Source/portable/Rowley/MSP430F449/portmacro.h
+++ b/FreeRTOS/Source/portable/Rowley/MSP430F449/portmacro.h
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Source/portable/SDCC/Cygnal/port.c b/FreeRTOS/Source/portable/SDCC/Cygnal/port.c
index d27915d..7f415ce 100644
--- a/FreeRTOS/Source/portable/SDCC/Cygnal/port.c
+++ b/FreeRTOS/Source/portable/SDCC/Cygnal/port.c
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Source/portable/SDCC/Cygnal/portmacro.h b/FreeRTOS/Source/portable/SDCC/Cygnal/portmacro.h
index f12f750..8810682 100644
--- a/FreeRTOS/Source/portable/SDCC/Cygnal/portmacro.h
+++ b/FreeRTOS/Source/portable/SDCC/Cygnal/portmacro.h
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Source/portable/Softune/MB91460/port.c b/FreeRTOS/Source/portable/Softune/MB91460/port.c
index dbc0cf6..df68fee 100644
--- a/FreeRTOS/Source/portable/Softune/MB91460/port.c
+++ b/FreeRTOS/Source/portable/Softune/MB91460/port.c
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Source/portable/Softune/MB91460/portmacro.h b/FreeRTOS/Source/portable/Softune/MB91460/portmacro.h
index e982f74..80d3292 100644
--- a/FreeRTOS/Source/portable/Softune/MB91460/portmacro.h
+++ b/FreeRTOS/Source/portable/Softune/MB91460/portmacro.h
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Source/portable/Softune/MB96340/port.c b/FreeRTOS/Source/portable/Softune/MB96340/port.c
index b56934c..32c2819 100644
--- a/FreeRTOS/Source/portable/Softune/MB96340/port.c
+++ b/FreeRTOS/Source/portable/Softune/MB96340/port.c
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Source/portable/Softune/MB96340/portmacro.h b/FreeRTOS/Source/portable/Softune/MB96340/portmacro.h
index e2e6a03..779a46f 100644
--- a/FreeRTOS/Source/portable/Softune/MB96340/portmacro.h
+++ b/FreeRTOS/Source/portable/Softune/MB96340/portmacro.h
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Source/portable/Tasking/ARM_CM4F/port.c b/FreeRTOS/Source/portable/Tasking/ARM_CM4F/port.c
index 16365a0..6f252f8 100644
--- a/FreeRTOS/Source/portable/Tasking/ARM_CM4F/port.c
+++ b/FreeRTOS/Source/portable/Tasking/ARM_CM4F/port.c
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Source/portable/Tasking/ARM_CM4F/port_asm.asm b/FreeRTOS/Source/portable/Tasking/ARM_CM4F/port_asm.asm
index cbcb4f7..e7c501f 100644
--- a/FreeRTOS/Source/portable/Tasking/ARM_CM4F/port_asm.asm
+++ b/FreeRTOS/Source/portable/Tasking/ARM_CM4F/port_asm.asm
@@ -1,5 +1,5 @@
 ;/*

-;    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+;    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

 ;    All rights reserved

 ;

 ;

diff --git a/FreeRTOS/Source/portable/Tasking/ARM_CM4F/portmacro.h b/FreeRTOS/Source/portable/Tasking/ARM_CM4F/portmacro.h
index 414fb81..49f252b 100644
--- a/FreeRTOS/Source/portable/Tasking/ARM_CM4F/portmacro.h
+++ b/FreeRTOS/Source/portable/Tasking/ARM_CM4F/portmacro.h
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Source/portable/WizC/PIC18/Drivers/Tick/Tick.c b/FreeRTOS/Source/portable/WizC/PIC18/Drivers/Tick/Tick.c
index 83b5925..d5519b1 100644
--- a/FreeRTOS/Source/portable/WizC/PIC18/Drivers/Tick/Tick.c
+++ b/FreeRTOS/Source/portable/WizC/PIC18/Drivers/Tick/Tick.c
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Source/portable/WizC/PIC18/Drivers/Tick/isrTick.c b/FreeRTOS/Source/portable/WizC/PIC18/Drivers/Tick/isrTick.c
index cd99276..c44f5b2 100644
--- a/FreeRTOS/Source/portable/WizC/PIC18/Drivers/Tick/isrTick.c
+++ b/FreeRTOS/Source/portable/WizC/PIC18/Drivers/Tick/isrTick.c
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Source/portable/WizC/PIC18/Install.bat b/FreeRTOS/Source/portable/WizC/PIC18/Install.bat
index 2780803..fceb903 100644
--- a/FreeRTOS/Source/portable/WizC/PIC18/Install.bat
+++ b/FreeRTOS/Source/portable/WizC/PIC18/Install.bat
@@ -1,5 +1,5 @@
 REM/*

-REM    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+REM    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

 REM

 REM

 REM    ***************************************************************************

diff --git a/FreeRTOS/Source/portable/WizC/PIC18/addFreeRTOS.h b/FreeRTOS/Source/portable/WizC/PIC18/addFreeRTOS.h
index 91c7b3c..4fa4053 100644
--- a/FreeRTOS/Source/portable/WizC/PIC18/addFreeRTOS.h
+++ b/FreeRTOS/Source/portable/WizC/PIC18/addFreeRTOS.h
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Source/portable/WizC/PIC18/port.c b/FreeRTOS/Source/portable/WizC/PIC18/port.c
index 1cf2109..357bf23 100644
--- a/FreeRTOS/Source/portable/WizC/PIC18/port.c
+++ b/FreeRTOS/Source/portable/WizC/PIC18/port.c
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Source/portable/WizC/PIC18/portmacro.h b/FreeRTOS/Source/portable/WizC/PIC18/portmacro.h
index 2dace23..c04614d 100644
--- a/FreeRTOS/Source/portable/WizC/PIC18/portmacro.h
+++ b/FreeRTOS/Source/portable/WizC/PIC18/portmacro.h
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Source/portable/oWatcom/16BitDOS/Flsh186/port.c b/FreeRTOS/Source/portable/oWatcom/16BitDOS/Flsh186/port.c
index bd0c9d5..1ac0fb9 100644
--- a/FreeRTOS/Source/portable/oWatcom/16BitDOS/Flsh186/port.c
+++ b/FreeRTOS/Source/portable/oWatcom/16BitDOS/Flsh186/port.c
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Source/portable/oWatcom/16BitDOS/Flsh186/portmacro.h b/FreeRTOS/Source/portable/oWatcom/16BitDOS/Flsh186/portmacro.h
index ad50590..c2d10fa 100644
--- a/FreeRTOS/Source/portable/oWatcom/16BitDOS/Flsh186/portmacro.h
+++ b/FreeRTOS/Source/portable/oWatcom/16BitDOS/Flsh186/portmacro.h
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Source/portable/oWatcom/16BitDOS/PC/port.c b/FreeRTOS/Source/portable/oWatcom/16BitDOS/PC/port.c
index da5ff46..2a01a3a 100644
--- a/FreeRTOS/Source/portable/oWatcom/16BitDOS/PC/port.c
+++ b/FreeRTOS/Source/portable/oWatcom/16BitDOS/PC/port.c
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Source/portable/oWatcom/16BitDOS/PC/portmacro.h b/FreeRTOS/Source/portable/oWatcom/16BitDOS/PC/portmacro.h
index 0975291..7e58d5d 100644
--- a/FreeRTOS/Source/portable/oWatcom/16BitDOS/PC/portmacro.h
+++ b/FreeRTOS/Source/portable/oWatcom/16BitDOS/PC/portmacro.h
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Source/portable/oWatcom/16BitDOS/common/portasm.h b/FreeRTOS/Source/portable/oWatcom/16BitDOS/common/portasm.h
index 3be2e07..0d709b0 100644
--- a/FreeRTOS/Source/portable/oWatcom/16BitDOS/common/portasm.h
+++ b/FreeRTOS/Source/portable/oWatcom/16BitDOS/common/portasm.h
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Source/portable/oWatcom/16BitDOS/common/portcomn.c b/FreeRTOS/Source/portable/oWatcom/16BitDOS/common/portcomn.c
index 30bbe53..394aac2 100644
--- a/FreeRTOS/Source/portable/oWatcom/16BitDOS/common/portcomn.c
+++ b/FreeRTOS/Source/portable/oWatcom/16BitDOS/common/portcomn.c
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Source/queue.c b/FreeRTOS/Source/queue.c
index 743d5f0..1a3d58c 100644
--- a/FreeRTOS/Source/queue.c
+++ b/FreeRTOS/Source/queue.c
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Source/tasks.c b/FreeRTOS/Source/tasks.c
index 856cecf..683aa52 100644
--- a/FreeRTOS/Source/tasks.c
+++ b/FreeRTOS/Source/tasks.c
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.

diff --git a/FreeRTOS/Source/timers.c b/FreeRTOS/Source/timers.c
index e1de26f..5d1ad08 100644
--- a/FreeRTOS/Source/timers.c
+++ b/FreeRTOS/Source/timers.c
@@ -1,5 +1,5 @@
 /*

-    FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.

+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.

     All rights reserved

 

     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.