Bläddra i källkod

CMSIS-RTOS2: updated documentation (error code description)

Robert Rostohar 7 år sedan
förälder
incheckning
d442f6eada

+ 13 - 13
CMSIS/DoxyGen/RTOS2/src/cmsis_os2_Event.txt

@@ -157,10 +157,10 @@ by parameter \a ef_id. All threads waiting for the flag set will be notified to
 The function returns the event flags after setting or an error code (highest bit is set, refer to \ref flags_error_codes).
 
 Possible \ref flags_error_codes return values:
-    - \em osFlagsErrorUnknown: Unspecified error.
-    - \em osFlagsErrorResource: Event flags object specified by parameter \a ef_id is not ready to be used.
-    - \em osFlagsErrorParameter: Parameter \a ef_id does not identify a valid event flags object or \em flags has highest bit set. 
-	
+    - \em osFlagsErrorUnknown: unspecified error.
+    - \em osFlagsErrorParameter: parameter \a ef_id does not identify a valid event flags object or \em flags has highest bit set. 
+    - \em osFlagsErrorResource: the event flags object is in an invalid state.
+
 \note This function may be called from \ref CMSIS_RTOS_ISR_Calls "Interrupt Service Routines".
 
 <b>Code Example</b>
@@ -199,9 +199,9 @@ specified by parameter \a ef_id. The function returns the event flags before cle
 refer to \ref flags_error_codes).
 
 Possible \ref flags_error_codes return values:
-    - \em osFlagsErrorUnknown: Unspecified error.
-    - \em osFlagsErrorResource: Event flags object specified by parameter \a ef_id is not ready to be used.
-    - \em osFlagsErrorParameter: Parameter \a ef_id does not identify a valid event flags object or \em flags has highest bit set. 
+    - \em osFlagsErrorUnknown: unspecified error.
+    - \em osFlagsErrorParameter: parameter \a ef_id does not identify a valid event flags object or \em flags has highest bit set. 
+    - \em osFlagsErrorResource: the event flags object is in an invalid state.
 
 \note This function may be called from \ref CMSIS_RTOS_ISR_Calls "Interrupt Service Routines".
 */
@@ -244,10 +244,10 @@ that is calling this function is put into the \ref ThreadStates "BLOCKED" state.
 The function returns the event flags before clearing or an error code (highest bit is set, refer to \ref flags_error_codes).
 
 Possible \ref flags_error_codes return values:
-    - \em osFlagsErrorUnknown: Unspecified error.
-    - \em osFlagsErrorTimeout: The awaited flags has not been set during given timeout.
-    - \em osFlagsErrorResource: Event flags object specified by parameter \a ef_id is not ready to be used.
-    - \em osFlagsErrorParameter: Parameter \a ef_id does not identify a valid event flags object or \em flags has highest bit set. 
+    - \em osFlagsErrorUnknown: unspecified error.
+    - \em osFlagsErrorTimeout: awaited flags have not been set in the given time.
+    - \em osFlagsErrorResource: awaited flags have not been set when no \a timeout was specified.
+    - \em osFlagsErrorParameter: parameter \a ef_id does not identify a valid event flags object or \em flags has highest bit set. 
 
 \note May be called from \ref CMSIS_RTOS_ISR_Calls "Interrupt Service Routines" if the parameter \a timeout is set to
 \token{0}.
@@ -291,8 +291,8 @@ function \ref osEventFlagsNew.
 Possible \ref osStatus_t return values:
  - \em osOK: the specified event flags object has been deleted.
  - \em osErrorISR: \b osEventFlagsDelete cannot be called from interrupt service routines.
- - \em osErrorParameter: the value of the parameter \a ef_id is incorrect.
- - \em osErrorResource: parameter \em ef_id is \token{NULL} or wrong.
+ - \em osErrorParameter: parameter \a ef_id is \token{NULL} or invalid.
+ - \em osErrorResource: the event flags object is in an invalid state.
 
 \note This function \b cannot be called from \ref CMSIS_RTOS_ISR_Calls "Interrupt Service Routines".
 */

+ 2 - 2
CMSIS/DoxyGen/RTOS2/src/cmsis_os2_MemPool.txt

@@ -180,7 +180,7 @@ If another thread is waiting for memory to become available the thread is put to
 Possible \ref osStatus_t return values:
  - \em osOK: the memory has been freed.
  - \em osErrorParameter: parameter \a mp_id is \token{NULL} or invalid, \a block points to invalid memory.
- - \em osErrorResource: the memory pool specified by parameter \a mp_id is in an invalid memory pool state.
+ - \em osErrorResource: the memory pool is in an invalid state.
 
 \note \b osMemoryPoolFree may perform certain checks on the \a block pointer given. But using \b osMemoryPoolFree 
 with a pointer other than one received from \ref osMemoryPoolAlloc has \b UNPREDICTED behaviour.
@@ -243,7 +243,7 @@ memory pool may be created again using the function \ref osMemoryPoolNew.
 Possible \ref osStatus_t return values:
  - \em osOK: the memory pool object has been deleted.
  - \em osErrorParameter: parameter \a mp_id is \token{NULL} or invalid.
- - \em osErrorResource: the memory pool specified by parameter \a mp_id is in an invalid memory pool state.
+ - \em osErrorResource: the memory pool is in an invalid state.
  - \em osErrorISR: \b osMemoryPoolDelete cannot be called from interrupt service routines.
 
 \note This function \b cannot be called from \ref CMSIS_RTOS_ISR_Calls "Interrupt Service Routines".

+ 4 - 4
CMSIS/DoxyGen/RTOS2/src/cmsis_os2_Message.txt

@@ -88,7 +88,7 @@ Possible \ref osStatus_t return values:
  - \em osOK: the message has been put into the queue.
  - \em osErrorTimeout: the message could not be put into the queue in the given time (wait-timed semantics).
  - \em osErrorResource: not enough space in the queue (try semantics).
- - \em osErrorParameter: the parameter \a mq_id is incorrect, non-zero timeout specified in an ISR.
+ - \em osErrorParameter: parameter \em mq_id is \token{NULL} or invalid, non-zero timeout specified in an ISR.
 
 \note May be called from \ref CMSIS_RTOS_ISR_Calls "Interrupt Service Routines" if the parameter \a timeout is set to
 \token{0}.
@@ -176,7 +176,7 @@ Possible \ref osStatus_t return values:
  - \em osOK: the message has been retrieved from the queue.
  - \em osErrorTimeout: the message could not be retrieved from the queue in the given time (timed-wait semantics).
  - \em osErrorResource: nothing to get from the queue (try semantics).
- - \em osErrorParameter: the parameter \a mq_id is incorrect, non-zero timeout specified in an ISR.
+ - \em osErrorParameter: parameter \em mq_id is \token{NULL} or invalid, non-zero timeout specified in an ISR.
 
 \note May be called from \ref CMSIS_RTOS_ISR_Calls "Interrupt Service Routines" if the parameter \a timeout is set to
 \token{0}.
@@ -235,7 +235,7 @@ The function \b osMessageQueueReset resets the message queue specified by the pa
 Possible \ref osStatus_t return values:
  - \em osOK: the message queue has been rest.
  - \em osErrorParameter: parameter \em mq_id is \token{NULL} or invalid.
- - \em osErrorResource: the message queue specified by parameter \a mq_id is in an invalid message queue state.
+ - \em osErrorResource: the message queue is in an invalid state.
  - \em osErrorISR: \b osMessageQueueReset cannot be called from interrupt service routines.
 
 \note This function \b cannot be called from \ref CMSIS_RTOS_ISR_Calls "Interrupt Service Routines".
@@ -252,7 +252,7 @@ message queue may be created again using the function \ref osMessageQueueNew.
 Possible \ref osStatus_t return values:
  - \em osOK: the message queue object has been deleted.
  - \em osErrorParameter: parameter \em mq_id is \token{NULL} or invalid.
- - \em osErrorResource: the message queue specified by parameter \a mq_id is in an invalid message queue state.
+ - \em osErrorResource: the message queue is in an invalid state.
  - \em osErrorISR: \b osMessageQueueDelete cannot be called from interrupt service routines.
 
 \note This function \b cannot be called from \ref CMSIS_RTOS_ISR_Calls "Interrupt Service Routines".

+ 3 - 5
CMSIS/DoxyGen/RTOS2/src/cmsis_os2_Mutex.txt

@@ -261,9 +261,8 @@ can have the following values:
 Possible \ref osStatus_t return values:
  - \em osOK: the mutex has been obtained.
  - \em osErrorTimeout: the mutex could not be obtained in the given time.
+ - \em osErrorResource: the mutex could not be obtained when no \a timeout was specified.
  - \em osErrorParameter: parameter \em mutex_id is \token{NULL} or invalid.
- - \em osErrorResource: the mutex specified by parameter \a mutex_id is in an invalid mutex state or the mutex could not be
-   obtained when no \a timeout was specified.
  - \em osErrorISR: cannot be called from interrupt service routines.
 
 \note This function \b cannot be called from \ref CMSIS_RTOS_ISR_Calls "Interrupt Service Routines".
@@ -296,9 +295,8 @@ this mutex will be put into the \ref ThreadStates "READY" state.
 
 Possible \ref osStatus_t return values:
  - \em osOK: the mutex has been correctly released.
+ - \em osErrorResource: the mutex could not be released (mutex was not acquired or running thread is not the owner).
  - \em osErrorParameter: parameter \em mutex_id is \token{NULL} or invalid.
- - \em osErrorResource: the mutex specified by parameter \a mutex_id is in an invalid mutex state or the mutex was not
-   obtained before/the current thread is not the owner of the mutex.
  - \em osErrorISR: \b osMutexRelease cannot be called from interrupt service routines.
 
 \note This function \b cannot be called from \ref CMSIS_RTOS_ISR_Calls "Interrupt Service Routines".
@@ -343,7 +341,7 @@ using the function \ref osMutexNew.
 Possible \ref osStatus_t return values:
  - \em osOK: the mutex object has been deleted.
  - \em osErrorParameter: parameter \em mutex_id is \token{NULL} or invalid.
- - \em osErrorResource: the mutex specified by parameter \a mutex_id is in an invalid mutex state.
+ - \em osErrorResource: the mutex is in an invalid state.
  - \em osErrorISR: \b osMutexDelete cannot be called from interrupt service routines.
 
 \note This function \b cannot be called from \ref CMSIS_RTOS_ISR_Calls "Interrupt Service Routines".

+ 6 - 6
CMSIS/DoxyGen/RTOS2/src/cmsis_os2_Sema.txt

@@ -210,10 +210,10 @@ that is calling this function is put into the \ref ThreadStates "BLOCKED" state.
  - all other values specify a time in kernel ticks for a timeout (i.e. timed-wait semantics).
 
 Possible \ref osStatus_t return values:
- - \em osOK: the token has been obtained.
+ - \em osOK: the token has been obtained and the token count decremented.
  - \em osErrorTimeout: the token could not be obtained in the given time.
  - \em osErrorResource: the token could not be obtained when no \a timeout was specified.
- - \em osErrorParameter: the parameter \a semaphore_id is incorrect.
+ - \em osErrorParameter: the parameter \a semaphore_id is \token{NULL} or invalid.
 
 \note May be called from \ref CMSIS_RTOS_ISR_Calls "Interrupt Service Routines" if the parameter \a timeout is set to
 \token{0}.
@@ -232,9 +232,9 @@ can only be released up to the maximum count specified at creation time, see \re
 currently wait for a token of this semaphore object will be put into the \ref ThreadStates "READY" state.
 
 Possible \ref osStatus_t return values:
- - \em osOK: the token has been correctly released and the count increased.
- - \em osErrorResource: the maximum token count has been reached.
- - \em osErrorParameter: the parameter \a semaphore_id is incorrect.
+ - \em osOK: the token has been released and the count incremented.
+ - \em osErrorResource: the token could not be released (maximum token count has been reached).
+ - \em osErrorParameter: the parameter \a semaphore_id is \token{NULL} or invalid.
 
 \note This function may be called from \ref CMSIS_RTOS_ISR_Calls "Interrupt Service Routines".
 
@@ -264,7 +264,7 @@ semaphore may be created again using the function \ref osSemaphoreNew.
 Possible \ref osStatus_t return values:
  - \em osOK: the semaphore object has been deleted.
  - \em osErrorParameter: the parameter \a semaphore_id is \token{NULL} or invalid.
- - \em osErrorResource: the semaphore specified by parameter \em semaphore_id is in an invalid semaphore state.
+ - \em osErrorResource: the semaphore is in an invalid state.
  - \em osErrorISR: \b osSemaphoreDelete cannot be called from interrupt service routines.
 
 \note This function \b cannot be called from \ref CMSIS_RTOS_ISR_Calls "Interrupt Service Routines".

+ 6 - 8
CMSIS/DoxyGen/RTOS2/src/cmsis_os2_Thread.txt

@@ -380,7 +380,7 @@ priority specified by the parameter \a priority.
 Possible \ref osStatus_t return values:
     - \em osOK: the priority of the specified thread has been changed successfully.
     - \em osErrorParameter: \a thread_id is \token{NULL} or invalid or \a priority is incorrect.
-    - \em osErrorResource: thread specified by parameter \em thread_id is in an invalid thread state.
+    - \em osErrorResource: the thread is in an invalid state.
     - \em osErrorISR: the function \b osThreadSetPriority cannot be called from interrupt service routines.
 
 \note This function \b cannot be called from \ref CMSIS_RTOS_ISR_Calls "Interrupt Service Routines".
@@ -480,7 +480,7 @@ Thus it is not recommended to suspend an already blocked thread.
 Possible \ref osStatus_t return values:
     - \em osOK: the thread has been suspended successfully.
     - \em osErrorParameter: \a thread_id is \token{NULL} or invalid.
-    - \em osErrorResource: thread specified by parameter \em thread_id is in an invalid thread state.
+    - \em osErrorResource: the thread is in an invalid state.
     - \em osErrorISR: the function \b osThreadSuspend cannot be called from interrupt service routines.
 
 \note This function \b cannot be called from \ref CMSIS_RTOS_ISR_Calls "Interrupt Service Routines".
@@ -510,7 +510,7 @@ Functions that will put a thread into \ref ThreadStates "BLOCKED" state are:
 Possible \ref osStatus_t return values:
     - \em osOK: the thread has been resumed successfully.
     - \em osErrorParameter: \a thread_id is \token{NULL} or invalid.
-    - \em osErrorResource: thread specified by parameter \em thread_id is in an invalid thread state.
+    - \em osErrorResource: the thread is in an invalid state.
     - \em osErrorISR: the function \b osThreadResume cannot be called from interrupt service routines.
 
 \note This function \b cannot be called from \ref CMSIS_RTOS_ISR_Calls "Interrupt Service Routines".
@@ -530,7 +530,7 @@ the system. The behavior of \ref osThreadDetach on an already detached thread is
 Possible \ref osStatus_t return values:
     - \em osOK: the attribute of the specified thread has been changed to detached successfully.
     - \em osErrorParameter: \a thread_id is \token{NULL} or invalid.
-    - \em osErrorResource: thread specified by parameter \em thread_id is in an invalid thread state.
+    - \em osErrorResource: the thread is in an invalid state.
     - \em osErrorISR: the function \b osThreadDetach cannot be called from interrupt service routines.
 
 \note This function \b cannot be called from \ref CMSIS_RTOS_ISR_Calls "Interrupt Service Routines".
@@ -548,8 +548,7 @@ Possible \ref osStatus_t return values:
     - \em osOK: if the thread has already been terminated and joined or once the thread has been terminated and the join
       operations succeeds.
     - \em osErrorParameter: \a thread_id is \token{NULL} or invalid.
-    - \em osErrorResource: parameter \em thread_id is \token{NULL} or refers to a thread that is not an active thread or the
-      thread is not joinable.
+    - \em osErrorResource: the thread is in an invalid state (ex: not joinable).
     - \em osErrorISR: the function \b osThreadJoin cannot be called from interrupt service routines.
 
 \note This function \b cannot be called from \ref CMSIS_RTOS_ISR_Calls "Interrupt Service Routines".
@@ -585,8 +584,7 @@ such thread exists, the function will not terminate the running thread, but retu
 Possible \ref osStatus_t return values:
     - \em osOK: the specified thread has been removed from the active thread list successfully.
     - \em osErrorParameter: \a thread_id is \token{NULL} or invalid.
-    - \em osErrorResource: thread specified by parameter \em thread_id is in an invalid thread state or no
-      other \ref ThreadStates "READY" thread exists.
+    - \em osErrorResource: the thread is in an invalid state or no other \ref ThreadStates "READY" thread exists.
     - \em osErrorISR: the function \b osThreadTerminate cannot be called from interrupt service routines.
 
 \note This function \b cannot be called from \ref CMSIS_RTOS_ISR_Calls "Interrupt Service Routines".

+ 11 - 12
CMSIS/DoxyGen/RTOS2/src/cmsis_os2_ThreadFlags.txt

@@ -68,9 +68,9 @@ flags set, or an error code if highest bit is set (refer to \ref flags_error_cod
 be used also within interrupt service routines. Threads waiting for a flag to be set will resume from \ref ThreadStates "BLOCKED" state.
 
 Possible \ref flags_error_codes return values:
-    - \em osFlagsErrorUnknown: Unspecified error.
-    - \em osFlagsErrorResource: Thread specified by parameter \em thread_id is not active to receive flags.
-    - \em osFlagsErrorParameter: Parameter \em thread_id is not a valid thread or \em flags has highest bit set.
+    - \em osFlagsErrorUnknown: unspecified error.
+    - \em osFlagsErrorParameter: parameter \em thread_id is not a valid thread or \em flags has highest bit set.
+    - \em osFlagsErrorResource: the thread is in invalid state.
 
 \note This function may be called from \ref CMSIS_RTOS_ISR_Calls "Interrupt Service Routines".
 
@@ -97,10 +97,9 @@ The function \b osThreadFlagsClear clears the specified flags for the currently
 flags before clearing, or an error code if highest bit is set (refer to \ref flags_error_codes).
 
 Possible \ref flags_error_codes return values:
-    - \em osFlagsErrorUnknown: Unspecified error, i.e. not called from a running threads context.
-    - \em osFlagsErrorResource: Running thread is not active to receive flags.
-    - \em osFlagsErrorParameter: Parameter \em flags has highest bit set. 
-	
+    - \em osFlagsErrorUnknown: unspecified error, i.e. not called from a running threads context.
+    - \em osFlagsErrorParameter: parameter \em flags has highest bit set. 
+
 \note This function \b cannot be called from \ref CMSIS_RTOS_ISR_Calls "Interrupt Service Routines".
 */
 
@@ -109,7 +108,7 @@ Possible \ref flags_error_codes return values:
 \details
 The function \b osThreadFlagsGet returns the flags currently set for the currently running thread. 
 If called without a active and currently running thread \b osThreadFlagsGet return zero.
-	
+
 \note This function \b cannot be called from \ref CMSIS_RTOS_ISR_Calls "Interrupt Service Routines".
 */
 
@@ -135,11 +134,11 @@ exact time delay depends on the actual time elapsed since the last timer tick.
 The function returns the flags before clearing, or an error code if highest bit is set (refer to \ref flags_error_codes).
 
 Possible \ref flags_error_codes return values:
-    - \em osFlagsErrorUnknown: Unspecified error, i.e. not called from a running threads context.
-    - \em osFlagsErrorTimeout: The awaited flags has not been set during given timeout.
-    - \em osFlagsErrorResource: Running thread is not active to receive flags.
+    - \em osFlagsErrorUnknown: unspecified error, i.e. not called from a running threads context.
+    - \em osFlagsErrorTimeout: awaited flags have not been set in the given time.
+    - \em osFlagsErrorResource: awaited flags have not been set when no \a timeout was specified.
     - \em osFlagsErrorParameter: Parameter \em flags has highest bit set.
-	
+
 \note This function \b cannot be called from \ref CMSIS_RTOS_ISR_Calls "Interrupt Service Routines".
 
 <b>Code Example</b>

+ 3 - 3
CMSIS/DoxyGen/RTOS2/src/cmsis_os2_Timer.txt

@@ -171,7 +171,7 @@ Possible \ref osStatus_t return values:
  - \em osOK: the specified timer has been started or restarted.
  - \em osErrorISR: \b osTimerStart cannot be called from interrupt service routines.
  - \em osErrorParameter: parameter \a timer_id is either \token{NULL} or invalid or \a ticks is incorrect.
- - \em osErrorResource: the timer specified by parameter \a timer_id is in an invalid timer state.
+ - \em osErrorResource: the timer is in an invalid state.
 
 \note This function \b cannot be called from \ref CMSIS_RTOS_ISR_Calls "Interrupt Service Routines".
 
@@ -216,7 +216,7 @@ Possible \ref osStatus_t return values:
  - \em osOK: the specified timer has been stopped.
  - \em osErrorISR: \b osTimerStop cannot be called from interrupt service routines.
  - \em osErrorParameter: parameter \a timer_id is either \token{NULL} or invalid.
- - \em osErrorResource: the timer specified by parameter \a timer_id is not running (you can only stop a running timer).
+ - \em osErrorResource: the timer is not running (you can only stop a running timer).
 
 \note This function \b cannot be called from \ref CMSIS_RTOS_ISR_Calls "Interrupt Service Routines".
 
@@ -268,7 +268,7 @@ Possible \ref osStatus_t return values:
  - \em osOK: the specified timer has been deleted.
  - \em osErrorISR: \b osTimerDelete cannot be called from interrupt service routines.
  - \em osErrorParameter: parameter \a timer_id is either \token{NULL} or invalid.
- - \em osErrorResource: the timer specified by parameter \a timer_id is in an invalid timer state.
+ - \em osErrorResource: the timer is in an invalid state.
 
 \note This function \b cannot be called from \ref CMSIS_RTOS_ISR_Calls "Interrupt Service Routines".