Initial CMSIS-RTOS v2 API Documentation, Example and Component Viewer Description
diff --git a/CMSIS/DoxyGen/RTOS2/rtos.dxy b/CMSIS/DoxyGen/RTOS2/rtos.dxy
index 2113164..05c66a2 100644
--- a/CMSIS/DoxyGen/RTOS2/rtos.dxy
+++ b/CMSIS/DoxyGen/RTOS2/rtos.dxy
@@ -196,7 +196,7 @@
# The TAB_SIZE tag can be used to set the number of spaces in a tab.
# Doxygen uses this value to replace tabs by spaces in code fragments.
-TAB_SIZE = 8
+TAB_SIZE = 9
# This tag can be used to specify a number of aliases that acts
# as commands in the documentation. An alias has the form "name=value".
@@ -205,7 +205,12 @@
# will result in a user-defined paragraph with heading "Side Effects:".
# You can put \n's in the value part of an alias to insert newlines.
-ALIASES =
+ALIASES = "token{1}=<span class=\"XML-Token\">\1</span>" \
+ "div{1}=<hr><div class=\"\1\">" \
+ "enddiv= </div>" \
+ "func{1}=<kbd>\1</kbd> <br>" \
+ "copybrief{1}=<br> \copybrief \1 <br>" \
+ "none=\em none <br>"
# This tag can be used to specify a number of word-keyword mappings (TCL only).
# A mapping has the form "name=value". For example adding
@@ -533,19 +538,19 @@
# disable (NO) the todo list. This list is created by putting \todo
# commands in the documentation.
-GENERATE_TODOLIST = YES
+GENERATE_TODOLIST = NO
# The GENERATE_TESTLIST tag can be used to enable (YES) or
# disable (NO) the test list. This list is created by putting \test
# commands in the documentation.
-GENERATE_TESTLIST = YES
+GENERATE_TESTLIST = NO
# The GENERATE_BUGLIST tag can be used to enable (YES) or
# disable (NO) the bug list. This list is created by putting \bug
# commands in the documentation.
-GENERATE_BUGLIST = YES
+GENERATE_BUGLIST = NO
# The GENERATE_DEPRECATEDLIST tag can be used to enable (YES) or
# disable (NO) the deprecated list. This list is created by putting
@@ -676,7 +681,20 @@
# with spaces.
INPUT = . \
- ../../RTOS2/Template/cmsis_os.h
+ ../../RTOS2/Include/cmsis_os2.h \
+ ./src/cmsis_os2.txt \
+ ./src/cmsis_os2_Kernel.txt \
+ ./src/cmsis_os2_Thread.txt \
+ ./src/cmsis_os2_Wait.txt \
+ ./src/cmsis_os2_ThreadFlags.txt \
+ ./src/cmsis_os2_Event.txt \
+ ./src/cmsis_os2_Mutex.txt \
+ ./src/cmsis_os2_Sema.txt \
+ ./src/cmsis_os2_Timer.txt \
+ ./src/cmsis_os2_MemPool.txt \
+ ./src/cmsis_os2_Message.txt \
+ ./src/cmsis_os2_Status.txt \
+ ./src/cmsis_os2_Migration.txt
# This tag can be used to specify the character encoding of the source files
# that doxygen parses. Internally doxygen uses the UTF-8 encoding, which is
@@ -731,7 +749,7 @@
# should be searched for input files as well. Possible values are YES and NO.
# If left blank NO is used.
-RECURSIVE = YES
+RECURSIVE = NO
# The EXCLUDE tag can be used to specify files and/or directories that should be
# excluded from the INPUT source files. This way you can easily exclude a
@@ -768,7 +786,9 @@
# directories that contain example code fragments that are included (see
# the \include command).
-EXAMPLE_PATH = ..\..\RTOS2
+EXAMPLE_PATH = ../../RTOS2/Include \
+ ../../RTOS2 \
+ ../../RTOS2/Template
# If the value of the EXAMPLE_PATH tag contains directories, you can use the
# EXAMPLE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp
@@ -849,13 +869,13 @@
# then for each documented function all documented
# functions referencing it will be listed.
-REFERENCED_BY_RELATION = NO
+REFERENCED_BY_RELATION = YES
# If the REFERENCES_RELATION tag is set to YES
# then for each documented function all documented entities
# called/used by that function will be listed.
-REFERENCES_RELATION = NO
+REFERENCES_RELATION = YES
# If the REFERENCES_LINK_SOURCE tag is set to YES (the default)
# and SOURCE_BROWSER tag is set to YES, then the hyperlinks from
@@ -969,7 +989,8 @@
HTML_EXTRA_FILES = ../Doxygen_Templates/tabs.css \
../Doxygen_Templates/tab_topnav.png \
- ../Doxygen_Templates/printComponentTabs.js
+ ../Doxygen_Templates/printComponentTabs.js \
+ ../Doxygen_Templates/search.css
# The HTML_COLORSTYLE_HUE tag controls the color of the HTML output.
# Doxygen will adjust the colors in the style sheet and background images
@@ -985,7 +1006,7 @@
# the colors in the HTML output. For a value of 0 the output will use
# grayscales only. A value of 255 will produce the most vivid colors.
-HTML_COLORSTYLE_SAT = 100
+HTML_COLORSTYLE_SAT = 103
# The HTML_COLORSTYLE_GAMMA tag controls the gamma correction applied to
# the luminance component of the colors in the HTML output. Values below
@@ -1257,7 +1278,7 @@
# typically be disabled. For large projects the javascript based search engine
# can be slow, then enabling SERVER_BASED_SEARCH may provide a better solution.
-SEARCHENGINE = NO
+SEARCHENGINE = YES
# When the SERVER_BASED_SEARCH tag is enabled the search engine will be
# implemented using a PHP enabled web server instead of at the web client
diff --git a/CMSIS/DoxyGen/RTOS2/src/cmsis_os.txt b/CMSIS/DoxyGen/RTOS2/src/cmsis_os.txt
index 8c48443..67a9779 100644
--- a/CMSIS/DoxyGen/RTOS2/src/cmsis_os.txt
+++ b/CMSIS/DoxyGen/RTOS2/src/cmsis_os.txt
@@ -475,13 +475,13 @@
*/
/*=======0=========1=========2=========3=========4=========5=========6=========7=========8=========9=========0=========1====*/
-/** \def osCMSIS
+/* \def osCMSIS
Version information of the CMSIS-RTOS API whereby major version is in bits [31:16] and sub version in bits [15:0].
The value 0x10000 represents version 1.00.
*/
/*=======0=========1=========2=========3=========4=========5=========6=========7=========8=========9=========0=========1====*/
-/** \def osCMSIS_KERNEL
+/* \def osCMSIS_KERNEL
Identifies the underlying RTOS kernel and version number. The actual name of that define depends on the RTOS Kernel used in
the implementation. For example, \b osCMSIS_FreeRTOS identifies the FreeRTOS kernel and the value indicates the version
number of that kernel whereby the major version is in bits [31:16] and sub version in bits [15:0]. The value 0x10000
@@ -489,17 +489,23 @@
*/
/*=======0=========1=========2=========3=========4=========5=========6=========7=========8=========9=========0=========1====*/
-/** \def osKernelSystemId
+/* \def osKernelSystemId
Defines a string that identifies the underlying RTOS Kernel and provides version information. The length of that string is
limited to 21 bytes. A valid identification string is for example, <b>"FreeRTOS V1.00"</b>.
*/
/*=======0=========1=========2=========3=========4=========5=========6=========7=========8=========9=========0=========1====*/
-/** \def osFeature_KernelSysTick
+/* \def osFeature_KernelSysTick
Defines if a Kernel SysTick timer is available or not.
*/
/*=======0=========1=========2=========3=========4=========5=========6=========7=========8=========9=========0=========1====*/
+/**
+\typedef osKernelState_t
+Kernel state definitions.
+*/
+
+/*=======0=========1=========2=========3=========4=========5=========6=========7=========8=========9=========0=========1====*/
/** \fn osStatus osKernelInitialize (void)
Initialize of the RTOS Kernel to allow peripheral setup and creation of other RTOS objects with the functions:
- \ref osThreadNew : Create a thread function.
@@ -648,10 +654,10 @@
/*=======0=========1=========2=========3=========4=========5=========6=========7=========8=========9=========0=========1====*/
// ==== Thread Management Functions ====
/**
-@addtogroup CMSIS_RTOS_ThreadMgmt Thread Management
-@ingroup CMSIS_RTOS CMSIS_RTOSv2
-@brief Define, create, and control thread functions.
-@details
+\addtogroup CMSIS_RTOS_ThreadMgmt Thread Management
+\ingroup CMSIS_RTOS CMSIS_RTOSv2
+\brief Define, create, and control thread functions.
+\details
The Thread Management function group allows defining, creating, and controlling thread functions in the system. The function
\b main is a special thread function that is started at system initialization and has the initial priority
\a osPriorityNormal.
@@ -682,6 +688,21 @@
@{
*/
+/*=======0=========1=========2=========3=========4=========5=========6=========7=========8=========9=========0=========1====*/
+/** \def osThreadJoinable
+
+Reference:
+ - \ref osThreadAttr_t
+ - \ref osThreadJoin
+*/
+
+/*=======0=========1=========2=========3=========4=========5=========6=========7=========8=========9=========0=========1====*/
+/** \def osThreadDetached
+
+Reference:
+ - \ref osThreadAttr_t
+ - \ref osThreadDetach
+*/
/*=======0=========1=========2=========3=========4=========5=========6=========7=========8=========9=========0=========1====*/
/** \def osThreadAttrInit
@@ -689,19 +710,8 @@
*/
/*=======0=========1=========2=========3=========4=========5=========6=========7=========8=========9=========0=========1====*/
-/** \typedef osPriority
-Priority used for thread control.
-*/
-
-/*=======0=========1=========2=========3=========4=========5=========6=========7=========8=========9=========0=========1====*/
/**
-\typedef osKernelState
-Kernel state definitions.
-*/
-
-/*=======0=========1=========2=========3=========4=========5=========6=========7=========8=========9=========0=========1====*/
-/**
-\typedef osThreadState
+\typedef osThreadState_t
Thread state definitions.
*/
@@ -713,7 +723,7 @@
/*=======0=========1=========2=========3=========4=========5=========6=========7=========8=========9=========0=========1====*/
/**
-\typedef osPriority
+\typedef osPriority_t
\note MUST REMAIN UNCHANGED: \b osPriority shall be consistent in every CMSIS-RTOS.
\note Cannot be called from \ref CMSIS_RTOS_ISR_Calls "Interrupt Service Routines".
@@ -1013,13 +1023,37 @@
*/
/*=======0=========1=========2=========3=========4=========5=========6=========7=========8=========9=========0=========1====*/
-/** \def osFeature_ThreadFlags
+/** \def osFlagsWaitAny
+Wait forever timeout value.
+
+Reference:
+ - \ref osEventFlagsWait
+ - \ref osThreadFlagsWait
+*/
+
+/*=======0=========1=========2=========3=========4=========5=========6=========7=========8=========9=========0=========1====*/
+/** \def osFlagsWaitAll
+
+Reference:
+ - \ref osEventFlagsWait
+ - \ref osThreadFlagsWait
+*/
+
+/*=======0=========1=========2=========3=========4=========5=========6=========7=========8=========9=========0=========1====*/
+/** \def osFlagsAutoClear
+
+Reference:
+ - \ref osEventFlagsWait
+ - \ref osThreadFlagsWait
+*/
+
+/*=======0=========1=========2=========3=========4=========5=========6=========7=========8=========9=========0=========1====*/
+/* \def osFeature_ThreadFlags
Defined the maximum number of Thread Flags available per thread.
*/
/*=======0=========1=========2=========3=========4=========5=========6=========7=========8=========9=========0=========1====*/
-/** \fn osStatus osThreadFlagsSet (osThreadId thread_id, int32_t flags);
-
+/** \fn int32_t osThreadFlagsSet (osThreadId_t thread_id, int32_t flags )
<b>Code Example</b>
\code
\endcode
@@ -1066,7 +1100,11 @@
/*=======0=========1=========2=========3=========4=========5=========6=========7=========8=========9=========0=========1====*/
/** \def osWaitForever
-Wait forever timeout value.
+Wait forever timeout value.
+
+Reference:
+ - \ref osDelay
+ - \ref osDelayUntil
*/
/*=======0=========1=========2=========3=========4=========5=========6=========7=========8=========9=========0=========1====*/
@@ -2616,6 +2654,11 @@
*/
/*=======0=========1=========2=========3=========4=========5=========6=========7=========8=========9=========0=========1====*/
+/** \fn osMailQId osMailCreate ( const osMailQDef_t * queue_def, osThreadId thread_id )
+
+*/
+
+/*=======0=========1=========2=========3=========4=========5=========6=========7=========8=========9=========0=========1====*/
/** \fn osStatus osMailQueueGetInfo (osMailQueueId queue_id, uint32_t *queue_size, uint32_t *mail_size, uint32_t *mail_count)
*/
diff --git a/CMSIS/DoxyGen/RTOS2/src/cmsis_os2.txt b/CMSIS/DoxyGen/RTOS2/src/cmsis_os2.txt
new file mode 100644
index 0000000..31db901
--- /dev/null
+++ b/CMSIS/DoxyGen/RTOS2/src/cmsis_os2.txt
@@ -0,0 +1,511 @@
+/*=======0=========1=========2=========3=========4=========5=========6=========7=========8=========9=========0=========1====*/
+/**
+\mainpage
+
+The <b>CMSIS-RTOS API v2</b> addresses the following new requirements:
+ - Dynamic object creation no longer requires static memory, static memory buffers are now optional.
+ - Support for ARMv8-M architecture that provides a Secure and Non-Secure state of code execution.
+ - Provisions for message passing in multi-core systems.
+ - Full support of C++ run-time environments.
+ - C interface which is binary compatible across <a class="el" href="http://infocenter.arm.com/help/topic/com.arm.doc.subset.swdev.abi/index.html">ABI compatible compilers</a>.
+
+As a consequence of these requirements the CMSIS-RTOS API v2 has the following fundamental modifications:
+ - The functions osXxxxNew replace osXxxxCreate functions; osXxxxNew and osXxxxDelete create and destroy objects.
+ - The C function main is not longer started as a thread (this was an optional feature in CMSIS-RTOS v1).
+ - Functions that return osEvent have been replaced.
+
+CMSIS-RTOS API v2 provides an translation layer for the
+<a class="el" href="../../RTOS/html/index.html">CMSIS-RTOS API v1</a> that simplifies migration.
+
+CMSIS-RTOS API v2 is not POSIX compliant, but has provisions to enable a POSIX translation layer and a C++ interface.
+\todo Investigate into a flexible C++ interface and potential POSIX translation
+
+<hr>
+
+CMSIS-RTOS in ARM::CMSIS Pack
+-----------------------------
+
+The following files relevant to CMSIS-RTOS are present in the <b>ARM::CMSIS</b> Pack directories:
+File/Folder | Content
+-----------------------------|------------------------------------------------------------------------
+\b CMSIS/Documentation/RTOS2 | This documentation
+\b CMSIS/Documentation/RTOS | CMSIS-RTOS API v1 documentation
+\b CMSIS/RTOS2/Template | \ref cmsis_os2_h
+*/
+
+
+/*=======0=========1=========2=========3=========4=========5=========6=========7=========8=========9=========0=========1====*/
+/**
+\page rtos_revisionHistory Revision History
+
+<table class="cmtable" summary="Revision History">
+ <tr>
+ <th>Version</th>
+ <th>Description</th>
+ </tr>
+ <tr>
+ <td>V2.00</td>
+ <td>
+ Extended number of thread priorities.\n
+ Added: osKernelTime, osKernelStop.\n
+ Added: osThreadState, osThreadGetState, osThreadSuspend, osThreadResume.\n
+ Added: osTimerRunning.\n
+ Added: osPoolDelete.\n
+ Added: osMessageCount, osMessageReset, osMessageDelete.\n
+ Added: osMailCount, osMailReset, osMailDelete.\n
+ Added: osFlag object.\n
+ </td>
+ </tr>
+ <tr>
+ <td>V1.02 - only documentation changes</td>
+ <td>
+ Added: Overview of the \ref rtosValidation "CMSIS-RTOS Validation" Software Pack.\n
+ Clarified: Behavior of \ref CMSIS_RTOS_TimeOutValue.
+ </td>
+ </tr>
+ <tr>
+ <td>V1.02</td>
+ <td>Added: New control functions for short timeouts in microsecond resolution \b osKernelSysTick,
+ \b osKernelSysTickFrequency, \b osKernelSysTickMicroSec.\n
+ Removed: osSignalGet.
+ </td>
+ </tr>
+ <tr>
+ <td>V1.01</td>
+ <td>Added capabilities for C++, kernel initialization and object deletion.\n
+ Prepared for C++ class interface. In this context to \em const attribute has been moved from osXxxxDef_t typedefs to
+ the osXxxxDef macros.\n
+ Added: \ref osTimerDelete, \ref osMutexDelete, \ref osSemaphoreDelete.\n
+ Added: \ref osKernelInitialize that prepares the Kernel for object creation.\n
+ </td>
+ </tr>
+ <tr>
+ <td>
+ V1.00</td>
+ <td>First official Release.\n
+ Added: \ref osKernelStart; starting 'main' as a thread is now an optional feature.\n
+ Semaphores have now the standard behavior.\n
+ \b osTimerCreate does no longer start the timer. Added: \ref osTimerStart (replaces osTimerRestart).\n
+ Changed: osThreadPass is renamed to \ref osThreadYield.
+ </td>
+ </tr>
+ <tr>
+ <td>V0.02</td>
+ <td>Preview Release.</td>
+ </tr>
+</table>
+*/
+
+
+/*=======0=========1=========2=========3=========4=========5=========6=========7=========8=========9=========0=========1====*/
+/**
+\page functionOverview Function Overview
+
+CMSIS-RTOS v2 provides multiple API functions:
+ - \subpage rtos_api2 is the new C function API that support dynamic object creation, ARMv8-M, and multi-processor
+ communication.
+ - <a class="el" href="../../RTOSv1/html/_function_overview.html">CMSIS-RTOS C API Version 1</a> is a C function API the is
+ backward compatible with CMSIS-RTOS v2.
+ - \subpage rtos_apicpp is a C++ class function API.
+
+It is possible to intermix the different API variants in the same application and even in the same C/C++ source module.
+However, the functions of the <b>C API Version 1</b> may be deprecated in future versions of CMSIS-RTOS.
+
+\section CMSIS_RTOS_TimeOutValue Timeout Value
+
+The timeout value specifies the number of timer ticks until a timeout or time delay elapses. The value is an upper bound and
+depends on the actual time elapsed since the last timer tick.
+
+For a value of \b 1 the system waits until the next timer tick occurs. That means that the actual timeout value can be one
+timer tick less than the specified timeout value.
+
+\image html TimerValues.png "Timer Values"
+
+\section CMSIS_RTOS_ISR_Calls Calls from Interrupt Service Routines
+
+\todo Can any of the new functions be called from ISRs?
+
+The following CMSIS-RTOS functions can be called from threads and Interrupt Service Routines (ISR):
+ - \ref osKernelRunning
+ - \ref osSemaphoreRelease
+ - \ref osMemoryPoolAlloc, \ref osMemoryPoolFree
+ - \ref osMessageQueuePut, \ref osMessageQueueGet
+
+Functions that cannot be called from an ISR are verifying the interrupt status and return, in case they are called
+from an ISR context, the status code \b osErrorISR. In some implementations, this condition might be caught using the HARD
+FAULT vector.
+
+Some CMSIS-RTOS implementations support CMSIS-RTOS function calls from multiple ISRs at the same time.
+If this is impossible, the CMSIS-RTOS rejects calls by nested ISR functions with the status code \b osErrorISRRecursive.
+*/
+
+
+
+/*=======0=========1=========2=========3=========4=========5=========6=========7=========8=========9=========0=========1====*/
+/**
+\page rtos_api2 CMSIS-RTOS C API Version 2
+
+Overview of all CMSIS-RTOS C API v2 functions.
+
+ - \ref CMSIS_RTOS_KernelCtrl
+ - \ref osKernelGetInfo : \copybrief osKernelGetInfo
+ - \ref osKernelGetState : \copybrief osKernelGetState
+ - \ref osKernelGetTick : \copybrief osKernelGetTick
+ - \ref osKernelGetTime : \copybrief osKernelGetTime
+ - \ref osKernelInitialize : \copybrief osKernelInitialize
+ - \ref osKernelLock : \copybrief osKernelLock
+ - \ref osKernelResume : \copybrief osKernelResume
+ - \ref osKernelStart : \copybrief osKernelStart
+ - \ref osKernelSuspend : \copybrief osKernelSuspend
+ - \ref osKernelTickMicroSec : \copybrief osKernelTickMicroSec
+ - \ref osKernelUnlock : \copybrief osKernelUnlock
+
+ - \ref CMSIS_RTOS_ThreadMgmt
+ - \ref osThreadAbortWait : \copybrief osThreadAbortWait
+ - \ref osThreadDetach : \copybrief osThreadDetach
+ - \ref osThreadExit : \copybrief osThreadExit
+ - \ref osThreadGetId : \copybrief osThreadGetId
+ - \ref osThreadGetPriority : \copybrief osThreadGetPriority
+ - \ref osThreadGetState : \copybrief osThreadGetState
+ - \ref osThreadJoin : \copybrief osThreadJoin
+ - \ref osThreadNew : \copybrief osThreadNew
+ - \ref osThreadResume : \copybrief osThreadResume
+ - \ref osThreadSetPriority : \copybrief osThreadSetPriority
+ - \ref osThreadSuspend : \copybrief osThreadSuspend
+ - \ref osThreadTerminate : \copybrief osThreadTerminate
+ - \ref osThreadYield : \copybrief osThreadYield
+
+ - \ref CMSIS_RTOS_Wait
+ - \ref osWaitForever : \copybrief osWaitForever
+ - \ref osDelay : \copybrief osDelay
+ - \ref osDelayUntil : \copybrief osDelayUntil
+
+ - \ref CMSIS_RTOS_TimerMgmt
+ - \ref osTimerDelete : \copybrief osTimerDelete
+ - \ref osTimerIsRunning : \copybrief osTimerIsRunning
+ - \ref osTimerNew : \copybrief osTimerNew
+ - \ref osTimerStart : \copybrief osTimerStart
+ - \ref osTimerStop : \copybrief osTimerStop
+
+ - \ref CMSIS_RTOS_EventFlags
+ - \ref osEventFlagsNew : \copybrief osEventFlagsNew
+ - \ref osEventFlagsDelete : \copybrief osEventFlagsDelete
+ - \ref osEventFlagsSet : \copybrief osEventFlagsSet
+ - \ref osEventFlagsClear : \copybrief osEventFlagsClear
+ - \ref osEventFlagsGet : \copybrief osEventFlagsGet
+ - \ref osEventFlagsWait : \copybrief osEventFlagsWait
+
+ - \ref CMSIS_RTOS_ThreadFlagsMgmt
+ - \ref osFlagsAutoClear : \copybrief osFlagsAutoClear
+ - \ref osFlagsWaitAll : \copybrief osFlagsWaitAll
+ - \ref osFlagsWaitAny : \copybrief osFlagsWaitAny
+ - \ref osThreadFlagsSet : \copybrief osThreadFlagsSet
+ - \ref osThreadFlagsWait : \copybrief osThreadFlagsWait
+
+ - \ref CMSIS_RTOS_Message
+ - \ref osMessageQueueDelete : \copybrief osMessageQueueDelete
+ - \ref osMessageQueueGet : \copybrief osMessageQueueGet
+ - \ref osMessageQueueGetCapacity : \copybrief osMessageQueueGetCapacity
+ - \ref osMessageQueueGetCount : \copybrief osMessageQueueGetCount
+ - \ref osMessageQueueGetMsgSize : \copybrief osMessageQueueGetMsgSize
+ - \ref osMessageQueueGetSpace : \copybrief osMessageQueueGetSpace
+ - \ref osMessageQueueNew : \copybrief osMessageQueueNew
+ - \ref osMessageQueuePut : \copybrief osMessageQueuePut
+ - \ref osMessageQueueReset : \copybrief osMessageQueueReset
+
+ - \ref CMSIS_RTOS_PoolMgmt
+ - \ref osMemoryPoolAlloc : \copybrief osMemoryPoolAlloc
+ - \ref osMemoryPoolDelete : \copybrief osMemoryPoolDelete
+ - \ref osMemoryPoolFree : \copybrief osMemoryPoolFree
+ - \ref osMemoryPoolGetBlockSize : \copybrief osMemoryPoolGetBlockSize
+ - \ref osMemoryPoolGetCapacity : \copybrief osMemoryPoolGetCapacity
+ - \ref osMemoryPoolGetCount : \copybrief osMemoryPoolGetCount
+ - \ref osMemoryPoolGetSpace : \copybrief osMemoryPoolGetSpace
+ - \ref osMemoryPoolNew : \copybrief osMemoryPoolNew
+
+ - \ref CMSIS_RTOS_MutexMgmt
+ - \ref osMutexAcquire : \copybrief osMutexAcquire
+ - \ref osMutexDelete : \copybrief osMutexDelete
+ - \ref osMutexGetOwner : \copybrief osMutexGetOwner
+ - \ref osMutexNew : \copybrief osMutexNew
+ - \ref osMutexRelease : \copybrief osMutexRelease
+
+ - \ref CMSIS_RTOS_SemaphoreMgmt
+ - \ref osSemaphoreAcquire : \copybrief osSemaphoreAcquire
+ - \ref osSemaphoreDelete : \copybrief osSemaphoreDelete
+ - \ref osSemaphoreGetCount : \copybrief osSemaphoreGetCount
+ - \ref osSemaphoreNew : \copybrief osSemaphoreNew
+ - \ref osSemaphoreRelease : \copybrief osSemaphoreRelease
+*/
+
+/*=======0=========1=========2=========3=========4=========5=========6=========7=========8=========9=========0=========1====*/
+/**
+\page rtos_apicpp CMSIS-RTOS C++ API
+
+Coming soon
+*/
+
+
+/*=======0=========1=========2=========3=========4=========5=========6=========7=========8=========9=========0=========1====*/
+/**
+\page cmsis_os2_h Header File Template: cmsis_os2.h
+
+The file \b cmsis_os2.h is a template header file for a CMSIS-RTOS compliant Real-Time Operating System (RTOS).
+Each RTOS that is compliant with CMSIS-RTOS shall provide a specific \b cmsis_os2.h header file that represents
+its implementation.
+
+The file cmsis_os2.h contains:
+ - CMSIS-RTOS API function definitions
+ - struct definitions for parameters and return types
+ - status and priority values used by CMSIS-RTOS API functions
+ - macros for defining threads and other kernel objects
+
+
+<b>Name conventions and header file modifications</b>
+
+All definitions are prefixed with \b os to give an unique name space for CMSIS-RTOS functions.
+Definitions that are prefixed \b os_ are not used in the application code but local to this header file.
+All definitions and functions that belong to a module are grouped and have a common prefix, i.e. \b osThread.
+
+Definitions that are marked with <b>CAN BE CHANGED</b> can be adapted towards the needs of the actual CMSIS-RTOS
+implementation. These definitions can be specific to the underlying RTOS kernel.
+
+Definitions that are marked with <b>MUST REMAIN UNCHANGED</b> cannot be altered. Otherwise the CMSIS-RTOS implementation is
+no longer compliant to the standard. Note that some functions are optional and need not to be provided by every CMSIS-RTOS
+implementation.
+
+<b>Define and reference object definitions</b>
+
+With <b>\#define osObjectsExternal</b> objects are defined as external symbols. This allows to create a consistent header
+file that is used throughout a project as shown below:
+
+<i>Header File</i>
+\code
+#include <cmsis_os2.h> // CMSIS RTOS header file
+
+// Thread definition
+
+// Pool definition
+
+\endcode
+
+\todo add the code for pool and thread creation.
+
+This header file defines all objects when included in a C/C++ source file. When <b>\#define osObjectsExternal</b> is
+present before the header file, the objects are defined as external symbols. A single consistent header file can therefore be
+used throughout the whole project.
+
+<i>Example</i>
+\code
+#include "osObjects.h" // Definition of the CMSIS-RTOS objects
+\endcode
+
+\code
+#define osObjectsExternal // Objects will be defined as external symbols
+#include "osObjects.h" // Reference to the CMSIS-RTOS objects
+\endcode
+
+<b>Header file %cmsis_os2.h</b>
+
+\include cmsis_os2.h
+*/
+
+/*=======0=========1=========2=========3=========4=========5=========6=========7=========8=========9=========0=========1====*/
+/**
+\page rtx5_impl RTX5 Implementation
+
+The following chapters guide you towards implementing the CMSIS-RTOS RTX:
+ - \subpage theory_op
+ - \subpage cre_rtx_proj
+ - \subpage config_rtx
+*/
+
+/*=======0=========1=========2=========3=========4=========5=========6=========7=========8=========9=========0=========1====*/
+/**
+\page theory_op Theory of Operation
+
+This section describes how CMSIS-RTOS RTX manages the resources of the target system. Many aspects of the CMSIS-RTOS RTX
+kernel can be configured. Information about configuration options is mentioned where applicable.
+
+\section KernelTimer RTX Kernel Timer Tick and Thread Management
+
+By default, CMSIS-RTOS RTX5 uses the Cortex-M
+<a href="http://www.keil.com/support/man/docs/gsac/GSAC_SYSTICKtimer.htm" target="_blank">SysTick</a> timer to generate
+periodic interrupts for the RTX kernel timer tick. CMSIS-RTOS provides \ref CMSIS_RTOS_TimerMgmt functions and several
+CMSIS-RTOS functions have a timeout parameter. This periodic RTX kernel timer tick interrupt is used to derive the required
+time interval. CMSIS-RTOS RTX also provides configuration options for a alternative timer and tick-less operation.
+
+To handle timeout and time delays for threads, the CMSIS-RTOS RTX thread management is controlled by the RTX kernel timer
+tick interrupt. The thread context switch itself is implemented in the HAL_CMx.x hardware abstraction layer source files. The
+thread context contains all CPU registers (R0 - R12), the return address (LR), the program counter (PC), and the processor
+status register (xPSR). For the Cortex-M4 FPU and Cortex-M7 FPU the floating point status and registers (S0 - S32, FPSCR) are
+also part of the thread context.
+
+When a thread switch occurs:
+ - the thread context of the current running thread is stored on the local stack of this thread.
+ - the stack pointer is switched to the next running thread.
+ - the thread context of this next running thread is restored and this thread starts to run.
+
+\note
+- For Cortex-M0, Cortex-M3, Cortex-M4, and Cortex-M7 the thread context requires 64 bytes on the local stack.
+- For Cortex-M4 FPU and Cortex-M7 FPU the thread context requires 200 bytes on the local stack. For devices with Cortex-M4 FPU and Cortex-M7 FPU the default stack space should be increased to a minimum of 300 bytes.
+
+Each thread is provided with an separate stack that holds the thread context and stack space for automatic variables and return addresses for function call nesting. The stack sizes of the RTX threads are flexible configurable as explained in the section \ref threadConfig. RTX even offers a configurable checking for stack overflows and stack utilization.
+
+*/
+
+/*=======0=========1=========2=========3=========4=========5=========6=========7=========8=========9=========0=========1====*/
+/**
+\page cre_rtx_proj Create an RTX Project
+
+Example projects using CMSIS-RTOS RTX are available for various development boards. To make use of these examples, you need
+to install a Device Family Pack in µVision and use Pack Installer to open a CMSIS-RTOS2 Blinky project. If you wish to start a CMSIS-RTOS RTX5 from scratch, follow these steps:
+- Create a new project and select a device.
+- In the Manage Run-Time Environment window that opens, select <b>CMSIS\::CORE</b> and <b>CMSIS\::RTOS2 (API)\::Keil RTX5</b>.
+ If the <b>Validation Output</b> requires other components to be present, try to use the \b Resolve button:
+
+ \image html manage_rte_output.png
+
+- Click \b OK. In the \b Project window, you will see the files that have been automatically added to you project, such as
+ \b %RTX_Config.c and the system and startup files:
+
+ \image html project_window.png
+
+- You can add template files to the project by right-clicking on <b>Source Group 1</b> and selecting
+ <b>Add New Item to 'Source Group 1'</b>. In the new window, click on <b>User Code Template</b>. On the right-hand side
+ you will see all available template files for CMSIS-RTOS RTX:
+
+ \image html add_item.png
+
+- Finally, \ref config_rtx "configure" RTX to the application's needs using the \b %RTX_Config.c file.
+*/
+
+/*=======0=========1=========2=========3=========4=========5=========6=========7=========8=========9=========0=========1====*/
+/**
+\page config_rtx Configure RTX
+
+The file "RTX_Config.c" is used to define the configuration parameters of CMSIS-RTOS RTX. This file must be part of every project that is using the CMSIS-RTOS RTX kernel.
+
+The configuration file uses
+<a class="el" href="http://www.keil.com/pack/doc/CMSIS/Pack/html/_config_wizard.html" target="_blank">Configuration Wizard Annotations</a>.
+Depending on the development tool that is used, this might lead to a more user friendly graphical representation of the settings. The following is a screenshot of the same configuration file using µVision's Configuration Wizard view:
+
+\image html config_wizard.png "RTX_Conf_CM.c in Configuration Wizard View"
+
+The configuration options are explained on these pages:
+- \subpage threadConfig
+
+*/
+
+
+/* ========================================================================================================================== */
+/**
+\page threadConfig Thread Configuration
+
+The CMSIS-RTOS RTX provides several parameters for the thread configuration.
+
+\section stackConfig Configuration of Thread count and Stack Space
+
+\ref osThreadAttr_t is passed to osThreadNew to set the options of a thread.
+
+CMSIS-RTOS RTX defines two methods for defining the stack requirements:
+ - when \a *stack_mem in osThreadAttr_t is NULL, a fixed-size memory pool is used to for the thread stack. In this case \b OS_STKSIZE specifies the stack size for the thread function.
+ - when \a *stack_mem specifies a memory location, the thread stack provided there. The size of this user space is specified with \b stack_size.
+
+Stack memory for threads is configured either statically by Static Resources - Number of Threads (total). Static memory in the size of Number of Threads * Default Thread Stack size is reserved.
+Alternatively the memory is allocated on demand from the Dynamic Resources pool (configured by System Configuration - Dynamic Resources - Memory size [bytes] for Stack).
+
+The CMSIS-RTOS RTX kernel uses a separate stack for each thread it creates. However, before the kernel is started by the\ref osKernelInitialize() function, the main stack size that is configured in the file startup_<i>device</i>.s is used.
+
+Main stack is also used when:
+- the user application calls the majority of RTX functions from Thread mode (ending up in an SVC call)
+- running from handlers (user interrupt of exception handlers like SVCm PendSV, Faults, etc.)
+
+|Name |\#define |Description|
+|-------------------------------------------------------------------|-----------------|-----------|
+|Number of concurrent running user threads |\c OS_THREAD_NUM |Indicates the maximum number of threads that will run at the same time (including main).|
+|Default Thread stack size [bytes] |\c OS_STACK_SIZE |Specifies the default stack size (in words) for threads that are defined with osThreadDef \a stacksz = 0.|
+|Number of threads with user-provided stack size |\c OS_THREAD_USER_STACK_NUM |Indicates the number of threads that are created with \ref osThreadNew \a stack_size specifies the stack size requirement of that thread.|
+|stackCheck |\c OS_STACK_CHECK |If a stack overflow is detected at a thread switch, the function \b os_error with error code = 1 is called. By default, this function is implemented as endless loop and will practically stop code execution.|
+|stackUsage |\c OS_STACK_WATERMARK |Initializes the thread stack with a watermark pattern that can be used to determine the maximum stack usage within each thread.|
+|processorMode |\c OS_PRIVILEGE_MODE |Controls the processor mode (privileged/unprivileged)|
+*/
+
+/*=======0=========1=========2=========3=========4=========5=========6=========7=========8=========9=========0=========1====*/
+/**
+\page rtosValidation RTOS Validation
+
+\note
+The test suite is available only for RTOS v1 API.
+
+ARM offers a <a class=el href="http://www.keil.com/pack" target="_blank">Software Pack</a> for the CMSIS-RTOS Validation.
+The <b>ARM::CMSIS-RTOS_Validation</b> Pack contains the following:
+
+ - Source code of a CMSIS-RTOS Validation Suite along with configuration file.
+ - Documentation of the CMSIS-RTOS Validation Suite.
+ - Example that shows the usage of the CMSIS-RTOS Validation Suite using simulation.
+
+The CMSIS-RTOS Validation Suite is currently available in beta release and performs generic validation of various
+RTOS features. The test cases verify the functional behavior, test invalid parameters and call management
+functions from ISR.
+
+The following CMSIS-RTOS features can be tested with the current release:
+ - Thread : Create multiple threads, terminate, restart, yield, change priority
+ - Timer : Create periodic and one-shot timers
+ - GenWait : Call generic wait functions (osDelay and osWait)
+ - WaitFunc : Measure wait ticks (delay, mail, message, mutex, semaphore, signal)
+
+Moreover the following inter-thread communication functions can be tested:
+ - Signal : Verify signal events
+ - Memory Pool : Verify memory allocation
+ - Message Queue : Exchange messages between threads
+ - Mail Queue : Exchange data between threads
+ - Mutex : Synchronize resource access
+ - Semaphore : Access shared resources
+
+The RTOS Validation output can be printed to a console, output via ITM printf, or output to a memory buffer.
+
+\section test_output Sample Test Output
+\verbatim
+CMSIS-RTOS Test Suite Oct 21 2015 16:39:16
+
+TEST 01: TC_ThreadCreate PASSED
+TEST 02: TC_ThreadMultiInstance PASSED
+TEST 03: TC_ThreadTerminate PASSED
+ :
+ :
+TEST 08: TC_ThreadChainedCreate PASSED
+TEST 09: TC_ThreadYield NOT EXECUTED
+TEST 10: TC_ThreadParam PASSED
+ :
+ :
+TEST 60: TC_MailFromISRToThread PASSED
+
+Test Summary: 60 Tests, 59 Executed, 59 Passed, 0 Failed, 0 Warnings.
+Test Result: PASSED
+\endverbatim
+*/
+
+/* ========================================================================================================================== */
+// Group creation for Reference
+/**
+\addtogroup CMSIS_RTOS1 CMSIS-RTOS API v1
+\brief This section describes the CMSIS-RTOS API v1.
+\details
+The CMSIS-RTOS is a generic API layer that interfaces to an existing RTOS kernel.
+
+CMSIS-RTOS API v2 provides an translation layer for the
+<a class="el" href="../../RTOS/html/index.html">CMSIS-RTOS API v1</a> that simplifies migration.
+
+Refer to the <a class="el" href="../../RTOS/html/modules.html">Reference</a> guide of the CMSIS-RTOS API v1 for details.
+*/
+
+// Group creation for Reference
+/**
+\addtogroup CMSIS_RTOS CMSIS-RTOS API v2
+\brief This section describes the CMSIS-RTOS API v2.
+\details
+The CMSIS-RTOS is a generic API layer that interfaces to an existing RTOS kernel.
+
+*/
+
diff --git a/CMSIS/DoxyGen/RTOS2/src/cmsis_os2_Event.txt b/CMSIS/DoxyGen/RTOS2/src/cmsis_os2_Event.txt
new file mode 100644
index 0000000..a6dc4a3
--- /dev/null
+++ b/CMSIS/DoxyGen/RTOS2/src/cmsis_os2_Event.txt
@@ -0,0 +1,153 @@
+
+
+/*=======0=========1=========2=========3=========4=========5=========6=========7=========8=========9=========0=========1====*/
+// ==== Event Flag Management ====
+/**
+\addtogroup CMSIS_RTOS_EventFlags Event Flags
+\ingroup CMSIS_RTOS
+\brief Create events using flags.
+\details
+Events are used to trigger execution states between threads. The event flag management functions in CMSIS-RTOS allow you to control or wait for event flags. Each signal has up to 31 event flags (int32_t flags provides 31 bits).
+
+A thread
+- can wait for event flags to be set (using \ref osEventFlagsGet). Using this function, it enters the
+ \ref ThreadStates "WAITING" state. The \ref osEventFlagsGet parameter \a flags defines the signals that are required to put the thread back into \b READY state.
+- may set one or more flags in any other given thread (using \ref osEventFlagsSet).
+- may clear its own signals or the signals of other threads (using \ref osEventFlagsClear).
+
+When a thread wakes up and resumes execution, its signal flags are automatically cleared.
+
+Working with Events
+--------------------
+Here is a simple example that shows how two thread can communicate with each others using event flags:
+
+\image html simple_signal.png "Simple event communication"
+
+The following steps are required to use signals:
+-# In the thread that is supposed to send a event with id sig1_id, call the wait function:
+\code
+osEventFlagsSet (sig1_id, 0x0001); //
+\endcode
+-# In another thread (or threads) that are supposed wait for the event:
+\code
+osEventFlagsGet (sig1_id, 0x0001, NULL, osWaitForever); // set the signal 0x0001 for thread tid_thread1
+osDelay (1000); // wait for 1 second
+\endcode
+
+@{
+*/
+/*=======0=========1=========2=========3=========4=========5=========6=========7=========8=========9=========0=========1====*/
+/**
+\typedef osEventFlagsId_t
+\details
+
+*/
+/*=======0=========1=========2=========3=========4=========5=========6=========7=========8=========9=========0=========1====*/
+/**
+\struct osEventFlagsAttr_t
+\details
+
+*/
+/*=======0=========1=========2=========3=========4=========5=========6=========7=========8=========9=========0=========1====*/
+/**
+\fn osEventFlagsId_t osEventFlagsNew (const osEventFlagsAttr_t *attr)
+\details
+Create and initialize a Event Flag object that is used to send events accross threads.
+
+<b>Code Example</b>
+\code{.c}
+#include "cmsis_os2.h"
+
+osEventId_tId_t event_id;
+
+void CreateEvent (void) {
+
+ event_id = osEventFlagsNew(NULL);
+ if (event_id != NULL) {
+ // Event object created
+ }
+}
+\endcode
+*/
+/*=======0=========1=========2=========3=========4=========5=========6=========7=========8=========9=========0=========1====*/
+/**
+\fn int32_t osEventFlagsSet (osEventFlagsId_t ef_id, int32_t flags)
+\details
+Set the event flags in an event flags object. This function may be used also within interrupt service routines.
+All threads waiting for the flag set will be notified to resume from WAITING state.
+
+\note \ref CMSIS_RTOS_ISR_Calls "Interrupt Service Routines" can call this function.
+
+<b>Code Example</b>
+\code{.c}
+void *Thread_2 (void *arg);
+
+static void EX_Signal_1 (void) {
+ int32_t signals;
+ osThreadId_t thread_id;
+
+ thread_id = osThreadCreate (Thread_2, NULL, NULL);
+ signals = osEventFlagsSet (event_id, 0x00000005); // Send signals to the created thread
+}
+\endcode
+*/
+/*=======0=========1=========2=========3=========4=========5=========6=========7=========8=========9=========0=========1====*/
+/**
+\fn int32_t osEventFlagsClear (osEventFlagsId_t ef_id, int32_t flags)
+\details
+Clear the event flags of an event flags object.
+*/
+/*=======0=========1=========2=========3=========4=========5=========6=========7=========8=========9=========0=========1====*/
+/**
+\fn int32_t osEventFlagsGet (osEventFlagsId_t ef_id)
+\details
+Return the event flags currently set in an event flags object.
+*/
+/*=======0=========1=========2=========3=========4=========5=========6=========7=========8=========9=========0=========1====*/
+/**
+\fn int32_t osEventFlagsWait (osEventFlagsId_t ef_id, int32_t flags, uint32_t options, uint32_t millisec)
+\details
+Suspend the execution of the current \b RUNNING thread until any or all specified event flags with the parameter \a flags are set.
+The /em options parameter specifies the wait condition.
+
+|Option | |
+|--------------------|-------------------------------------------------------|
+|\b osFlagsWaitAny | Wait for any flag (default). |
+|\b osFlagsWaitAll | Wait for all flags. |
+|\b osFlagsAutoClear | Clear flags which have been specified to wait for. |
+
+If osFlagsAutoClear is not set in the options /ref osEventFlagsClear can be used to clear flags manually.
+
+When these event flags are already set, the function returns instantly. Otherwise the thread is put into the state \b WAITING.
+
+*/
+/*=======0=========1=========2=========3=========4=========5=========6=========7=========8=========9=========0=========1====*/
+/**
+\fn osStatus_t osEventFlagsDelete (osEventFlagsId_t ef_id)
+\details
+Delete an event flag object. The function releases internal memory obtained for event flags handling. After this call the \em ef_id is no longer valid and cannot be used. The \em ef_id may be created again using the function \ref osEventFlagsNew.
+This can cause starvation of threads that are waiting for flags of this event object.
+*/
+/// @}
+
+// these struct members must stay outside the group to avoid double entries in documentation
+/**
+\var osEventFlagsAttr_t::attr_bits
+\details
+No attributes available.
+
+\var osEventFlagsAttr_t::cb_mem
+\details
+Pointer to a memory location for the event object. This can optionally be used for custom memory management systems.
+Specify \token{NULL} to use the kernel memory management.
+
+
+\var osEventFlagsAttr_t::cb_size
+\details
+The size of the memory block passed with \ref cb_mem. Must be the size of an event object or larger.
+
+\var osEventFlagsAttr_t::name
+\details
+String with a human readable name of the event object.
+
+*/
diff --git a/CMSIS/DoxyGen/RTOS2/src/cmsis_os2_Kernel.txt b/CMSIS/DoxyGen/RTOS2/src/cmsis_os2_Kernel.txt
new file mode 100644
index 0000000..2d9cede
--- /dev/null
+++ b/CMSIS/DoxyGen/RTOS2/src/cmsis_os2_Kernel.txt
@@ -0,0 +1,168 @@
+/*=======0=========1=========2=========3=========4=========5=========6=========7=========8=========9=========0=========1====*/
+// ==== Kernel Control ====
+/**
+\addtogroup CMSIS_RTOS_KernelCtrl Kernel Information and Control
+\ingroup CMSIS_RTOS
+\brief Provide version/system information and start the RTOS Kernel.
+\details
+The Kernel Information and Control function group allows to:
+ - obtain information about the system and the underlying kernel.
+ - obtain version information about the CMSIS-RTOS API.
+ - initialize of the RTOS kernel for creating objects.
+ - start the RTOS kernel and thread switching.
+ - check the execution status of the RTOS kernel.
+
+The function \b main is a special thread function that may be started at system initialization. In this case it has the
+initial priority \a osPriorityNormal.
+
+When reaching \b main, it is necessary to:
+-# Call osKernelInitialize() to initialize the CMSIS-RTOS Kernel
+-# Setup device peripherals and create other RTOS objects using the \b os*Create functions.
+-# Start the Kernel and begin thread switching by calling osKernelStart().
+
+<b>Code Example</b>
+\code
+int main (void) {
+ osKernelInitialize (); // initialize CMSIS-RTOS
+
+ // initialize peripherals here
+
+ // create 'thread' functions that start executing,
+ // example: tid_name = osThreadCreate (osThread(name), NULL);
+
+ osKernelStart (); // start thread execution
+}
+\endcode
+@{
+*/
+/*=======0=========1=========2=========3=========4=========5=========6=========7=========8=========9=========0=========1====*/
+/**
+\struct osVersion_t
+\details
+Identifies the underlying RTOS kernel and API version number.
+The Version is represented in a combined decimal number in the format: major.minor.rev: mmnnnrrrr
+
+Use \ref osKernelGetInfo to retrieve the version numbers
+
+*/
+/*=======0=========1=========2=========3=========4=========5=========6=========7=========8=========9=========0=========1====*/
+/**
+\enum osKernelState_t
+\details
+State of the Kernel. Can be retrieved by \ref osKernelGetState.
+*/
+/*=======0=========1=========2=========3=========4=========5=========6=========7=========8=========9=========0=========1====*/
+/**
+\fn osStatus_t osKernelInitialize (void)
+\details
+
+*/
+/*=======0=========1=========2=========3=========4=========5=========6=========7=========8=========9=========0=========1====*/
+/**
+\fn osStatus_t osKernelGetInfo (osVersion_t *version, char *id_buf, uint32_t id_size)
+\details
+Retrieve API and kernel version of the underlying RTOS kernel and a human readable identifier string of the kernel.
+
+\b Example
+\code
+void info (void) {
+ char infobuf[100];
+ osVersion_t osv;
+ osStatus_t status;
+
+ status = osKernelGetInfo(&osv, infobuf, 100);
+ if(status == osOK) {
+ printf("Kernel Information: %s\r\n", infobuf);
+ printf("Kernel Version : %d\r\n", osv.kernel);
+ printf("Kernel API Version: %d\r\n", osv.api);
+ }
+}
+\endcode
+*/
+/*=======0=========1=========2=========3=========4=========5=========6=========7=========8=========9=========0=========1====*/
+/**
+\fn osKernelState_t osKernelGetState (void)
+\details
+
+*/
+/*=======0=========1=========2=========3=========4=========5=========6=========7=========8=========9=========0=========1====*/
+/**
+\fn osStatus_t osKernelStart (void)
+\details
+
+*/
+/*=======0=========1=========2=========3=========4=========5=========6=========7=========8=========9=========0=========1====*/
+/**
+\fn uint32_t osKernelLock (void)
+\details
+
+*/
+/*=======0=========1=========2=========3=========4=========5=========6=========7=========8=========9=========0=========1====*/
+/**
+\fn void osKernelUnlock (void)
+\details
+
+*/
+/*=======0=========1=========2=========3=========4=========5=========6=========7=========8=========9=========0=========1====*/
+/**
+\fn uint32_t osKernelSuspend (void)
+\details
+
+*/
+/*=======0=========1=========2=========3=========4=========5=========6=========7=========8=========9=========0=========1====*/
+/**
+\fn void osKernelResume (uint32_t sleep_time)
+\details
+
+*/
+/*=======0=========1=========2=========3=========4=========5=========6=========7=========8=========9=========0=========1====*/
+/**
+\fn uint64_t osKernelGetTime (void)
+\details
+
+*/
+/*=======0=========1=========2=========3=========4=========5=========6=========7=========8=========9=========0=========1====*/
+/**
+\fn uint32_t osKernelGetTick (void)
+\details
+
+*/
+/*=======0=========1=========2=========3=========4=========5=========6=========7=========8=========9=========0=========1====*/
+/**
+\fn uint32_t osKernelTickMicroSec (uint32_t microsec)
+\details
+
+*/
+/// @}
+
+// these struct members must stay outside the group to avoid double entries in documentation
+/**
+\var osKernelState_t::osKernelInactive
+\details
+The kernel is not ready yet. \ref osKernelInitialize needs to be executed successfully.
+
+\var osKernelState_t::osKernelReady
+\details
+The kernel is not yet running. \ref osKernelStart transfers the kernel to the running state.
+
+\var osKernelState_t::osKernelRunning
+\details
+The kernel is initialized and running.
+
+\var osKernelState_t::osKernelLocked
+\details
+The kernel was locked with \ref osKernelLock. The function \ref osKernelUnlock unlocks it.
+
+\var osKernelState_t::osKernelSuspended
+\details
+The kernel was suspended using \ref osKernelSuspend. The function \ref osKernelResume returns to normal operation.
+
+\var osKernelState_t::osKernelError
+\details
+An error occurred. The kernel error handler should have been called in this state.
+
+\var osKernelState_t::osKernelReserved
+\details
+Reserved.
+*/
+
diff --git a/CMSIS/DoxyGen/RTOS2/src/cmsis_os2_MemPool.txt b/CMSIS/DoxyGen/RTOS2/src/cmsis_os2_MemPool.txt
new file mode 100644
index 0000000..17151f5
--- /dev/null
+++ b/CMSIS/DoxyGen/RTOS2/src/cmsis_os2_MemPool.txt
@@ -0,0 +1,111 @@
+
+
+/*=======0=========1=========2=========3=========4=========5=========6=========7=========8=========9=========0=========1====*/
+// ==== Memory Pool Management ====
+/**
+\addtogroup CMSIS_RTOS_PoolMgmt Memory Pool
+\ingroup CMSIS_RTOS
+\brief Manage thread-safe fixed-size blocks of dynamic memory.
+\details
+\b Memory \b pools are fixed-size blocks of memory that are thread-safe. They operate much faster than the dynamically
+allocated heap and do not suffer from fragmentation. Being thread-safe, they can be accessed from threads and ISRs alike.
+
+\b Shared \b memory is one of the basic models to exchange information between threads. Using memory pools for exchanging
+data, you can share more complex objects between threads if compared to a \ref CMSIS_RTOS_Message. Memory pool management
+functions are used to define and manage such fixed-sized memory pools.
+
+Working with Memory Pools
+-------------------------
+Follow these steps to create and use a memory pool:
+-# Declare a data structure that combines a number of elements:
+\code
+typedef struct {
+ uint32_t length;
+ uint32_t width;
+ uint32_t height;
+ uint32_t weight;
+} properties_t;
+\endcode
+-# Declare a memory pool of these objects as a block of memory:
+\code
+osPoolDef (object_pool, 10, properties_t); // Declare memory pool
+osPoolId (object_pool_id); // Memory pool ID
+\endcode
+-# Then, create the memory pool in a thread:
+\code
+object_pool_id = osPoolCreate(osPool(object_pool));
+\endcode
+-# Allocate the pool within a thread and fill it with data:
+\code
+properties_t *object_data;
+*object_data = (properties_t *) osPoolAlloc(object_pool_id);
+
+object_data->length = 100;
+object_data->width = 10;
+object_data->height = 23;
+object_data->weight = 1000;
+\endcode
+
+@{
+*/
+
+/*=======0=========1=========2=========3=========4=========5=========6=========7=========8=========9=========0=========1====*/
+/**
+\typedef osMemoryPoolId_t
+\details
+
+*/
+/**
+\struct osMemoryPoolAttr_t
+\details
+
+*/
+/*=======0=========1=========2=========3=========4=========5=========6=========7=========8=========9=========0=========1====*/
+/**
+\fn osMemoryPoolId_t osMemoryPoolNew (uint32_t block_count, uint32_t block_size, const osMemoryPoolAttr_t *attr)
+\details
+
+*/
+/*=======0=========1=========2=========3=========4=========5=========6=========7=========8=========9=========0=========1====*/
+/**
+\fn void *osMemoryPoolAlloc (osMemoryPoolId_t mp_id, uint32_t millisec)
+\details
+
+*/
+/*=======0=========1=========2=========3=========4=========5=========6=========7=========8=========9=========0=========1====*/
+/**
+\fn osStatus_t osMemoryPoolFree (osMemoryPoolId_t mp_id, void *block)
+\details
+
+*/
+/*=======0=========1=========2=========3=========4=========5=========6=========7=========8=========9=========0=========1====*/
+/**
+\fn uint32_t osMemoryPoolGetCapacity (osMemoryPoolId_t mp_id)
+\details
+
+*/
+/*=======0=========1=========2=========3=========4=========5=========6=========7=========8=========9=========0=========1====*/
+/**
+\fn uint32_t osMemoryPoolGetBlockSize (osMemoryPoolId_t mp_id)
+\details
+
+*/
+/*=======0=========1=========2=========3=========4=========5=========6=========7=========8=========9=========0=========1====*/
+/**
+\fn uint32_t osMemoryPoolGetCount (osMemoryPoolId_t mp_id)
+\details
+
+*/
+/*=======0=========1=========2=========3=========4=========5=========6=========7=========8=========9=========0=========1====*/
+/**
+\fn uint32_t osMemoryPoolGetSpace (osMemoryPoolId_t mp_id)
+\details
+
+*/
+/*=======0=========1=========2=========3=========4=========5=========6=========7=========8=========9=========0=========1====*/
+/**
+\fn osStatus_t osMemoryPoolDelete (osMemoryPoolId_t mp_id)
+\details
+
+*/
+/// @}
diff --git a/CMSIS/DoxyGen/RTOS2/src/cmsis_os2_Message.txt b/CMSIS/DoxyGen/RTOS2/src/cmsis_os2_Message.txt
new file mode 100644
index 0000000..ce9fd21
--- /dev/null
+++ b/CMSIS/DoxyGen/RTOS2/src/cmsis_os2_Message.txt
@@ -0,0 +1,113 @@
+
+
+/*=======0=========1=========2=========3=========4=========5=========6=========7=========8=========9=========0=========1====*/
+// ==== Message Queue Management ====
+/**
+@addtogroup CMSIS_RTOS_Message Message Queue
+@ingroup CMSIS_RTOS
+@brief Exchange messages between threads in a FIFO-like operation.
+@details
+\b Message \b passing is another basic communication model between threads. In the message passing model, one thread sends
+data explicitly, while another thread receives it. The operation is more like some kind of I/O rather than a direct access to
+information to be shared. In CMSIS-RTOS, this mechanism is called s \b message \b queue. The data is passed from one thread
+to another in a FIFO-like operation. Using message queue functions, you can control, send, receive, or wait for messages. The
+data to be passed can be of integer or pointer type:
+
+\image html "MessageQueue.png" "CMSIS-RTOS Message Queue"
+
+Compared to a \ref CMSIS_RTOS_PoolMgmt, message queues are less efficient in general, but solve a broader range of problems.
+Sometimes, threads do not have a common address space or the use of shared memory raises problems, such as mutual exclusion.
+
+Working with Message Queues
+---------------------------
+Follow these steps to create and use a message queue:
+-# Setup the message queue:
+\code
+osMessageQDef(message_q, 5, uint32_t); // Declare a message queue
+osMessageQId (message_q_id); // Declare an ID for the message queue
+\endcode
+-# Then, create the message queue in a thread:
+\code
+message_q_id = osMessageCreate(osMessageQ(message_q), NULL);
+\endcode
+-# Fill the message queue with data:
+\code
+uint32_t data = 512;
+
+osMailPut(message_q_id, data, osWaitForever);
+\endcode
+-# From the receiving thread access the data using:
+\code
+osEvent event = osMessageGet(message_q_id, osWaitForever);
+\endcode
+
+@{
+*/
+/*=======0=========1=========2=========3=========4=========5=========6=========7=========8=========9=========0=========1====*/
+/**
+\def osMessageQueueId_t
+\details
+
+*/
+/*=======0=========1=========2=========3=========4=========5=========6=========7=========8=========9=========0=========1====*/
+/**
+\struct osMessageQueueAttr_t
+\details
+Attributes structure for message queue.
+*/
+
+/*=======0=========1=========2=========3=========4=========5=========6=========7=========8=========9=========0=========1====*/
+/**
+\fn osMessageQueueId_t osMessageQueueNew (uint32_t msg_count, uint32_t msg_size, const osMessageQueueAttr_t *attr)
+\details
+
+*/
+/*=======0=========1=========2=========3=========4=========5=========6=========7=========8=========9=========0=========1====*/
+/**
+\fn osStatus_t osMessageQueuePut (osMessageQueueId_t mq_id, const void *msg_ptr, uint8_t msg_prio, uint32_t millisec)
+\details
+
+*/
+/*=======0=========1=========2=========3=========4=========5=========6=========7=========8=========9=========0=========1====*/
+/**
+\fn osStatus_t osMessageQueueGet (osMessageQueueId_t mq_id, void *msg_ptr, uint8_t *msg_prio, uint32_t millisec)
+\details
+
+*/
+/*=======0=========1=========2=========3=========4=========5=========6=========7=========8=========9=========0=========1====*/
+/**
+\fn uint32_t osMessageQueueGetCapacity (osMessageQueueId_t mq_id)
+\details
+
+*/
+/*=======0=========1=========2=========3=========4=========5=========6=========7=========8=========9=========0=========1====*/
+/**
+\fn uint32_t osMessageQueueGetMsgSize (osMessageQueueId_t mq_id)
+\details
+
+*/
+/*=======0=========1=========2=========3=========4=========5=========6=========7=========8=========9=========0=========1====*/
+/**
+\fn uint32_t osMessageQueueGetCount (osMessageQueueId_t mq_id)
+\details
+
+*/
+/*=======0=========1=========2=========3=========4=========5=========6=========7=========8=========9=========0=========1====*/
+/**
+\fn uint32_t osMessageQueueGetSpace (osMessageQueueId_t mq_id)
+\details
+
+*/
+/*=======0=========1=========2=========3=========4=========5=========6=========7=========8=========9=========0=========1====*/
+/**
+\fn osStatus_t osMessageQueueReset (osMessageQueueId_t mq_id)
+\details
+
+*/
+/*=======0=========1=========2=========3=========4=========5=========6=========7=========8=========9=========0=========1====*/
+/**
+\fn osStatus_t osMessageQueueDelete (osMessageQueueId_t mq_id)
+\details
+
+*/
+/// @}
\ No newline at end of file
diff --git a/CMSIS/DoxyGen/RTOS2/src/cmsis_os2_Migration.txt b/CMSIS/DoxyGen/RTOS2/src/cmsis_os2_Migration.txt
new file mode 100644
index 0000000..8d28762
--- /dev/null
+++ b/CMSIS/DoxyGen/RTOS2/src/cmsis_os2_Migration.txt
@@ -0,0 +1,728 @@
+/*=======0=========1=========2=========3=========4=========5=========6=========7=========8=========9=========0=========1====*/
+/**
+\page os2Migration Migration from RTOSv1 to RTOSv2
+
+This section lists all new API functions along with the differences to the RTOS v1 functionality.
+
+The list is sorted alphabetically by RTOSv2 function names and is structured the following way:
+<hr>
+\token{for RTOS v2} : \func{RTOS version 2 function}
+\token{for RTOS v1} : \func{RTOS version 1 function}
+
+Brief description of new function. \n
+Description of the difference.
+
+\div{new} New functions have a green background. \enddiv
+\div{mod} Modifying or replacing functions have an amber background. \enddiv
+\div{del} Deprecated functions without replacement have a red background. \enddiv
+
+
+\if NEVER_ENABLE
+=======0=========1=========2=========3=========4=========5=========6=========7=========8=========9=========0=========1====
+ Kernel Information and Control
+\endif
+
+\section mig_kernel Kernel Information and Control
+
+\div{new}
+\func{osStatus_t #osKernelGetInfo (osVersion_t* version, char* id_buf, uint32_t id_size)}
+\none
+\copybrief{osKernelGetInfo}
+New function #osKernelGetInfo.
+\enddiv
+
+\div{mod}
+\func{osKernelState_t #osKernelGetState (void)}
+\func{int32_t osKernelRunning (void)}
+\copybrief{osKernelGetState}
+ - The function \b osKernelGetState replaces the RTOS v1 function \b osKernelRunning.
+ - Return type changed to \ref osKernelState_t.
+
+\enddiv
+
+\div{mod}
+\func{uint32_t #osKernelGetTick (void)}
+\func{uint32_t osKernelSysTick (void)}
+\copybrief{osKernelGetTick}
+ - The function \b osKernelGetTick replaces the RTOS v1 function \b osKernelSysTick.
+
+\enddiv
+
+\div{new}
+\func{uint64_t #osKernelGetTime (void)}
+\none
+\copybrief{osKernelGetTime}
+New function.
+\enddiv
+
+\div{mod}
+\func{osStatus_t #osKernelInitialize (void)}
+\func{osStatus osKernelInitialize (void)}
+\copybrief{osKernelInitialize}
+ - Return type changed to \ref osStatus_t.
+
+\enddiv
+
+\div{new}
+\func{uint32_t osKernelLock (void)}
+\none
+\copybrief{osKernelLock}
+New function.
+\enddiv
+
+\div{new}
+\func{void #osKernelResume (uint32_t sleep_time)}
+\none
+\copybrief{osKernelResume}
+New function.
+\enddiv
+
+\div{mod}
+\func{osStatus_t #osKernelStart (void)}
+\func{osStatus osKernelStart (void)}
+\copybrief{osKernelStart}
+ - Return type changed to \ref osStatus_t.
+
+\enddiv
+
+\div{new}
+\func{uint32_t osKernelSuspend (void)}
+\none
+\copybrief{osKernelSuspend}
+New function.
+\enddiv
+
+\div{mod}
+\func{uint32_t #osKernelTickMicroSec (uint32_t microsec)}
+\func{uint32_t osKernelTickMicroSec (osKernelSysTickFrequency)}
+\copybrief{osKernelTickMicroSec}
+ - The function \b osKernelTickMicroSec replaces the RTOS v1 macro \b osKernelTickMicroSec.
+
+\enddiv
+
+\div{new}
+\func{void #osKernelUnlock (void)}
+\none
+\copybrief{osKernelUnlock}
+New function.
+\enddiv
+
+
+\if NEVER_ENABLE
+=======0=========1=========2=========3=========4=========5=========6=========7=========8=========9=========0=========1====
+====== Thread Management =======
+\endif
+
+\section mig_threadMgmt Thread Management
+
+\div{new}
+\func{osStatus_t #osThreadAbortWait (osThreadId_t thread_id)}
+\none
+\copybrief{osThreadAbortWait}
+New function.
+\enddiv
+
+\div{new}
+\func{osStatus_t #osThreadDetach (osThreadId_t thread_id)}
+\none
+\copybrief{osThreadDetach}
+New function.
+\enddiv
+
+\div{new}
+\func{__NO_RETURN void #osThreadExit (void * exit_ptr)}
+\none
+\copybrief{osThreadExit}
+New function.
+\enddiv
+
+\div{mod}
+\func{osThreadId_t #osThreadGetId (void)}
+\func{osThreadId osThreadGetId (void)}
+\copybrief{osThreadGetId}
+ - Return type changed to #osThreadId_t.
+
+\enddiv
+
+\div{mod}
+\func{osPriority_t #osThreadGetPriority (osThreadId_t thread_id)}
+\func{osPriority osThreadGetPriority (osThreadId thread_id)}
+\copybrief{osThreadGetPriority}
+ - Return type changed to #osPriority_t.
+ - Parameter type changed to #osThreadId_t.
+
+\enddiv
+
+\div{new}
+\func{osThreadState_t #osThreadGetState (osThreadId_t thread_id)}
+\none
+\copybrief{osThreadGetState}
+New function.
+\enddiv
+
+\div{new}
+\func{osStatus_t #osThreadJoin (osThreadId_t thread_id, void **exit_ptr)}
+\none
+\copybrief{osThreadJoin}
+New function.
+\enddiv
+
+\div{mod}
+\func{osThreadId_t #osThreadNew (os_thread_func_t function, void *argument, const osThreadAttr_t *attr)}
+\func{osThreadId osThreadCreate (const osThreadDef_t *thread_def, void *argument)}
+\copybrief{osThreadNew}
+ - The function \b osThreadNew replaces the RTOS v1 function \b osThreadCreate.
+ - Options are now passed using a \ref osThreadAttr_t struct, replacing the \b osThreadDef macro.
+ - New function prototype is <kbd>void *func (void *arg)</kbd>, before: <kbd>void func (const void *arg)</kbd>.
+
+\enddiv
+
+\div{new}
+\func{osStatus_t #osThreadResume (osThreadId_t thread_id)}
+\none
+\copybrief{osThreadResume}
+New function.
+\enddiv
+
+\div{mod}
+\func{osStatus_t #osThreadSetPriority (osThreadId_t thread_id, osPriority_t priority)}
+\func{osStatus osThreadSetPriority (osThreadId thread_id, osPriority priority)}
+\copybrief{osThreadSetPriority}
+ - Return type changed to #osStatus_t.
+ - Parameter types changed to #osThreadId_t and #osPriority_t.
+
+\enddiv
+
+\div{new}
+\func{osStatus_t #osThreadSuspend (osThreadId_t thread_id)}
+\none
+\copybrief{osThreadSuspend}
+New function.
+\enddiv
+
+\div{new}
+\func{osStatus_t #osThreadTerminate (osThreadId_t thread_id)}
+\none
+\copybrief{osThreadTerminate}
+New function.
+\enddiv
+
+\div{mod}
+\func{osStatus_t #osThreadYield (void)}
+\func{osStatus osThreadYield (void)}
+\copybrief{osThreadYield}
+ - Return type changed to #osStatus_t.
+
+\enddiv
+
+
+\if NEVER_ENABLE
+=======0=========1=========2=========3=========4=========5=========6=========7=========8=========9=========0=========1====
+====== Generic Wait Functions =======
+\endif
+
+\section mig_wait Generic Wait Functions
+\details
+Refer to \ref CMSIS_RTOS_Wait for details.
+
+\div{mod}
+\func{osStatus_t #osDelay (uint32_t millisec)}
+\func{osStatus osDelay (uint32_t millisec)}
+\copybrief{osDelay}
+ - The return type changed to #osStatus_t.
+
+\enddiv
+
+\div{mod}
+\func{osStatus_t #osDelayUntil (uint64_t millisec)}
+\func{osStatus osDelayUntil (uint64_t millisec)}
+\copybrief{osDelayUntil}
+ - The return type changed to #osStatus_t.
+
+\enddiv
+
+
+\if NEVER_ENABLE
+=======0=========1=========2=========3=========4=========5=========6=========7=========8=========9=========0=========1====
+====== Timer Management =======
+\endif
+
+\section mig_timer Timer Management
+\details
+Refer to \ref CMSIS_RTOS_TimerMgmt for details.
+
+\div{mod}
+\func{osStatus_t #osTimerDelete (osTimerId_t timer_id)}
+\func{osStatus osTimerDelete (osTimerId timer_id)}
+\copybrief{osTimerDelete}
+ - The return type changed to #osStatus_t.
+ - The parameter type has changed to #osTimerId_t.
+
+\enddiv
+
+\div{new}
+\func{uint32_t #osTimerIsRunning (osTimerId_t timer_id)}
+\none
+\copybrief{osTimerIsRunning}
+New function.
+\enddiv
+
+\div{mod}
+\func{osTimerId_t #osTimerNew (os_timer_func_t func, osTimerType_t type, void *argument, const osTimerAttr_t *attr)}
+\func{osTimerId osTimerCreate (const osTimerDef_t *timer_def, os_timer_type type, void *argument)}
+\copybrief{osTimerNew}
+ - The function \b osTimerNew replaces the RTOS v1 function \b osTimerCreate.
+ - The return type changed to #osTimerId_t.
+ - The parameter list and types have changed.
+
+\enddiv
+
+\div{mod}
+\func{osStatus_t #osTimerStart (osTimerId_t timer_id, uint32_t millisec)}
+\func{osStatus osTimerStart (osTimerId timer_id, uint32_t millisec)}
+\copybrief{osTimerStart}
+ - The return type changed to #osStatus_t.
+ - The first parameter type has changed to #osTimerId_t.
+
+\enddiv
+
+\div{mod}
+\func{osStatus_t #osTimerStop (osTimerId_t timer_id)}
+\func{osStatus osTimerStop (osTimerId timer_id)}
+\copybrief{osTimerStop}
+ - The return type changed to #osStatus_t.
+ - The parameter type has changed to #osTimerId_t.
+
+\enddiv
+
+
+\if NEVER_ENABLE
+=======0=========1=========2=========3=========4=========5=========6=========7=========8=========9=========0=========1====
+====== Signal Events =======
+\endif
+
+\section mig_signalEvents Signal Events
+\details
+The section RTOS v1 <b>Signal Events</b> has been deprecated.
+Use the functions listed under \ref mig_threadFlags and \ref mig_eventFlags instead.
+
+\div{del}
+\none
+\func{int32_t osSignalClear (osThreadId thread_id, int32_t signals)}
+\n
+Deprecated.
+\enddiv
+
+\div{del}
+\none
+\func{int32_t osSignalSet (osThreadId thread_id, int32_t signals)}
+\n
+Deprecated.
+\enddiv
+
+\div{del}
+\none
+\func{osEvent osSignalWait (int32_t signals, uint32_t millisec)}
+\n
+Deprecated.
+\enddiv
+
+
+
+\if NEVER_ENABLE
+=======0=========1=========2=========3=========4=========5=========6=========7=========8=========9=========0=========1====
+====== Event Flags =======
+\endif
+
+\section mig_eventFlags Event Flags
+\details
+New section to synchronize events using flags. Event flags and thread flags are replacing the RTOS v1 <b>Signal Events</b>.
+All functions listed in the RTOS v1 <b>Signal Events</b> have been deprecated.
+Refer to \ref mig_signalEvents for a list of deprecated functions.
+Refer to \ref CMSIS_RTOS_EventFlags for details about the new function.
+
+\div{new}
+\func{int32_t #osEventFlagsClear (osEventFlagsId_t ef_id, int32_t flags)}
+\none
+\copybrief{osEventFlagsClear}
+New function.
+\enddiv
+
+\div{new}
+\func{osStatus_t #osEventFlagsDelete (osEventFlagsId_t ef_id)}
+\none
+\copybrief{osEventFlagsDelete}
+New function.
+\enddiv
+
+\div{new}
+\func{int32_t #osEventFlagsGet (osEventFlagsId_t ef_id)}
+\none
+\copybrief{osEventFlagsGet}
+New function.
+\enddiv
+
+\div{new}
+\func{osEventFlagsId_t #osEventFlagsNew (const osEventFlagsAttr_t *attr)}
+\none
+\copybrief{osEventFlagsNew}
+New function.
+\enddiv
+
+\div{new}
+\func{int32_t #osEventFlagsSet (osEventFlagsId_t ef_id, int32_t flags)}
+\none
+\copybrief{osEventFlagsSet}
+New function.
+\enddiv
+
+\div{new}
+\func{int32_t #osEventFlagsWait (osEventFlagsId_t ef_id, int32_t flags, uint32_t options, uint32_t millisec)}
+\none
+\copybrief{osEventFlagsWait}
+New function.
+\enddiv
+
+
+\if NEVER_ENABLE
+=======0=========1=========2=========3=========4=========5=========6=========7=========8=========9=========0=========1====
+====== Thread Flags =======
+\endif
+
+\section mig_threadFlags Thread Flags
+\details
+New section to synchronize threads using flags. Thread flags and the more flexible \ref mig_eventFlags are replacing the RTOS v1 <b>Signal Events</b>. Refer to \ref mig_signalEvents for a list of deprecated functions.
+Refer to \ref CMSIS_RTOS_ThreadFlagsMgmt for details.
+
+\div{new}
+\func{int32_t #osThreadFlagsSet (osThreadId_t thread_id, int32_t flags)}
+\none
+\copybrief{osThreadFlagsSet}
+New function.
+\enddiv
+
+\div{new}
+\func{int32_t #osThreadFlagsWait (int32_t flags, uint32_t options, uint32_t millisec)}
+\none
+\copybrief{osThreadFlagsWait}
+New function.
+\enddiv
+
+
+\if NEVER_ENABLE
+=======0=========1=========2=========3=========4=========5=========6=========7=========8=========9=========0=========1====
+====== Message Queue =======
+\endif
+
+\section mig_msgQueue Message Queue
+Refer to \ref CMSIS_RTOS_Message for details.
+
+\div{new}
+\func{osStatus_t #osMessageQueueDelete (osMessageQueueId_t mq_id)}
+\none
+\copybrief{osMessageQueueDelete}
+New function.
+\enddiv
+
+\div{mod}
+\func{osStatus_t #osMessageQueueGet (osMessageQueueId_t mq_id, void *msg_ptr, uint8_t *msg_prio, uint32_t millisec)}
+\func{osEvent osMessageGet (osMessageQId queue_id, uint32_t millisec)}
+\copybrief{osMessageQueueGet}
+ - The function \b osMessageQueueGet replaces the RTOS v1 function \b osMessageGet.
+ - The return type changed to #osStatus_t.
+ - The parameter list and parameter types have changed.
+
+\enddiv
+
+\div{new}
+\func{uint32_t #osMessageQueueGetCapacity (osMessageQueueId_t mq_id)}
+\none
+\copybrief{osMessageQueueGetCapacity}
+New function.
+\enddiv
+
+\div{new}
+\func{uint32_t #osMessageQueueGetCount (osMessageQueueId_t mq_id)}
+\none
+\copybrief{osMessageQueueGetCount}
+New function.
+\enddiv
+
+\div{new}
+\func{uint32_t #osMessageQueueGetMsgSize (osMessageQueueId_t mq_id)}
+\none
+\copybrief{osMessageQueueGetMsgSize}
+New function.
+\enddiv
+
+\div{new}
+\func{uint32_t #osMessageQueueGetSpace (osMessageQueueId_t mq_id)}
+\none
+\copybrief{osMessageQueueGetSpace}
+New function.
+\enddiv
+
+\div{mod}
+\func{osMessageQueueId_t #osMessageQueueNew (uint32_t msg_count, uint32_t msg_size, const osMessageQueueAttr_t *attr)}
+\func{osMessageQId osMessageCreate (const osMessageQDef_t *queue_def, osThreadId thread_id)}
+\copybrief{osMessageQueueNew}
+ - The function \b osMessageQueueNew replaces the RTOS v1 function \b osMessageCreate.
+ - The return type changed to #osMessageQueueId_t.
+ - The parameter list and parameter types have changed.
+
+\enddiv
+
+\div{mod}
+\func{osStatus_t #osMessageQueuePut (osMessageQueueId_t mq_id, const void *msg_ptr, uint8_t msg_prio, uint32_t millisec)}
+\func{osStatus osMessagePut (osMessageQId queue_id, uint32_t info, uint32_t millisec)}
+\copybrief{osMessageQueuePut}
+ - The function \b osMessageQueuePut replaces the RTOS v1 function \b osMessagePut.
+ - The return type changed to #osStatus_t.
+ - The parameter list and parameter types have changed.
+
+\enddiv
+
+\div{new}
+\func{osStatus_t #osMessageQueueReset (osMessageQueueId_t mq_id)}
+\none
+\copybrief{osMessageQueueReset}
+New function.
+\enddiv
+
+
+\if NEVER_ENABLE
+=======0=========1=========2=========3=========4=========5=========6=========7=========8=========9=========0=========1====
+====== Memory Pool =======
+\endif
+
+\section mig_memPool Memory Pool
+
+\div{mod}
+\func{void * #osMemoryPoolAlloc (osMemoryPoolId_t mp_id, uint32_t millisec)}
+\func{void * osPoolAlloc (osPoolId pool_id)}
+\func{void * osPoolCAlloc (osPoolId pool_id)}
+\copybrief{osMemoryPoolAlloc}
+ - The function \b osMemoryPoolAlloc replaces both RTOS v1 functions \b osPoolAlloc and \b osPoolCAlloc.
+ - The parameter list and types changed.
+
+\enddiv
+
+\div{new}
+\func{osStatus_t #osMemoryPoolDelete (osMemoryPoolId_t mp_id)}
+\none
+\copybrief{osMemoryPoolDelete}
+New function.
+\enddiv
+
+\div{mod}
+\func{osStatus_t #osMemoryPoolFree (osMemoryPoolId_t mp_id, void * block)}
+\func{osStatus osPoolFree (osPoolId pool_id, void * block)}
+\copybrief{osMemoryPoolFree}
+ - The function \b osMemoryPoolFree replaces the RTOS v1 function \b osPoolFree.
+ - The first parameter type \b osMemoryPoolId_t replaces the ROTS v1 type \b osPoolId.
+
+\enddiv
+
+\div{new}
+\func{uint32_t #osMemoryPoolGetBlockSize (osMemoryPoolId_t mp_id)}
+\none
+\copybrief{osMemoryPoolGetBlockSize}
+New function.
+\enddiv
+
+\div{new}
+\func{uint32_t #osMemoryPoolGetCapacity (osMemoryPoolId_t mp_id)}
+\none
+\copybrief{osMemoryPoolGetCapacity}
+New function.
+\enddiv
+
+\div{new}
+\func{uint32_t #osMemoryPoolGetCount (osMemoryPoolId_t mp_id)}
+\none
+\copybrief{osMemoryPoolGetCount}
+New function.
+\enddiv
+
+\div{new}
+\func{uint32_t #osMemoryPoolGetSpace (osMemoryPoolId_t mp_id)}
+\none
+\copybrief{osMemoryPoolGetSpace}
+New function.
+\enddiv
+
+\div{mod}
+\func{osMemoryPoolId_t #osMemoryPoolNew (uint32_t block_count, uint32_t block_size, const osMemoryPoolAttr_t *attr)}
+\func{osPoolId osPoolCreate (const osPoolDef_t * pool_def)}
+\copybrief{osMemoryPoolGetSpace}
+ - The function \b osMemoryPoolNew replaces the RTOS v1 function \b osPoolCreate.
+ - The return type changed to #osMemoryPoolId_t.
+ - Parameter list and parameter types have changed.
+
+\enddiv
+
+
+\if NEVER_ENABLE
+=======0=========1=========2=========3=========4=========5=========6=========7=========8=========9=========0=========1====
+====== Mail Queue =======
+\endif
+
+\section mig_mailQueue Mail Queue
+The <b>Mail Queue</b> RTOS v1 functions have been deprecated.
+Use the functionality of the \ref CMSIS_RTOS_Message instead.
+Differences are listed under \ref mig_msgQueue.
+
+\div{del}
+\none
+\func{void * osMailAlloc (osMailQId queue_id, uint32_t millisec)}
+\n
+Deprecated.
+\enddiv
+
+\div{del}
+\none
+\func{void * osMailCAlloc (osMailQId queue_id, uint32_t millisec)}
+\n
+Deprecated.
+\enddiv
+
+\div{del}
+\none
+\func{osMailQId osMailCreate (const osMailQDef_t *queue_def, osThreadId thread_id)}
+\n
+Deprecated.
+\enddiv
+
+\div{del}
+\none
+\func{osStatus osMailFree (osMailQId queue_id, void *mail)}
+\n
+Deprecated.
+\enddiv
+
+\div{del}
+\none
+\func{osEvent osMailGet (osMailQId queue_id, uint32_t millisec)}
+\n
+Deprecated.
+\enddiv
+
+\div{del}
+\none
+\func{osStatus osMailPut (osMailQId queue_id, void *mail)}
+\n
+Deprecated.
+\enddiv
+
+
+\if NEVER_ENABLE
+=======0=========1=========2=========3=========4=========5=========6=========7=========8=========9=========0=========1====
+====== Mutexes =======
+\endif
+
+\section mig_mutex Mutexes
+Refer to \ref CMSIS_RTOS_MutexMgmt for details.
+
+\div{mod}
+\func{osStatus_t #osMutexAcquire (osMutexId_t mutex_id, uint32_t millisec)}
+\func{osStatus osMutexWait (osMutexId mutex_id, uint32_t millisec)}
+\copybrief{osMutexAcquire}
+ - The function \b osMutexAcquire replaces the RTOS v1 function \b osMutexWait.
+ - Return type changed to \ref osStatus_t.
+ - First parameter type changed to \ref osMutexId_t.
+
+\enddiv
+
+\div{mod}
+\func{osStatus_t #osMutexDelete (osMutexId_t mutex_id)}
+\func{osStatus osMutexDelete (osMutexId mutex_id)}
+\copybrief{osMutexDelete}
+ - The return type changed to \ref osStatus_t.
+ - The parameter type changed to \ref osMutexId_t.
+
+\enddiv
+
+\div{new}
+\func{osThreadId_t #osMutexGetOwner (osMutexId_t mutex_id)}
+\none
+\copybrief{osMutexGetOwner}
+New function.
+\enddiv
+
+\div{mod}
+\func{osMutexId_t #osMutexNew (const osMutexAttr_t *attr)}
+\func{osMutexId osMutexCreate (const osMutexDef_t *mutex_def)}
+\copybrief{osMutexNew}
+ - The function \b osMutexNew replaces the RTOS v1 function \b osMutexCreate.
+ - The return type changed to \ref osMutexId_t.
+ - The parameter type changed to \ref osMutexAttr_t.
+
+\enddiv
+
+\div{mod}
+\func{osStatus_t #osMutexRelease (osMutexId_t mutex_id)}
+\func{osStatus osMutexRelease (osMutexId mutex_id)}
+\copybrief{osMutexRelease}
+ - The return type changed to \ref osStatus_t.
+ - The parameter type changed to \ref osMutexId_t.
+
+\enddiv
+
+
+\if NEVER_ENABLE
+=======0=========1=========2=========3=========4=========5=========6=========7=========8=========9=========0=========1====
+====== SEMAPHORES =======
+\endif
+
+\section mig_sem Semaphores
+Refer to \ref CMSIS_RTOS_SemaphoreMgmt for details.
+
+\div{new}
+\func{osStatus_t #osSemaphoreAcquire (osSemaphoreId_t semaphore_id, uint32_t millisec)}
+\none
+\copybrief{osSemaphoreAcquire}
+New function.
+\enddiv
+
+\div{mod}
+\func{osStatus_t #osSemaphoreDelete (osSemaphoreId_t semaphore_id)}
+\func{osStatus osSemaphoreDelete (osSemaphoreId semaphore_id)}
+\copybrief{osSemaphoreDelete}
+ - The return type changed to #osStatus_t.
+ - The parameter type has changed to #osSemaphoreId_t.
+
+\enddiv
+
+\div{new}
+\func{uint32_t #osSemaphoreGetCount (osSemaphoreId_t semaphore_id)}
+\none
+\copybrief{osSemaphoreGetCount}
+New function.
+\enddiv
+
+\div{mod}
+\func{osSemaphoreId_t #osSemaphoreNew (uint32_t max_count, uint32_t initial_count, const osSemaphoreAttr_t *attr)}
+\func{osSemaphoreId osSemaphoreCreate (const osSemaphoreDef_t *semaphore_def, int32_t count)}
+\copybrief{osSemaphoreNew}
+ - The function \b osSemaphoreNew replaces the RTOS v1 function \b osSemaphoreCreate.
+ - The return type changed to #osSemaphoreId_t.
+ - The parameter list and types have changed.
+
+\enddiv
+
+\div{mod}
+\func{osStatus_t #osSemaphoreRelease (osSemaphoreId_t semaphore_id)}
+\func{osStatus osSemaphoreRelease (osSemaphoreId semaphore_id)}
+\copybrief{osSemaphoreRelease}
+ - The return type changed to #osStatus_t.
+ - The parameter type has changed to #osSemaphoreId_t.
+
+\enddiv
+
+\div{del}
+\none
+\func{int32_t osSemaphoreWait (osSemaphoreId semaphore_id, uint32_t millisec)}
+\n
+Deprecated.
+\enddiv
+*/
\ No newline at end of file
diff --git a/CMSIS/DoxyGen/RTOS2/src/cmsis_os2_Mutex.txt b/CMSIS/DoxyGen/RTOS2/src/cmsis_os2_Mutex.txt
new file mode 100644
index 0000000..f2fc325
--- /dev/null
+++ b/CMSIS/DoxyGen/RTOS2/src/cmsis_os2_Mutex.txt
@@ -0,0 +1,257 @@
+//
+// close group struct osMutexAttr_t
+/*=======0=========1=========2=========3=========4=========5=========6=========7=========8=========9=========0=========1====*/
+// ==== Mutex Management ====
+/**
+\addtogroup CMSIS_RTOS_MutexMgmt Mutexes
+\ingroup CMSIS_RTOS
+\brief Synchronize resource access using Mutual Exclusion (Mutex).
+\details
+<b>Mutual exclusion</b> (widely known as \b Mutex) is used in various operating systems for resource management. Many
+resources in a microcontroller device can be used repeatedly, but only by one thread at a time (for example communication
+channels, memory, and files). Mutexes are used to protect access to a shared resource. A mutex is created and then passed
+between the threads (they can acquire and release the mutex).
+
+\image html "Mutex.png" "CMSIS-RTOS Mutex"
+
+A mutex is a special version of a \ref CMSIS_RTOS_SemaphoreMgmt "semaphore". Like the semaphore, it is a container for
+tokens. But instead of being able to have multiple tokens, a mutex can only carry one (representing the resource). Thus, a
+mutex token is binary and bounded. The advantage of a mutex is that it introduces thread ownership. When a thread acquires a
+mutex and becomes its owner, subsequent mutex acquires from that thread will succeed immediately without any latency. Thus,
+mutex acquires/releases can be nested.
+
+\note
+- Mutex management functions cannot be called from interrupt service routines (ISR), unlike a binary semaphore that can be
+ released from an ISR.
+
+Working with Mutexes
+--------------------
+To use mutexes, you need to follow these steps for creating and using them:
+-# Declare the mutex container and initialize the mutex:
+\code
+osMutexId (uart_mutex_id); // Mutex ID
+\endcode
+-# Create the mutex in a thread:
+\code
+uart_mutex_id = osMutexNew(NULL);
+\endcode
+-# Acquire the mutex when peripheral access is required:
+\code
+osMutexAcquire(uart_mutex_id, osWaitForever);
+\endcode
+-# When finished with the peripheral access, release the mutex:
+\code
+osMutexRelease(uart_mutex_id);
+\endcode
+
+@{
+*/
+/*=======0=========1=========2=========3=========4=========5=========6=========7=========8=========9=========0=========1====*/
+/**
+\def osMutexRecursive
+\details
+ - \ref osMutexAttr_t
+*/
+/*=======0=========1=========2=========3=========4=========5=========6=========7=========8=========9=========0=========1====*/
+/**
+\def osMutexPrioInherit
+\details
+ - \ref osMutexAttr_t
+*/
+/*=======0=========1=========2=========3=========4=========5=========6=========7=========8=========9=========0=========1====*/
+/**
+\def osMutexRobust
+\details
+ - \ref osMutexAttr_t
+*/
+/*=======0=========1=========2=========3=========4=========5=========6=========7=========8=========9=========0=========1====*/
+/**
+\typedef osMutexId_t
+\details
+
+*/
+/*=======0=========1=========2=========3=========4=========5=========6=========7=========8=========9=========0=========1====*/
+/**
+\struct osMutexAttr_t
+\details
+
+
+*/
+
+/*=======0=========1=========2=========3=========4=========5=========6=========7=========8=========9=========0=========1====*/
+/**
+\fn osMutexId_t osMutexNew (const osMutexAttr_t *attr)
+\details
+Create and initialize a Mutex object.
+
+\note Cannot be called from \ref CMSIS_RTOS_ISR_Calls "Interrupt Service Routines".
+
+<b>Code Example</b>
+\code{.c}
+#include "cmsis_os2.h"
+
+osMutexId_t mutex_id;
+
+void CreateMutex (void) {
+
+ mutex_id = osMutexNew(NULL);
+ if (mutex_id != NULL) {
+ // Mutex object created
+ }
+}
+\endcode
+*/
+/*=======0=========1=========2=========3=========4=========5=========6=========7=========8=========9=========0=========1====*/
+/**
+\fn osStatus_t osMutexAcquire (osMutexId_t mutex_id, uint32_t millisec)
+\details
+Wait until a Mutex becomes available. If no other thread has obtained the Mutex, the function instantly returns and blocks the mutex object.
+
+The argument \a millisec specifies how long the system waits for a mutex.
+While the system waits the thread that is calling this function is put into the state \b WAITING.
+The \a millisec timeout can have the following values:
+ - when \a millisec is 0, the function returns instantly.
+ - when \a millisec is set to \b osWaitForever the function will wait for an infinite time until the mutex becomes available.
+ - all other values specify a time in millisecond for a timeout.
+
+<b>\ref CMSIS_RTOS_Status</b>\n
+ - \em osOK: the mutex has been obtained.
+ - \em osErrorTimeoutResource: the mutex could not be obtained in the given time.
+ - \em osErrorResource: the mutex could not be obtained when no timeout was specified.
+ - \em osErrorParameter: the parameter \a mutex_id is incorrect.
+ - \em osErrorISR: cannot be called from interrupt service routines.
+
+\note Cannot be called from \ref CMSIS_RTOS_ISR_Calls "Interrupt Service Routines".
+
+<b>Code Example</b>
+\code{.c}
+#include "cmsis_os2.h"
+
+void WaitMutex (void) {
+osMutexId_t mutex_id;
+osStatus_t status;
+
+ mutex_id = osMutexNew(NULL);
+ if (mutex_id != NULL) {
+ status = osMutexAcquire(mutex_id, 0);
+ if (status != osOK) {
+ // handle failure code
+ }
+ }
+}
+\endcode
+*/
+/*=======0=========1=========2=========3=========4=========5=========6=========7=========8=========9=========0=========1====*/
+/**
+\fn osStatus_t osMutexRelease (osMutexId_t mutex_id)
+\details
+Release a Mutex that was obtained with \ref osMutexAcquire. Other threads that currently wait for the same mutex will be now put into the state \b READY.
+
+<b>\ref CMSIS_RTOS_Status</b>\n
+ - \em osOK: the mutex has been correctly released.
+ - \em osErrorResource: the mutex was not obtained before.
+ - \em osErrorParameter: the parameter \a mutex_id is incorrect.
+ - \em osErrorISR: \ref osMutexRelease cannot be called from interrupt service routines.
+
+\note Cannot be called from \ref CMSIS_RTOS_ISR_Calls "Interrupt Service Routines".
+
+<b>Code Example</b>
+\code{.c}
+#include "cmsis_os2.h"
+
+osMutexId_t mutex_id; // Mutex id populated by the function CreateMutex()
+
+void ReleaseMutex (osMutexId_t mutex_id) {
+osStatus_t status;
+
+ if (mutex_id != NULL) {
+ status = osMutexRelease(mutex_id);
+ if (status != osOK) {
+ // handle failure code
+ }
+ }
+}
+\endcode
+*/
+/*=======0=========1=========2=========3=========4=========5=========6=========7=========8=========9=========0=========1====*/
+/**
+\fn osThreadId_t osMutexGetOwner (osMutexId_t mutex_id)
+\details
+Returns the \ref osThreadId_t of the thread that acquired a mutex.
+*/
+/*=======0=========1=========2=========3=========4=========5=========6=========7=========8=========9=========0=========1====*/
+/**
+\fn osStatus_t osMutexDelete (osMutexId_t mutex_id)
+\details
+Delete a Mutex object. The function releases internal memory obtained for Mutex handling. After this call the \a mutex_id is no longer valid and cannot be
+used. The Mutex may be created again using the function \ref osMutexNew.
+
+<b>\ref CMSIS_RTOS_Status</b>
+ - \em osOK: the mutex object has been deleted.
+ - \em osErrorISR: \ref osMutexDelete cannot be called from interrupt service routines.
+ - \em osErrorResource: all tokens have already been released.
+ - \em osErrorParameter: the parameter \a mutex_id is incorrect.
+
+\note Cannot be called from \ref CMSIS_RTOS_ISR_Calls "Interrupt Service Routines".
+
+<b>Code Example</b>
+\code{.c}
+#include "cmsis_os2.h"
+
+osMutexId_t mutex_id; // Mutex id populated by the function CreateMutex()
+
+void DeleteMutex (osMutexId_t mutex_id) {
+osStatus_t status;
+
+ if (mutex_id != NULL) {
+ status = osMutexDelete(mutex_id);
+ if (status != osOK) {
+ // handle failure code
+ }
+ }
+}
+\endcode
+*/
+/// @}
+
+// these struct members must stay outside the group to avoid double entries in documentation
+/**
+\var osMutexAttr_t::attr_bits
+\details
+The following predefined bit masks can be assigned to set options for a mutex object.
+
+Bit Mask | Description
+:---------------------------|:------------------
+\token{osMutexRecursive} | Mutex is recursive. The same thread can consume a mutex multiple times without locking itself.
+\token{osMutexPrioInherit} | Priority inheritance protocol. While a thread owns this mutex it cannot be preempted by a higher priority thread to avoid starvation.
+\token{osMutexRobust} | Robust mutex. Notify threads that acquire a mutex if the previous owner was terminated.
+
+*/
+/**
+\var osMutexAttr_t::cb_mem
+\details
+Pointer to a memory location for the mutex object. This can optionally be used for custom memory management systems.
+Specify NULL to use the kernel memory management.
+*/
+/**
+\var osMutexAttr_t::cb_size
+\details
+The size of the memory block passed with \ref cb_mem. Must be the size of a mutex object or larger.
+*/
+/**
+\var osMutexAttr_t::name
+\details
+String with a human readable name of the mutex object.
+
+\code
+osMutexId_t mid_Thread_Mutex; // mutex id
+
+const osMutexAttr_t Thread_Mutex_attr = {
+ "myThreadMutex",
+ osMutexRecursive | osMutexPrioInherit, // attr_bits
+ NULL, // memory for control block
+ NULL // size for control block
+ };
+mid_Mutex = osMutexNew (&Thread_Mutex_attr);
+\endcode
+*/
\ No newline at end of file
diff --git a/CMSIS/DoxyGen/RTOS2/src/cmsis_os2_Sema.txt b/CMSIS/DoxyGen/RTOS2/src/cmsis_os2_Sema.txt
new file mode 100644
index 0000000..ce969fa
--- /dev/null
+++ b/CMSIS/DoxyGen/RTOS2/src/cmsis_os2_Sema.txt
@@ -0,0 +1,202 @@
+
+
+/*=======0=========1=========2=========3=========4=========5=========6=========7=========8=========9=========0=========1====*/
+// ==== Semaphore Management ====
+/**
+\addtogroup CMSIS_RTOS_SemaphoreMgmt Semaphores
+\ingroup CMSIS_RTOS
+\brief Access shared resources simultaneously from different threads.
+\details
+Semaphores are used to manage and protect access to shared resources. Semaphores are very similar to
+\ref CMSIS_RTOS_MutexMgmt "Mutexes". Whereas a Mutex permits just one thread to access a shared resource at a
+time, a semaphore can be used to permit a fixed number of threads to access a pool of shared resources. Using semaphores,
+access to a group of identical peripherals can be managed (for example multiple DMA channels).
+
+\image html "Semaphore.png" "CMSIS-RTOS Semaphore"
+
+A semaphore object should be initialized to the maximum number of available tokens. This number of available resources is
+specified as parameter of the \ref osSemaphoreNew function. Each time a semaphore token is obtained with
+\ref osSemaphoreAcquire, the semaphore count is decremented. When the semaphore count is 0, no semaphore token can be
+obtained. The thread that tries to obtain the semaphore token needs to wait until the next token is free. Semaphores are
+released with \ref osSemaphoreRelease incrementing the semaphore count.
+
+\note Semaphore tokens can be acquired from threads and released from threads and ISRs.
+
+Working with Semaphores
+--------------------
+Follow these steps to create and use a semaphore:
+-# Declare the semaphore container and initialize the semaphore:
+\code
+osSemaphoreDef (my_semaphore); // Declare semaphore
+osSemaphoreId (my_semaphore_id); // Semaphore ID
+\endcode
+-# Initialize the semaphore container with a number of tokens within a thread:
+\code
+my_semaphore_id = osSemaphoreCreate(osSemaphore(my_semaphore), 4); // Create semaphore with 4 tokens
+\endcode
+\b Important: semaphore tokens can be created and destroyed as threads run. This means that can initialize a semaphore with
+zero tokens and then use one thread to add/create tokens to the semaphore while a second thread removes them. In this way you
+can distinguish between producer and consumer threads.
+-# Acquire a token from the semaphore container:
+\code
+osSemaphoreAcquire(my_semaphore_id, osWaitForever);
+\endcode
+-# When finished using the semaphore resource, send the token back to the semaphore container:
+\code
+osSemaphoreRelease(my_semaphore_id);
+\endcode
+
+Semaphore Use Cases
+-------------------
+Due to their flexibility, semaphores cover a wide range of synchronizing applications. At the same time, they are perhaps the
+most challenging RTOS object to understand. The following explains a use case for semaphores, taken from the book
+<a href="http://www.greenteapress.com/semaphores/" target="_blank">The Little Book Of Semaphores</a> by Allen B. Downey which
+is available for free download.
+
+<b>Non-binary Semaphore (Multiplex)</b>
+
+A multiplex limits the number of threads that can access a critical section of code. For example, this could be a function
+accessing DMA resources which can only support a limited number of calls.
+
+To allow multiple threads to run the function, initialize a semaphore to the maximum number of threads that can be allowed.
+The number of tokens in the semaphore represents the number of additional threads that may enter. If this number is zero,
+then the next thread trying to access the function will have to wait until one of the other threads exits and releases its
+token. When all threads have exited the token number is back to n. Ths following example shows the code for one of the
+threads that might access the resource:
+
+\code
+osSemaphoreId_t multiplex_id;
+
+void thread_n (void)
+ {
+ multiplex_id = osSemaphoreNew(3, 0, NULL);
+ while(1)
+ {
+ osSemaphoreAcquire(multiplex_id, osWaitForever);
+ // do something
+ osSemaphoreRelease(multiplex_id);
+ }
+ }
+\endcode
+
+@{
+*/
+/*=======0=========1=========2=========3=========4=========5=========6=========7=========8=========9=========0=========1====*/
+/**
+\typedef osSemaphoreId_t
+\details
+
+*/
+/**
+\struct osSemaphoreAttr_t
+\details
+
+*/
+/*=======0=========1=========2=========3=========4=========5=========6=========7=========8=========9=========0=========1====*/
+/**
+\fn osSemaphoreId_t osSemaphoreNew (uint32_t max_count, uint32_t initial_count, const osSemaphoreAttr_t *attr)
+\details
+Create and initialize a Semaphore object that is used to manage access to shared resources. The parameter \em count specifies the number of available resources.
+The \em max_count value 1 creates a binary semaphore.
+
+<b>Code Example</b>
+\code{.c}
+#include "cmsis_os2.h"
+
+osThreadId_t tid_thread1; // ID for thread 1
+osThreadId_t tid_thread2; // ID for thread 2
+
+osSemaphoreId_t semaphore; // Semaphore ID
+
+//
+// Thread 1 - High Priority - Active every 3ms
+//
+void *thread1 (void *argument) {
+ int32_t value;
+
+ while (1) {
+ osDelay(3); // Pass control to other tasks for 3ms
+ val = osSemaphoreAcquire (semaphore, 1); // Wait 1ms for the free semaphore
+ if (val > 0) {
+ // If there was no time-out the semaphore was acquired
+ : // OK, the interface is free now, use it.
+ osSemaphoreRelease (semaphore); // Return a token back to a semaphore
+ }
+ }
+}
+
+//
+// Thread 2 - Normal Priority - looks for a free semaphore and uses
+// the resource whenever it is available
+//
+void *thread2 (void *argument) {
+ while (1) {
+ osSemaphoreAcquire (semaphore, osWaitForever); // Wait indefinitely for a free semaphore
+ // OK, the interface is free now, use it.
+ :
+ osSemaphoreRelease (semaphore); // Return a token back to a semaphore.
+ }
+}
+
+
+void StartApplication (void) {
+ semaphore = osSemaphoreNew(osSemaphore(semaphore), 1);
+
+ tid_thread1 = osThreadCreate(thread1, NULL, NULL);
+ tid_thread2 = osThreadCreate(thread2, NULL, NULL);
+ :
+}
+\endcode
+
+
+*/
+/*=======0=========1=========2=========3=========4=========5=========6=========7=========8=========9=========0=========1====*/
+/**
+\fn osStatus_t osSemaphoreAcquire (osSemaphoreId_t semaphore_id, uint32_t millisec)
+\details
+Wait until a Semaphore token becomes available and acquires it for the thread if available.
+When no Semaphore token is available, the function waits for the time specified with the parameter \em millisec.
+
+The argument \a millisec specifies how long the system waits for a Semaphore token to become available.
+While the system waits the thread that is calling this function is put into the state \b WAITING.
+The \a millisec timeout can have the following values:
+ - when \a millisec is 0, the function returns instantly.
+ - when \a millisec is set to \b osWaitForever the function will wait for an infinite time until the Semaphore token becomes available.
+ - all other values specify a time in millisecond for a timeout.
+
+The return value indicates the number of available tokens (the semaphore count value). If 0 is returned, then no semaphore was available.
+
+\note Cannot be called from \ref CMSIS_RTOS_ISR_Calls "Interrupt Service Routines".
+*/
+/*=======0=========1=========2=========3=========4=========5=========6=========7=========8=========9=========0=========1====*/
+/**
+\fn osStatus_t osSemaphoreRelease (osSemaphoreId_t semaphore_id)
+\details
+Release a Semaphore token. This increments the count of available semaphore tokens.
+
+<b>\ref CMSIS_RTOS_Status</b>\n
+ - \em osOK: the semaphore has been released.
+ - \em osErrorResource: all tokens have already been released.
+ - \em osErrorParameter: the parameter \a semaphore_id is incorrect.
+*/
+/*=======0=========1=========2=========3=========4=========5=========6=========7=========8=========9=========0=========1====*/
+/**
+\fn uint32_t osSemaphoreGetCount (osSemaphoreId_t semaphore_id)
+\details
+Returns the count of availble semaphores of the semaphore object specified by /em semaphore_id.
+
+*/
+/*=======0=========1=========2=========3=========4=========5=========6=========7=========8=========9=========0=========1====*/
+/**
+\fn osStatus_t osSemaphoreDelete (osSemaphoreId_t semaphore_id)
+\details
+Delete a Semaphore object. The function releases internal memory obtained for Semaphore handling. After this call the \a semaphore_id is no longer valid and cannot be
+used. The Semaphore may be created again using the function \ref osSemaphoreNew.
+
+<b>\ref CMSIS_RTOS_Status</b>\n
+ - \em osOK: the semaphore object has been deleted.
+ - \em osErrorISR: \ref osSemaphoreDelete cannot be called from interrupt service routines.
+ - \em osErrorResource: the semaphore object could not be deleted.
+ - \em osErrorParameter: the parameter \a semaphore_id is incorrect.
+*/
+/// @}
\ No newline at end of file
diff --git a/CMSIS/DoxyGen/RTOS2/src/cmsis_os2_Status.txt b/CMSIS/DoxyGen/RTOS2/src/cmsis_os2_Status.txt
new file mode 100644
index 0000000..2285593
--- /dev/null
+++ b/CMSIS/DoxyGen/RTOS2/src/cmsis_os2_Status.txt
@@ -0,0 +1,19 @@
+/*=======0=========1=========2=========3=========4=========5=========6=========7=========8=========9=========0=========1====*/
+// ==== Status and Error Codes ====
+/**
+\addtogroup CMSIS_RTOS_Status Status and Error Codes
+\ingroup CMSIS_RTOS
+\brief Status and Error Codes returned by CMSIS-RTOS API functions.
+\details The Status and Error Codes section lists all the return values that the CMSIS-RTOS functions will return.
+@{
+*/
+/*=======0=========1=========2=========3=========4=========5=========6=========7=========8=========9=========0=========1====*/
+/**
+\typedef osStatus_t
+\details
+The \b osStatus_t enumeration defines the event status and error codes that are returned by the CMSIS-RTOS functions.
+*/
+/// @}
+
+
+
diff --git a/CMSIS/DoxyGen/RTOS2/src/cmsis_os2_Thread.txt b/CMSIS/DoxyGen/RTOS2/src/cmsis_os2_Thread.txt
new file mode 100644
index 0000000..8a4540e
--- /dev/null
+++ b/CMSIS/DoxyGen/RTOS2/src/cmsis_os2_Thread.txt
@@ -0,0 +1,434 @@
+/*=======0=========1=========2=========3=========4=========5=========6=========7=========8=========9=========0=========1====*/
+// ==== Thread Management ====
+/**
+\addtogroup CMSIS_RTOS_ThreadMgmt Thread Management
+\ingroup CMSIS_RTOS CMSIS_RTOSv2
+\brief Define, create, and control thread functions.
+\details
+The Thread Management function group allows defining, creating, and controlling thread functions in the system. The function
+\b main is a special thread function that is started at system initialization and has the initial priority
+\a osPriorityNormal.
+
+\anchor ThreadStates
+Threads can be in the following states:
+ - \b RUNNING: The thread that is currently running is in the \b RUNNING state. Only one thread at a time can be in this
+ state.
+ - \b READY: Threads which are ready to run are in the \b READY state. Once the \b RUNNING thread has terminated or is
+ \b WAITING, the next \b READY thread with the highest priority becomes the \b RUNNING thread.
+ - \b WAITING: Threads that are waiting for an event to occur are in the \b WAITING state.
+ - \b INACTIVE: Threads that are not created or terminated are in the \b INACTIVE state. These threads typically consume no
+ system resources.
+
+\image html "ThreadStatus.png" "Thread State and State Transitions"
+
+A CMSIS-RTOS assumes that threads are scheduled as shown in the figure <b>Thread State and State Transitions</b>. The thread
+states change as follows:
+ - A thread is created using the function \ref osThreadNew. This puts the thread into the \b READY or \b RUNNING state
+ (depending on the thread priority).
+ - CMSIS-RTOS is pre-emptive. The active thread with the highest priority becomes the \b RUNNING thread provided it does not
+ wait for any event. The initial priority of a thread is defined with the \ref osThreadAttr_t but may be changed during
+ execution using the function \ref osThreadSetPriority.
+ - The \b RUNNING thread transfers into the \b WAITING state when it is waiting for an event.
+ - Active threads can be terminated any time using the function \ref osThreadTerminate. Threads can terminate also by just
+ returning from the thread function. Threads that are terminated are in the \b INACTIVE state and typically do not consume
+ any dynamic memory resources.
+
+@{
+*/
+/*=======0=========1=========2=========3=========4=========5=========6=========7=========8=========9=========0=========1====*/
+/**
+\enum osThreadState_t
+\details
+\note
+MUST REMAIN UNCHANGED: the enumeration shall be consistent in every CMSIS-RTOS.
+
+*/
+/*=======0=========1=========2=========3=========4=========5=========6=========7=========8=========9=========0=========1====*/
+/**
+\enum osPriority_t
+\details
+\note
+MUST REMAIN UNCHANGED: the enumeration shall be consistent in every CMSIS-RTOS.
+
+The \b osPriority_t value specifies the priority for a thread. The default thread priority should be \a osPriorityNormal.
+If a Thread is active that has a higher priority than the currently executing thread, then a thread switch occurs immediately
+to execute the new task.
+
+To prevent from a priority inversion, a CMSIS-RTOS compliant OS may optionally implement a <b>priority inheritance</b> method.
+A priority inversion occurs when a high priority thread is waiting for a resource or event that is controlled by a thread
+with a lower priority.
+
+\note
+Cannot be called from \ref CMSIS_RTOS_ISR_Calls "Interrupt Service Routines".
+
+*/
+/*=======0=========1=========2=========3=========4=========5=========6=========7=========8=========9=========0=========1====*/
+/**
+\typedef void *(*os_thread_func_t) (void *argument)
+\details
+
+
+*/
+/*=======0=========1=========2=========3=========4=========5=========6=========7=========8=========9=========0=========1====*/
+/**
+\typedef osThreadId_t
+
+*/
+/*=======0=========1=========2=========3=========4=========5=========6=========7=========8=========9=========0=========1====*/
+/**
+\struct osThreadAttr_t
+
+*/
+/*=======0=========1=========2=========3=========4=========5=========6=========7=========8=========9=========0=========1====*/
+/**
+\def osThreadJoinable
+\details
+
+*/
+/**
+\def osThreadDetached
+\details
+
+*/
+/*=======0=========1=========2=========3=========4=========5=========6=========7=========8=========9=========0=========1====*/
+/**
+\fn osThreadId_t osThreadNew (os_thread_func_t func, void *argument, const osThreadAttr_t *attr)
+\details
+\note
+MUST REMAIN UNCHANGED: the function shall be consistent in every CMSIS-RTOS.
+
+Start a thread function by adding it to the Active Threads list and set it to state \b READY. Arguments fo the thread function are passed
+using the parameter pointer \em *argument. When the priority of the created thread function is higher than the current \b RUNNING thread,
+the created thread function starts instantly and becomes the new \b RUNNING thread. Thread sttributes are defined with the parameter pointer \em attr.
+Attributes include settings for thread priority, stack size, or memory allocation.
+
+\note
+Cannot be called from \ref CMSIS_RTOS_ISR_Calls "Interrupt Service Routines".
+
+
+*/
+/*=======0=========1=========2=========3=========4=========5=========6=========7=========8=========9=========0=========1====*/
+/**
+\fn osThreadId_t osThreadGetId (void)
+\details
+\note
+MUST REMAIN UNCHANGED: the function shall be consistent in every CMSIS-RTOS.
+
+Get the thread ID of the current running thread.
+
+\note
+Cannot be called from \ref CMSIS_RTOS_ISR_Calls "Interrupt Service Routines".
+
+\b Example:
+\code
+void ThreadGetId_example (void) {
+ osThreadId id; // id for the currently running thread
+
+ id = osThreadGetId ();
+ if (id == NULL) {
+ // Failed to get the id; not in a thread
+ }
+}
+\endcode
+*/
+/*=======0=========1=========2=========3=========4=========5=========6=========7=========8=========9=========0=========1====*/
+/**
+\fn osThreadState_t osThreadGetState (osThreadId_t thread_id)
+\details
+\note
+MUST REMAIN UNCHANGED: the function shall be consistent in every CMSIS-RTOS.
+
+Return the state of the thread identified by parameter \em thread_id.
+See \ref osThreadState_t for possible states.
+
+*/
+/*=======0=========1=========2=========3=========4=========5=========6=========7=========8=========9=========0=========1====*/
+/**
+\fn osStatus_t osThreadSetPriority (osThreadId_t thread_id, osPriority_t priority)
+\details
+\note
+MUST REMAIN UNCHANGED: the function shall be consistent in every CMSIS-RTOS.
+
+Change the priority of an active thread.
+
+\ref CMSIS_RTOS_Status
+ - \em osOK: the priority of the specified thread has been changed successfully.
+ - \em osErrorParameter: the value of the parameter \em thread_id or parameter \em priority is incorrect.
+ - \em osErrorResource: parameter \em thread_id refers to a thread that is not an active thread.
+ - \em osErrorISR: the function \b osThreadSetPriority cannot be called from interrupt service routines.
+
+\note
+Cannot be called from \ref CMSIS_RTOS_ISR_Calls "Interrupt Service Routines".
+
+\b Example:
+\code
+#include "cmsis_os2.h"
+
+void Thread_1 (void const *arg) { // Thread function
+ osThreadId id; // id for the currently running thread
+ osPriority pr; // thread priority
+ osStatus status; // status of the executed function
+
+ :
+ id = osThreadGetId (); // Obtain ID of current running thread
+
+ if (id != NULL) {
+ status = osThreadSetPriority (id, osPriorityBelowNormal);
+ if (status == osOK) {
+ // Thread priority changed to BelowNormal
+ }
+ else {
+ // Failed to set the priority
+ }
+ }
+ else {
+ // Failed to get the id
+ }
+ :
+}
+\endcode
+*/
+/*=======0=========1=========2=========3=========4=========5=========6=========7=========8=========9=========0=========1====*/
+/**
+\fn osPriority_t osThreadGetPriority (osThreadId_t thread_id)
+\details
+\note
+MUST REMAIN UNCHANGED: the function shall be consistent in every CMSIS-RTOS.
+
+Get the priority of an active thread. In case of failure, the value \b osPriorityError is returned.
+
+\note
+Cannot be called from \ref CMSIS_RTOS_ISR_Calls "Interrupt Service Routines".
+
+\b Example:
+\code
+#include "cmsis_os2.h"
+
+void Thread_1 (void const *arg) { // Thread function
+ osThreadId id; // id for the currently running thread
+ osPriority priority; // thread priority
+
+ id = osThreadGetId (); // Obtain ID of current running thread
+
+ if (id != NULL) {
+ priority = osThreadGetPriority (id);
+ }
+ else {
+ // Failed to get the id
+ }
+}
+\endcode
+*/
+/*=======0=========1=========2=========3=========4=========5=========6=========7=========8=========9=========0=========1====*/
+/**
+\fn osStatus_t osThreadYield (void)
+\details
+\note
+MUST REMAIN UNCHANGED: the function osThreadNew shall be consistent in every CMSIS-RTOS.
+
+Pass control to the next thread that is in state \b READY. If there is no other thread in state \b READY,
+then the current thread continues execution and no thread switching occurs.
+
+\note
+Cannot be called from \ref CMSIS_RTOS_ISR_Calls "Interrupt Service Routines".
+
+\b Example:
+\code
+#include "cmsis_os2.h"
+
+void Thread_1 (void const *arg) { // Thread function
+ osStatus status; // status of the executed function
+ :
+ while (1) {
+ status = osThreadYield(); //
+ if (status != osOK) {
+ // thread switch not occurred, not in a thread function
+ }
+ }
+}
+\endcode
+*/
+/*=======0=========1=========2=========3=========4=========5=========6=========7=========8=========9=========0=========1====*/
+/**
+\fn osStatus_t osThreadAbortWait (osThreadId_t thread_id)
+\details
+Forces a thread in WAITING stated, specified with \em thread_id, to continue operation.
+Functions that will put a thread into WAITING state are:
+\ref osEventFlagsWait and \ref osThreadFlagsWait,
+\ref osDelay and \ref osDelayUntil,
+\ref osMutexAcquire and \ref osSemaphoreAcquire,
+\ref osMessageQueueGet,
+\ref osThreadJoin.
+
+The return value of the waiting function is unspecified.
+
+*/
+/*=======0=========1=========2=========3=========4=========5=========6=========7=========8=========9=========0=========1====*/
+/**
+\fn osStatus_t osThreadSuspend (osThreadId_t thread_id)
+\details
+\note
+MUST REMAIN UNCHANGED: the function shall be consistent in every CMSIS-RTOS.
+
+Sets the thread identified by parameter \em thread_id into the state \em Suspended (\ref osThreadSuspended).
+The thread is not executed until restarted with the function \ref osThreadResume.
+
+*/
+/*=======0=========1=========2=========3=========4=========5=========6=========7=========8=========9=========0=========1====*/
+/**
+\fn osStatus_t osThreadResume (osThreadId_t thread_id)
+\details
+\note
+MUST REMAIN UNCHANGED: the function shall be consistent in every CMSIS-RTOS.
+
+Restart a thread defined by parameter \em thread_id that has been stopped with \ref osThreadSuspend.
+If the \b RUNNING thread has a higher priority, then the thread is put in state \b WAITING.
+
+\todo: check
+
+*/
+/*=======0=========1=========2=========3=========4=========5=========6=========7=========8=========9=========0=========1====*/
+/**
+\fn osStatus_t osThreadDetach (osThreadId_t thread_id)
+\details
+Changes the attribute of a thread specified in \em thread_id to \ref osThreadDetached. Detached threads are not joinable with \ref osThreadJoin.
+When a detached thread is terminated all resources are returned to the system. The behaviour of \ref osThreadDetach on an already detached thread is undefined.
+
+\note
+MUST REMAIN UNCHANGED: the function shall be consistent in every CMSIS-RTOS.
+
+\todo : describe
+
+\note
+Cannot be called from \ref CMSIS_RTOS_ISR_Calls "Interrupt Service Routines".
+*/
+/*=======0=========1=========2=========3=========4=========5=========6=========7=========8=========9=========0=========1====*/
+/**
+\fn osStatus_t osThreadJoin (osThreadId_t thread_id, void **exit_ptr)
+\details
+Waits for the thread specified by \em thread_id to terminate.
+If that thread has already terminated, then \ref osThreadJoin returns immediately.
+The thread referred to by thread_id must joinable. By default threads are created with the attribute \ref osThreadJoinable. The thread may not have been detached by \ref osThreadDetach.
+
+\note
+MUST REMAIN UNCHANGED: the function shall be consistent in every CMSIS-RTOS.
+
+\note
+Cannot be called from \ref CMSIS_RTOS_ISR_Calls "Interrupt Service Routines".
+
+
+\b Example:
+\code
+#include "cmsis_os2.h"
+
+void *worker(void *arg)
+{
+ .. // work work work
+ return 0;
+}
+
+
+int join_threads(void)
+{
+ osThreadId_t th1, th2;
+
+ th1 = osThreadNew(worker, ¶m, NULL);
+ th2 = osThreadNew(worker, ¶m, NULL);
+
+ (void) osThreadJoin(th1, NULL);
+ (void) osThreadJoin(th2, NULL);
+ return 0;
+}
+\endcode
+
+*/
+/*=======0=========1=========2=========3=========4=========5=========6=========7=========8=========9=========0=========1====*/
+/**
+\fn __NO_RETURN void osThreadExit (void *exit_ptr)
+\details
+\note
+MUST REMAIN UNCHANGED: the function shall be consistent in every CMSIS-RTOS.
+
+Exit the \b RUNNING thread to an exit point defined by parameter pointer \em exit_ptr.
+
+\note
+Cannot be called from \ref CMSIS_RTOS_ISR_Calls "Interrupt Service Routines".
+*/
+/*=======0=========1=========2=========3=========4=========5=========6=========7=========8=========9=========0=========1====*/
+/**
+\fn osStatus_t osThreadTerminate (osThreadId_t thread_id)
+\details
+\note
+MUST REMAIN UNCHANGED: the function shall be consistent in every CMSIS-RTOS.
+
+Remove the thread function from the active thread list. If the thread is currently RUNNING the execution will stop.
+
+\note
+Cannot be called from \ref CMSIS_RTOS_ISR_Calls "Interrupt Service Routines".
+
+\code
+#include "cmsis_os2.h"
+
+void *Thread_1 (void c*arg); // function prototype for Thread_1
+
+void ThreadTerminate_example (void) {
+ osStatus_t status;
+ osThreadId_t id;
+
+ id = osThreadNew (Thread_1, NULL, NULL); // create the thread
+ :
+ status = osThreadTerminate (id); // stop the thread
+ if (status == osOK) {
+ // Thread was terminated successfully
+ }
+ else {
+ // Failed to terminate a thread
+ }
+}
+\endcode
+*/
+/// @}
+
+
+// these struct members must stay outside the group to avoid double entries in documentation
+/**
+\var osThreadAttr_t::attr_bits
+\details
+The following predefined bit masks can be assigned to set options for a thread object.
+
+Bit Mask | Description
+:-----------------------|:-----------------------------------------
+osThreadJoinable | Thread is created in a joinable state (default).
+osThreadDettached | Thread is created in a detached state.
+
+\var osThreadAttr_t::cb_mem
+\details
+Pointer to a memory location for the thread object. This can optionally be used for custom memory management systems.
+Specifytoken{NULL} to use the kernel memory management.
+
+\var osThreadAttr_t::cb_size
+\details
+The size of the memory block passed with \ref cb_mem. Must be the size of a thread object or larger.
+
+\var osThreadAttr_t::name
+\details
+String with a human readable name of the thread object.
+
+\var osThreadAttr_t::priority
+\details
+Specifies the initial thread priority with a value from #osPriority_t.
+
+\var osThreadAttr_t::reserved
+\details
+Reserved for future use. Must be \token{0}.
+
+\var osThreadAttr_t::stack_mem
+\details
+Pointer to a memory location for the thread stack. This can optionally be used for custom memory management systems.
+Specify \token{NULL} to use the kernel memory management.
+
+\var osThreadAttr_t::stack_mem
+\details
+The size of the stack specified by \ref stack_mem in Bytes.
+
+*/
diff --git a/CMSIS/DoxyGen/RTOS2/src/cmsis_os2_ThreadFlags.txt b/CMSIS/DoxyGen/RTOS2/src/cmsis_os2_ThreadFlags.txt
new file mode 100644
index 0000000..de7e8b8
--- /dev/null
+++ b/CMSIS/DoxyGen/RTOS2/src/cmsis_os2_ThreadFlags.txt
@@ -0,0 +1,91 @@
+
+/*=======0=========1=========2=========3=========4=========5=========6=========7=========8=========9=========0=========1====*/
+// ==== Thread Flags Management ====
+/**
+\addtogroup CMSIS_RTOS_ThreadFlagsMgmt Thread Flags
+\ingroup CMSIS_RTOS
+\brief Synchronize threads using flags.
+\details
+Thread Flags are a more specialized version of the Event Flags. See \ref CMSIS_RTOS_EventFlags.
+While Event Flags can be used to globally signal a number of threads, thread flags are only send to a single specific thread. Every thread instance can receive thread flags without any additional allocation of a thread flags object.
+
+@{
+*/
+/*=======0=========1=========2=========3=========4=========5=========6=========7=========8=========9=========0=========1====*/
+/** \def osFlagsWaitAny
+
+Reference:
+ - \ref osEventFlagsWait
+ - \ref osThreadFlagsWait
+*/
+/*=======0=========1=========2=========3=========4=========5=========6=========7=========8=========9=========0=========1====*/
+/** \def osFlagsWaitAll
+
+Reference:
+ - \ref osEventFlagsWait
+ - \ref osThreadFlagsWait
+*/
+/*=======0=========1=========2=========3=========4=========5=========6=========7=========8=========9=========0=========1====*/
+/** \def osFlagsAutoClear
+
+Reference:
+ - \ref osEventFlagsWait
+ - \ref osThreadFlagsWait
+*/
+/*=======0=========1=========2=========3=========4=========5=========6=========7=========8=========9=========0=========1====*/
+/** \fn int32_t osThreadFlagsSet (osThreadId_t thread_id, int32_t flags )
+Set the thread flags for a thread instance specified by \em thread_id. This function may be used also within interrupt service routines.
+The threads waiting for the flag set will be notified to resume from WAITING state.
+
+<b>Code Example</b>
+\code
+void *Thread (void *arg);
+
+static void EX_Signal_1 (void) {
+ int32_t signals;
+ osThreadId_t thread_id;
+
+ thread_id = osThreadCreate (Thread, NULL, NULL);
+ signals = osThreadFlagsSet (event_id, 0x00000001ul); // Send signals to the created thread
+}
+\endcode
+*/
+/*=======0=========1=========2=========3=========4=========5=========6=========7=========8=========9=========0=========1====*/
+/** \fn osStatus osThreadFlagsClear (osThreadId thread_id, int32_t flags);
+Clear the event flags of an thread flags object.
+
+*/
+/*=======0=========1=========2=========3=========4=========5=========6=========7=========8=========9=========0=========1====*/
+/** \fn int32_t osThreadFlagsGet (osThreadId thread_id);
+Return the event flags currently set in an thread flags object.
+
+*/
+/*=======0=========1=========2=========3=========4=========5=========6=========7=========8=========9=========0=========1====*/
+
+/** \fn int32_t osThreadFlagsWait (int32_t flags, uint32_t options, uint32_t millisec);
+Suspend the execution of the current \b RUNNING thread until any or all specified thread flags with the parameter \a flags are set.
+The /em options parameter specifies the wait condition.
+
+|Option | |
+|--------------------|-------------------------------------------------------|
+|\b osFlagsWaitAny | Wait for any flag (default). |
+|\b osFlagsWaitAll | Wait for all flags. |
+|\b osFlagsAutoClear | Clear flags which have been specified to wait for. |
+
+If osFlagsAutoClear is not set in the options /ref osThreadFlagClear can be used to clear flags manually.
+
+When these thread flags are already set, the function returns instantly. Otherwise the thread is put into the state \b WAITING.
+
+
+<b>Code Example</b>
+\code
+#include "cmsis_os2.h"
+:
+void *Thread (void* arg) {
+:
+ osThreadFlagsGet (0x00000001ul, NULL, osWaitForever); //Wait forever until event 0x01 is set.
+:
+}
+\endcode
+*/
+/// @}
\ No newline at end of file
diff --git a/CMSIS/DoxyGen/RTOS2/src/cmsis_os2_Timer.txt b/CMSIS/DoxyGen/RTOS2/src/cmsis_os2_Timer.txt
new file mode 100644
index 0000000..9232183
--- /dev/null
+++ b/CMSIS/DoxyGen/RTOS2/src/cmsis_os2_Timer.txt
@@ -0,0 +1,241 @@
+
+
+/*=======0=========1=========2=========3=========4=========5=========6=========7=========8=========9=========0=========1====*/
+// ==== Timer Management Functions ====
+/**
+\addtogroup CMSIS_RTOS_TimerMgmt Timer Management
+\ingroup CMSIS_RTOS
+\brief Create and control timer and timer callback functions.
+\details
+In addition to the \ref CMSIS_RTOS_Wait CMSIS-RTOS also supports virtual timer objects. These timer objects can
+trigger the execution of a function (not threads). When a timer expires, a callback function is executed to run associated
+code with the timer. The timer number is passed as a parameter to the callback function. Each timer can be configured as a
+one-shot or a periodic timer. A periodic timer repeats its operation until it is \ref osTimerDelete "deleted" or
+\ref osTimerStop "stopped". All timers can be \ref osTimerStart "started, restarted", or \ref osTimerStop "stopped".
+
+Timers are handled in the thread \b osTimerThread. Callback functions run under control of this thread and may use other
+CMSIS-RTOS API calls.
+
+The figure below shows the behavior of a periodic timer. For one-shot timers, the timer stops after execution of the
+callback function.
+
+\image html "Timer.png" "Behavior of a Periodic Timer"
+
+Working with Timers
+--------------------
+The following steps are required to use a timer:
+-# Define the timers:
+\code
+osTimerId one_shot_id, periodic_id;
+\endcode
+-# Instantiate and start the timers:
+\code
+one_shot_id = osTimerNew((os_timer_func_t)&one_shot_Callback, osTimerOnce, (void *)0); // creates a one-shot timer;
+ // (void*)0 is passed as an argument
+ // to the callback function
+periodic_id = osTimerNew((os_timer_func_t)&periodic_Callback, osTimerPeriodic, (void *)5); // creates a periodic timer;
+ // (void*)5 is passed as an argument
+ // to the callback function
+osTimerStart(one_shot_id, 500);
+osTimerStart(periodic, 1500);
+\endcode
+
+@{
+*/
+/*=======0=========1=========2=========3=========4=========5=========6=========7=========8=========9=========0=========1====*/
+/**
+\enum osTimerType_t
+\details
+\note MUST REMAIN UNCHANGED: \b osTimerType_t shall be consistent in every CMSIS-RTOS.
+The \ref osTimerType_t specifies the a repeating (periodic) or one-shot timer for the function \ref osTimerNew.
+
+*/
+/*=======0=========1=========2=========3=========4=========5=========6=========7=========8=========9=========0=========1====*/
+/**
+\typedef osTimerId_t
+\details
+Instances of this type hold a reference to a timer object.
+
+*/
+/*=======0=========1=========2=========3=========4=========5=========6=========7=========8=========9=========0=========1====*/
+/**
+\typedef void (*os_timer_func_t) (void *argument)
+\details
+
+*/
+/*=======0=========1=========2=========3=========4=========5=========6=========7=========8=========9=========0=========1====*/
+/**
+\struct osTimerAttr_t
+\details
+
+
+
+*/
+/*=======0=========1=========2=========3=========4=========5=========6=========7=========8=========9=========0=========1====*/
+/**
+\fn osTimerId_t osTimerNew (os_timer_func_t func, osTimerType_t type, void *argument, const osTimerAttr_t *attr)
+\details
+Create a one-shot or periodic timer and associate it with a callback function argument.
+The timer is in stopped until it is started with \ref osTimerStart.
+
+\note Cannot be called from \ref CMSIS_RTOS_ISR_Calls "Interrupt Service Routines".
+
+<b>Code Example</b>
+\code{.c}
+#include "cmsis_os2.h"
+
+void Timer1_Callback (void const *arg); // prototypes for timer callback function
+void Timer2_Callback (void const *arg);
+
+uint32_t exec1; // argument for the timer call back function
+uint32_t exec2; // argument for the timer call back function
+
+void TimerCreate_example (void) {
+ osTimerId_t id1; // timer id
+ osTimerId_t id2; // timer id
+
+ // Create one-shoot timer
+ exec1 = 1;
+ id1 = osTimerNew ((os_timer_func_t)&Timer1_Callback, osTimerOnce, &exec1);
+ if (id1 != NULL) {
+ // One-shoot timer created
+ }
+
+ // Create periodic timer
+ exec2 = 2;
+ id2 = osTimerNew ((os_timer_func_t)&Timer2_Callback, osTimerPeriodic, &exec2);
+ if (id2 != NULL) {
+ // Periodic timer created
+ }
+ :
+}
+\endcode
+*/
+/*=======0=========1=========2=========3=========4=========5=========6=========7=========8=========9=========0=========1====*/
+/**
+\fn osStatus_t osTimerStart (osTimerId_t timer_id, uint32_t millisec)
+\details
+Start or restart the timer.
+
+<b>\ref CMSIS_RTOS_Status</b>\n
+ - \em osOK: the specified timer has been started or restarted.
+ - \em osErrorISR: \ref osTimerStart cannot be called from interrupt service routines.
+ - \em osErrorParameter: \a timer_id is incorrect.
+
+\note Cannot be called from \ref CMSIS_RTOS_ISR_Calls "Interrupt Service Routines".
+
+<b>Code Example</b>
+\code{.c}
+#include "cmsis_os2.h"
+
+void Timer_Callback (void const *arg) { // timer callback function
+ // arg contains &exec
+ // called every second after osTimerStart
+}
+
+uint32_t exec; // argument for the timer call back function
+
+void TimerStart_example (void) {
+ osTimerId_t id; // timer id
+ uint32_t timerDelay; // timer value
+ osStatus_t status; // function return status
+
+ // Create periodic timer
+ exec = 1;
+ id = osTimerNew ((os_timer_func_t)&Timer_Callback, osTimerPeriodic, &exec);
+ if (id) {
+ timerDelay = 1000;
+ status = osTimerStart (id, timerDelay); // start timer
+ if (status != osOK) {
+ // Timer could not be started
+ }
+ }
+ :
+}
+\endcode
+*/
+/*=======0=========1=========2=========3=========4=========5=========6=========7=========8=========9=========0=========1====*/
+/**
+\fn osStatus_t osTimerStop (osTimerId_t timer_id)
+\details
+Stop the timer.
+
+<b>\ref CMSIS_RTOS_Status</b>\n
+ - \em osOK: the specified timer has been stopped.
+ - \em osErrorISR: \ref osTimerStop cannot be called from interrupt service routines.
+ - \em osErrorParameter: \a timer_id is incorrect.
+ - \em osErrorResource: the timer is not started.
+
+\note Cannot be called from \ref CMSIS_RTOS_ISR_Calls "Interrupt Service Routines".
+
+<b>Code Example</b>
+\code{.c}
+#include "cmsis_os2.h"
+
+void Timer_Callback (void const *arg); // prototype for timer callback function
+
+void TimerStop_example (void) {
+ osTimerId_t id; // timer id
+ osStatus_t status; // function return status
+
+ // Create periodic timer
+ exec = 1;
+ id = osTimerCreate ((os_timer_func_t)&Timer_Callback, osTimerPeriodic, NULL);
+ osTimerStart (id, 1000); // start timer
+ :
+ status = osTimerStop (id); // stop timer
+ if (status != osOK) {
+ // Timer could not be stopped
+ }
+ :
+ osTimerStart (id, 1000); // start timer again
+ :
+}
+\endcode
+*/
+/*=======0=========1=========2=========3=========4=========5=========6=========7=========8=========9=========0=========1====*/
+/**
+\fn uint32_t osTimerIsRunning (osTimerId_t timer_id)
+\details
+Test if timer is running.
+Returns 0 if timer is stopped.
+Returns 1 if timer is running.
+
+*/
+/*=======0=========1=========2=========3=========4=========5=========6=========7=========8=========9=========0=========1====*/
+/**
+\fn osStatus_t osTimerDelete (osTimerId_t timer_id)
+\details
+Delete the timer object.
+
+<b>\ref CMSIS_RTOS_Status</b>\n
+ - \em osOK: the specified timer has been deleted.
+ - \em osErrorISR: \ref osTimerDelete cannot be called from interrupt service routines.
+ - \em osErrorParameter: \a timer_id is incorrect.
+
+\note Cannot be called from \ref CMSIS_RTOS_ISR_Calls "Interrupt Service Routines".
+
+<b>Code Example</b>
+\code{.c}
+#include "cmsis_os2.h"
+
+void Timer_Callback (void const *arg); // prototype for timer callback function
+
+void TimerDelete_example (void) {
+ osTimerId_t id; // timer id
+ osStatus_t status; // function return status
+
+ // Create periodic timer
+ exec = 1;
+ id = osTimerCreate (osTimer(Timer2), osTimerPeriodic, &exec);
+ osTimerStart (id, 1000UL); // start timer
+ :
+ status = osTimerDelete (id); // stop and delete timer
+ if (status != osOK) {
+ // Timer could not be deleted
+ }
+ :
+}
+\endcode
+*/
+/// @}
diff --git a/CMSIS/DoxyGen/RTOS2/src/cmsis_os2_Wait.txt b/CMSIS/DoxyGen/RTOS2/src/cmsis_os2_Wait.txt
new file mode 100644
index 0000000..0d52743
--- /dev/null
+++ b/CMSIS/DoxyGen/RTOS2/src/cmsis_os2_Wait.txt
@@ -0,0 +1,89 @@
+
+/*=======0=========1=========2=========3=========4=========5=========6=========7=========8=========9=========0=========1====*/
+// ==== Generic Wait Functions ====
+/**
+\addtogroup CMSIS_RTOS_Wait Generic Wait Functions
+\ingroup CMSIS_RTOS
+\brief Wait for a time period or unspecified events.
+\details
+The Generic Wait function group provides means for a time delay and allow to wait for unspecified events.
+
+@{
+*/
+/*=======0=========1=========2=========3=========4=========5=========6=========7=========8=========9=========0=========1====*/
+/**
+\def osWaitForever
+\details
+
+Reference:
+ - \ref osDelay
+ - \ref osDelayUntil
+*/
+/*=======0=========1=========2=========3=========4=========5=========6=========7=========8=========9=========0=========1====*/
+/**
+\fn osStatus_t osDelay (uint32_t millisec);
+\details
+Wait for a specified time period in \a millisec.
+
+The \ref CMSIS_RTOS_TimeOutValue "millisec" value is converted to a number of timer ticks and is therefore an upper bound. The
+exact time delay depends on the actual time elapsed since the last timer tick.
+
+For a value of <b>1</b>, the system waits until the next timer tick occurs. That means that the actual time delay may be up
+to one timer tick less.
+
+<b>\ref CMSIS_RTOS_Status</b>\n
+ - \em osEventTimeout: the time delay is executed.
+ - \em osErrorISR: \ref osDelay cannot be called from interrupt service routines.
+
+\note Cannot be called from \ref CMSIS_RTOS_ISR_Calls "Interrupt Service Routines".
+
+<b>Code Example</b>
+\code
+#include "cmsis_os2.h"
+
+void *Thread_1 (void *arg) { // Thread function
+ osStatus_t status; // capture the return status
+ uint32_t delayTime; // delay time in milliseconds
+
+ delayTime = 1000; // delay 1 second
+ status = osDelay (delayTime); // suspend thread execution
+ if (status != osOK) {
+ // handle error code
+ }
+}
+\endcode
+*/
+/*=======0=========1=========2=========3=========4=========5=========6=========7=========8=========9=========0=========1====*/
+/**
+\fn osStatus_t osDelayUntil (uint64_t millisec)
+\details
+Wait until an absolute time - specified in millisec - is reached.
+
+The \ref CMSIS_RTOS_TimeOutValue "millisec" value is converted to a number of timer ticks and is therefore an upper bound. The
+exact time delay depends on the actual time elapsed since the last timer tick.
+
+\ref osKernelGetTime can be used to retrieve the current elapsed time of the kernel in millisec.
+
+<b>\ref CMSIS_RTOS_Status</b>\n
+ - \em osEventTimeout: the time delay is executed.
+ - \em osErrorISR: \ref osDelayUntil cannot be called from interrupt service routines.
+
+\note Cannot be called from \ref CMSIS_RTOS_ISR_Calls "Interrupt Service Routines".
+
+<b>Code Example</b>
+\code
+#include "cmsis_os2.h"
+
+void *Thread_1 (void *arg) { // Thread function
+ osStatus_t status; // capture the return status
+ uint32_t delayTime; // delay time in milliseconds
+
+ delayTime = osKernelGetTime() + 2000; // 2 seconds from now.
+ status = osDelay (delayTime); // suspend thread execution
+ if (status != osOK) {
+ // handle error code
+ }
+}
+\endcode
+*/
+/// @}
diff --git a/CMSIS/DoxyGen/RTOS2/src/images/add_item.png b/CMSIS/DoxyGen/RTOS2/src/images/add_item.png
new file mode 100644
index 0000000..20e6946
--- /dev/null
+++ b/CMSIS/DoxyGen/RTOS2/src/images/add_item.png
Binary files differ
diff --git a/CMSIS/DoxyGen/RTOS2/src/images/config_wizard.png b/CMSIS/DoxyGen/RTOS2/src/images/config_wizard.png
new file mode 100644
index 0000000..4a6b07b
--- /dev/null
+++ b/CMSIS/DoxyGen/RTOS2/src/images/config_wizard.png
Binary files differ
diff --git a/CMSIS/DoxyGen/RTOS2/src/images/manage_rte_output.png b/CMSIS/DoxyGen/RTOS2/src/images/manage_rte_output.png
new file mode 100644
index 0000000..d7a8328
--- /dev/null
+++ b/CMSIS/DoxyGen/RTOS2/src/images/manage_rte_output.png
Binary files differ
diff --git a/CMSIS/DoxyGen/RTOS2/src/images/project_window.png b/CMSIS/DoxyGen/RTOS2/src/images/project_window.png
new file mode 100644
index 0000000..0846b93
--- /dev/null
+++ b/CMSIS/DoxyGen/RTOS2/src/images/project_window.png
Binary files differ