Mistake on this page?
Report an issue in GitHub or email us
rtx_evr.h
1 /*
2  * Copyright (c) 2013-2019 Arm Limited. All rights reserved.
3  *
4  * SPDX-License-Identifier: Apache-2.0
5  *
6  * Licensed under the Apache License, Version 2.0 (the License); you may
7  * not use this file except in compliance with the License.
8  * You may obtain a copy of the License at
9  *
10  * www.apache.org/licenses/LICENSE-2.0
11  *
12  * Unless required by applicable law or agreed to in writing, software
13  * distributed under the License is distributed on an AS IS BASIS, WITHOUT
14  * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15  * See the License for the specific language governing permissions and
16  * limitations under the License.
17  *
18  * -----------------------------------------------------------------------------
19  *
20  * Project: CMSIS-RTOS RTX
21  * Title: RTX Event Recorder definitions
22  *
23  * -----------------------------------------------------------------------------
24  */
25 
26 #ifndef RTX_EVR_H_
27 #define RTX_EVR_H_
28 
29 #include "cmsis_os2.h" // CMSIS RTOS API
30 #include "RTX_Config.h" // RTX Configuration
31 #include "rtx_os.h" // RTX OS definitions
32 
33 // Initial Thread configuration covered also Thread Flags and Generic Wait
34 #ifndef OS_EVR_THFLAGS
35 #define OS_EVR_THFLAGS OS_EVR_THREAD
36 #endif
37 #ifndef OS_EVR_WAIT
38 #define OS_EVR_WAIT OS_EVR_THREAD
39 #endif
40 
41 #ifdef _RTE_
42 #include "RTE_Components.h"
43 #endif
44 
45 #ifdef RTE_Compiler_EventRecorder
46 
47 //lint -emacro((835,845),EventID) [MISRA Note 13]
48 
49 #include "EventRecorder.h"
50 #include "EventRecorderConf.h"
51 
52 #if ((defined(OS_EVR_INIT) && (OS_EVR_INIT != 0)) || (EVENT_TIMESTAMP_SOURCE == 2))
53 #ifndef EVR_RTX_KERNEL_GET_STATE_DISABLE
54 #define EVR_RTX_KERNEL_GET_STATE_DISABLE
55 #endif
56 #endif
57 
58 #if (EVENT_TIMESTAMP_SOURCE == 2)
59 #ifndef EVR_RTX_KERNEL_GET_SYS_TIMER_COUNT_DISABLE
60 #define EVR_RTX_KERNEL_GET_SYS_TIMER_COUNT_DISABLE
61 #endif
62 #ifndef EVR_RTX_KERNEL_GET_SYS_TIMER_FREQ_DISABLE
63 #define EVR_RTX_KERNEL_GET_SYS_TIMER_FREQ_DISABLE
64 #endif
65 #endif
66 
67 /// RTOS component number
68 #define EvtRtxMemoryNo (0xF0U)
69 #define EvtRtxKernelNo (0xF1U)
70 #define EvtRtxThreadNo (0xF2U)
71 #define EvtRtxThreadFlagsNo (0xF4U)
72 #define EvtRtxWaitNo (0xF3U)
73 #define EvtRtxTimerNo (0xF6U)
74 #define EvtRtxEventFlagsNo (0xF5U)
75 #define EvtRtxMutexNo (0xF7U)
76 #define EvtRtxSemaphoreNo (0xF8U)
77 #define EvtRtxMemoryPoolNo (0xF9U)
78 #define EvtRtxMessageQueueNo (0xFAU)
79 
80 #endif // RTE_Compiler_EventRecorder
81 
82 
83 /// Extended Status codes
84 #define osRtxErrorKernelNotReady (-7)
85 #define osRtxErrorKernelNotRunning (-8)
86 #define osRtxErrorInvalidControlBlock (-9)
87 #define osRtxErrorInvalidDataMemory (-10)
88 #define osRtxErrorInvalidThreadStack (-11)
89 #define osRtxErrorInvalidPriority (-12)
90 #define osRtxErrorThreadNotJoinable (-13)
91 #define osRtxErrorMutexNotOwned (-14)
92 #define osRtxErrorMutexNotLocked (-15)
93 #define osRtxErrorMutexLockLimit (-16)
94 #define osRtxErrorSemaphoreCountLimit (-17)
95 #define osRtxErrorTZ_InitContext_S (-18)
96 #define osRtxErrorTZ_AllocContext_S (-19)
97 #define osRtxErrorTZ_FreeContext_S (-20)
98 #define osRtxErrorTZ_LoadContext_S (-21)
99 #define osRtxErrorTZ_SaveContext_S (-22)
100 
101 
102 // ==== Memory Events ====
103 
104 /**
105  \brief Event on memory initialization (Op)
106  \param[in] mem pointer to memory pool.
107  \param[in] size size of a memory pool in bytes.
108  \param[in] result execution status: 1 - success, 0 - failure.
109 */
110 #if (!defined(EVR_RTX_DISABLE) && (OS_EVR_MEMORY != 0) && !defined(EVR_RTX_MEMORY_INIT_DISABLE))
111 extern void EvrRtxMemoryInit (void *mem, uint32_t size, uint32_t result);
112 #else
113 #define EvrRtxMemoryInit(mem, size, result)
114 #endif
115 
116 /**
117  \brief Event on memory allocate (Op)
118  \param[in] mem pointer to memory pool.
119  \param[in] size size of a memory block in bytes.
120  \param[in] type memory block type: 0 - generic, 1 - control block.
121  \param[in] block pointer to allocated memory block or NULL in case of no memory is available.
122 */
123 #if (!defined(EVR_RTX_DISABLE) && (OS_EVR_MEMORY != 0) && !defined(EVR_RTX_MEMORY_ALLOC_DISABLE))
124 extern void EvrRtxMemoryAlloc (void *mem, uint32_t size, uint32_t type, void *block);
125 #else
126 #define EvrRtxMemoryAlloc(mem, size, type, block)
127 #endif
128 
129 /**
130  \brief Event on memory free (Op)
131  \param[in] mem pointer to memory pool.
132  \param[in] block memory block to be returned to the memory pool.
133  \param[in] result execution status: 1 - success, 0 - failure.
134 */
135 #if (!defined(EVR_RTX_DISABLE) && (OS_EVR_MEMORY != 0) && !defined(EVR_RTX_MEMORY_FREE_DISABLE))
136 extern void EvrRtxMemoryFree (void *mem, void *block, uint32_t result);
137 #else
138 #define EvrRtxMemoryFree(mem, block, result)
139 #endif
140 
141 /**
142  \brief Event on memory block initialization (Op)
143  \param[in] mp_info memory pool info.
144  \param[in] block_count maximum number of memory blocks in memory pool.
145  \param[in] block_size size of a memory block in bytes.
146  \param[in] block_mem pointer to memory for block storage.
147 */
148 #if (!defined(EVR_RTX_DISABLE) && (OS_EVR_MEMORY != 0) && !defined(EVR_RTX_MEMORY_BLOCK_INIT_DISABLE))
149 extern void EvrRtxMemoryBlockInit (osRtxMpInfo_t *mp_info, uint32_t block_count, uint32_t block_size, void *block_mem);
150 #else
151 #define EvrRtxMemoryBlockInit(mp_info, block_count, block_size, block_mem)
152 #endif
153 
154 /**
155  \brief Event on memory block alloc (Op)
156  \param[in] mp_info memory pool info.
157  \param[in] block address of the allocated memory block or NULL in case of no memory is available.
158 */
159 #if (!defined(EVR_RTX_DISABLE) && (OS_EVR_MEMORY != 0) && !defined(EVR_RTX_MEMORY_BLOCK_ALLOC_DISABLE))
160 extern void EvrRtxMemoryBlockAlloc (osRtxMpInfo_t *mp_info, void *block);
161 #else
162 #define EvrRtxMemoryBlockAlloc(mp_info, block)
163 #endif
164 
165 /**
166  \brief Event on memory block free (Op)
167  \param[in] mp_info memory pool info.
168  \param[in] block address of the allocated memory block to be returned to the memory pool.
169  \param[in] status extended execution status.
170 */
171 #if (!defined(EVR_RTX_DISABLE) && (OS_EVR_MEMORY != 0) && !defined(EVR_RTX_MEMORY_BLOCK_FREE_DISABLE))
172 extern void EvrRtxMemoryBlockFree (osRtxMpInfo_t *mp_info, void *block, int32_t status);
173 #else
174 #define EvrRtxMemoryBlockFree(mp_info, block, status)
175 #endif
176 
177 
178 // ==== Kernel Events ====
179 
180 /**
181  \brief Event on RTOS kernel error (Error)
182  \param[in] status extended execution status.
183 */
184 #if (!defined(EVR_RTX_DISABLE) && (OS_EVR_KERNEL != 0) && !defined(EVR_RTX_KERNEL_ERROR_DISABLE))
185 extern void EvrRtxKernelError (int32_t status);
186 #else
187 #define EvrRtxKernelError(status)
188 #endif
189 
190 /**
191  \brief Event on RTOS kernel initialize (API)
192 */
193 #if (!defined(EVR_RTX_DISABLE) && (OS_EVR_KERNEL != 0) && !defined(EVR_RTX_KERNEL_INITIALIZE_DISABLE))
194 extern void EvrRtxKernelInitialize (void);
195 #else
196 #define EvrRtxKernelInitialize()
197 #endif
198 
199 /**
200  \brief Event on successful RTOS kernel initialize (Op)
201 */
202 #if (!defined(EVR_RTX_DISABLE) && (OS_EVR_KERNEL != 0) && !defined(EVR_RTX_KERNEL_INITIALIZED_DISABLE))
203 extern void EvrRtxKernelInitialized (void);
204 #else
205 #define EvrRtxKernelInitialized()
206 #endif
207 
208 /**
209  \brief Event on RTOS kernel information retrieve (API)
210  \param[in] version pointer to buffer for retrieving version information.
211  \param[in] id_buf pointer to buffer for retrieving kernel identification string.
212  \param[in] id_size size of buffer for kernel identification string.
213 */
214 #if (!defined(EVR_RTX_DISABLE) && (OS_EVR_KERNEL != 0) && !defined(EVR_RTX_KERNEL_GET_INFO_DISABLE))
215 extern void EvrRtxKernelGetInfo (osVersion_t *version, char *id_buf, uint32_t id_size);
216 #else
217 #define EvrRtxKernelGetInfo(version, id_buf, id_size)
218 #endif
219 
220 /**
221  \brief Event on successful RTOS kernel information retrieve (Op)
222  \param[in] version pointer to buffer for retrieving version information.
223  \param[in] id_buf pointer to buffer for retrieving kernel identification string.
224  \param[in] id_size size of buffer for kernel identification string.
225 */
226 #if (!defined(EVR_RTX_DISABLE) && (OS_EVR_KERNEL != 0) && !defined(EVR_RTX_KERNEL_INFO_RETRIEVED_DISABLE))
227 extern void EvrRtxKernelInfoRetrieved (const osVersion_t *version, const char *id_buf, uint32_t id_size);
228 #else
229 #define EvrRtxKernelInfoRetrieved(version, id_buf, id_size)
230 #endif
231 
232 /**
233  \brief Event on current RTOS Kernel state retrieve (API)
234  \param[in] state current RTOS Kernel state.
235 */
236 #if (!defined(EVR_RTX_DISABLE) && (OS_EVR_KERNEL != 0) && !defined(EVR_RTX_KERNEL_GET_STATE_DISABLE))
237 extern void EvrRtxKernelGetState (osKernelState_t state);
238 #else
239 #define EvrRtxKernelGetState(state)
240 #endif
241 
242 /**
243  \brief Event on RTOS Kernel scheduler start (API)
244 */
245 #if (!defined(EVR_RTX_DISABLE) && (OS_EVR_KERNEL != 0) && !defined(EVR_RTX_KERNEL_START_DISABLE))
246 extern void EvrRtxKernelStart (void);
247 #else
248 #define EvrRtxKernelStart()
249 #endif
250 
251 /**
252  \brief Event on successful RTOS Kernel scheduler start (Op)
253 */
254 #if (!defined(EVR_RTX_DISABLE) && (OS_EVR_KERNEL != 0) && !defined(EVR_RTX_KERNEL_STARTED_DISABLE))
255 extern void EvrRtxKernelStarted (void);
256 #else
257 #define EvrRtxKernelStarted()
258 #endif
259 
260 /**
261  \brief Event on RTOS Kernel scheduler lock (API)
262 */
263 #if (!defined(EVR_RTX_DISABLE) && (OS_EVR_KERNEL != 0) && !defined(EVR_RTX_KERNEL_LOCK_DISABLE))
264 extern void EvrRtxKernelLock (void);
265 #else
266 #define EvrRtxKernelLock()
267 #endif
268 
269 /**
270  \brief Event on successful RTOS Kernel scheduler lock (Op)
271  \param[in] lock previous lock state (1 - locked, 0 - not locked).
272 */
273 #if (!defined(EVR_RTX_DISABLE) && (OS_EVR_KERNEL != 0) && !defined(EVR_RTX_KERNEL_LOCKED_DISABLE))
274 extern void EvrRtxKernelLocked (int32_t lock);
275 #else
276 #define EvrRtxKernelLocked(lock)
277 #endif
278 
279 /**
280  \brief Event on RTOS Kernel scheduler unlock (API)
281 */
282 #if (!defined(EVR_RTX_DISABLE) && (OS_EVR_KERNEL != 0) && !defined(EVR_RTX_KERNEL_UNLOCK_DISABLE))
283 extern void EvrRtxKernelUnlock (void);
284 #else
285 #define EvrRtxKernelUnlock()
286 #endif
287 
288 /**
289  \brief Event on successful RTOS Kernel scheduler unlock (Op)
290  \param[in] lock previous lock state (1 - locked, 0 - not locked).
291 */
292 #if (!defined(EVR_RTX_DISABLE) && (OS_EVR_KERNEL != 0) && !defined(EVR_RTX_KERNEL_UNLOCKED_DISABLE))
293 extern void EvrRtxKernelUnlocked (int32_t lock);
294 #else
295 #define EvrRtxKernelUnlocked(lock)
296 #endif
297 
298 /**
299  \brief Event on RTOS Kernel scheduler lock state restore (API)
300  \param[in] lock lock state obtained by \ref osKernelLock or \ref osKernelUnlock.
301 */
302 #if (!defined(EVR_RTX_DISABLE) && (OS_EVR_KERNEL != 0) && !defined(EVR_RTX_KERNEL_RESTORE_LOCK_DISABLE))
303 extern void EvrRtxKernelRestoreLock (int32_t lock);
304 #else
305 #define EvrRtxKernelRestoreLock(lock)
306 #endif
307 
308 /**
309  \brief Event on successful RTOS Kernel scheduler lock state restore (Op)
310  \param[in] lock new lock state (1 - locked, 0 - not locked).
311 */
312 #if (!defined(EVR_RTX_DISABLE) && (OS_EVR_KERNEL != 0) && !defined(EVR_RTX_KERNEL_LOCK_RESTORED_DISABLE))
313 extern void EvrRtxKernelLockRestored (int32_t lock);
314 #else
315 #define EvrRtxKernelLockRestored(lock)
316 #endif
317 
318 /**
319  \brief Event on RTOS Kernel scheduler suspend (API)
320 */
321 #if (!defined(EVR_RTX_DISABLE) && (OS_EVR_KERNEL != 0) && !defined(EVR_RTX_KERNEL_SUSPEND_DISABLE))
322 extern void EvrRtxKernelSuspend (void);
323 #else
324 #define EvrRtxKernelSuspend()
325 #endif
326 
327 /**
328  \brief Event on successful RTOS Kernel scheduler suspend (Op)
329  \param[in] sleep_ticks time in ticks, for how long the system can sleep or power-down.
330 */
331 #if (!defined(EVR_RTX_DISABLE) && (OS_EVR_KERNEL != 0) && !defined(EVR_RTX_KERNEL_SUSPENDED_DISABLE))
332 extern void EvrRtxKernelSuspended (uint32_t sleep_ticks);
333 #else
334 #define EvrRtxKernelSuspended(sleep_ticks)
335 #endif
336 
337 /**
338  \brief Event on RTOS Kernel scheduler resume (API)
339  \param[in] sleep_ticks time in ticks, for how long the system was in sleep or power-down mode.
340 */
341 #if (!defined(EVR_RTX_DISABLE) && (OS_EVR_KERNEL != 0) && !defined(EVR_RTX_KERNEL_RESUME_DISABLE))
342 extern void EvrRtxKernelResume (uint32_t sleep_ticks);
343 #else
344 #define EvrRtxKernelResume(sleep_ticks)
345 #endif
346 
347 /**
348  \brief Event on successful RTOS Kernel scheduler resume (Op)
349 */
350 #if (!defined(EVR_RTX_DISABLE) && (OS_EVR_KERNEL != 0) && !defined(EVR_RTX_KERNEL_RESUMED_DISABLE))
351 extern void EvrRtxKernelResumed (void);
352 #else
353 #define EvrRtxKernelResumed()
354 #endif
355 
356 /**
357  \brief Event on RTOS kernel tick count retrieve (API)
358  \param[in] count RTOS kernel current tick count.
359 */
360 #if (!defined(EVR_RTX_DISABLE) && (OS_EVR_KERNEL != 0) && !defined(EVR_RTX_KERNEL_GET_TICK_COUNT_DISABLE))
361 extern void EvrRtxKernelGetTickCount (uint32_t count);
362 #else
363 #define EvrRtxKernelGetTickCount(count)
364 #endif
365 
366 /**
367  \brief Event on RTOS kernel tick frequency retrieve (API)
368  \param[in] freq frequency of the kernel tick.
369 */
370 #if (!defined(EVR_RTX_DISABLE) && (OS_EVR_KERNEL != 0) && !defined(EVR_RTX_KERNEL_GET_TICK_FREQ_DISABLE))
371 extern void EvrRtxKernelGetTickFreq (uint32_t freq);
372 #else
373 #define EvrRtxKernelGetTickFreq(freq)
374 #endif
375 
376 /**
377  \brief Event on RTOS kernel system timer count retrieve (API)
378  \param[in] count RTOS kernel current system timer count as 32-bit value.
379 */
380 #if (!defined(EVR_RTX_DISABLE) && (OS_EVR_KERNEL != 0) && !defined(EVR_RTX_KERNEL_GET_SYS_TIMER_COUNT_DISABLE))
381 extern void EvrRtxKernelGetSysTimerCount (uint32_t count);
382 #else
383 #define EvrRtxKernelGetSysTimerCount(count)
384 #endif
385 
386 /**
387  \brief Event on RTOS kernel system timer frequency retrieve (API)
388  \param[in] freq frequency of the system timer.
389 */
390 #if (!defined(EVR_RTX_DISABLE) && (OS_EVR_KERNEL != 0) && !defined(EVR_RTX_KERNEL_GET_SYS_TIMER_FREQ_DISABLE))
391 extern void EvrRtxKernelGetSysTimerFreq (uint32_t freq);
392 #else
393 #define EvrRtxKernelGetSysTimerFreq(freq)
394 #endif
395 
396 
397 // ==== Thread Events ====
398 
399 /**
400  \brief Event on thread error (Error)
401  \param[in] thread_id thread ID obtained by \ref osThreadNew or \ref osThreadGetId or NULL when ID is unknown.
402  \param[in] status extended execution status.
403 */
404 #if (!defined(EVR_RTX_DISABLE) && (OS_EVR_THREAD != 0) && !defined(EVR_RTX_THREAD_ERROR_DISABLE))
405 extern void EvrRtxThreadError (osThreadId_t thread_id, int32_t status);
406 #else
407 #define EvrRtxThreadError(thread_id, status)
408 #endif
409 
410 /**
411  \brief Event on thread create and intialize (API)
412  \param[in] func thread function.
413  \param[in] argument pointer that is passed to the thread function as start argument.
414  \param[in] attr thread attributes.
415 */
416 #if (!defined(EVR_RTX_DISABLE) && (OS_EVR_THREAD != 0) && !defined(EVR_RTX_THREAD_NEW_DISABLE))
417 extern void EvrRtxThreadNew (osThreadFunc_t func, void *argument, const osThreadAttr_t *attr);
418 #else
419 #define EvrRtxThreadNew(func, argument, attr)
420 #endif
421 
422 /**
423  \brief Event on successful thread create (Op)
424  \param[in] thread_id thread ID obtained by \ref osThreadNew or \ref osThreadGetId.
425  \param[in] thread_addr thread entry address.
426  \param[in] name pointer to thread object name.
427 */
428 #if (!defined(EVR_RTX_DISABLE) && (OS_EVR_THREAD != 0) && !defined(EVR_RTX_THREAD_CREATED_DISABLE))
429 extern void EvrRtxThreadCreated (osThreadId_t thread_id, uint32_t thread_addr, const char *name);
430 #else
431 #define EvrRtxThreadCreated(thread_id, thread_addr, name)
432 #endif
433 
434 /**
435  \brief Event on thread name retrieve (API)
436  \param[in] thread_id thread ID obtained by \ref osThreadNew or \ref osThreadGetId.
437  \param[in] name pointer to thread object name.
438 */
439 #if (!defined(EVR_RTX_DISABLE) && (OS_EVR_THREAD != 0) && !defined(EVR_RTX_THREAD_GET_NAME_DISABLE))
440 extern void EvrRtxThreadGetName (osThreadId_t thread_id, const char *name);
441 #else
442 #define EvrRtxThreadGetName(thread_id, name)
443 #endif
444 
445 /**
446  \brief Event on current running thread ID retrieve (API)
447  \param[in] thread_id thread ID obtained by \ref osThreadNew or \ref osThreadGetId.
448 */
449 #if (!defined(EVR_RTX_DISABLE) && (OS_EVR_THREAD != 0) && !defined(EVR_RTX_THREAD_GET_ID_DISABLE))
450 extern void EvrRtxThreadGetId (osThreadId_t thread_id);
451 #else
452 #define EvrRtxThreadGetId(thread_id)
453 #endif
454 
455 /**
456  \brief Event on thread state retrieve (API)
457  \param[in] thread_id thread ID obtained by \ref osThreadNew or \ref osThreadGetId.
458  \param[in] state current thread state of the specified thread.
459 */
460 #if (!defined(EVR_RTX_DISABLE) && (OS_EVR_THREAD != 0) && !defined(EVR_RTX_THREAD_GET_STATE_DISABLE))
461 extern void EvrRtxThreadGetState (osThreadId_t thread_id, osThreadState_t state);
462 #else
463 #define EvrRtxThreadGetState(thread_id, state)
464 #endif
465 
466 /**
467  \brief Event on thread stack size retrieve (API)
468  \param[in] thread_id thread ID obtained by \ref osThreadNew or \ref osThreadGetId.
469  \param[in] stack_size stack size in bytes.
470 */
471 #if (!defined(EVR_RTX_DISABLE) && (OS_EVR_THREAD != 0) && !defined(EVR_RTX_THREAD_GET_STACK_SIZE_DISABLE))
472 extern void EvrRtxThreadGetStackSize (osThreadId_t thread_id, uint32_t stack_size);
473 #else
474 #define EvrRtxThreadGetStackSize(thread_id, stack_size)
475 #endif
476 
477 /**
478  \brief Event on available stack space retrieve (API)
479  \param[in] thread_id thread ID obtained by \ref osThreadNew or \ref osThreadGetId.
480  \param[in] stack_space remaining stack space in bytes.
481 */
482 #if (!defined(EVR_RTX_DISABLE) && (OS_EVR_THREAD != 0) && !defined(EVR_RTX_THREAD_GET_STACK_SPACE_DISABLE))
483 extern void EvrRtxThreadGetStackSpace (osThreadId_t thread_id, uint32_t stack_space);
484 #else
485 #define EvrRtxThreadGetStackSpace(thread_id, stack_space)
486 #endif
487 
488 /**
489  \brief Event on thread priority set (API)
490  \param[in] thread_id thread ID obtained by \ref osThreadNew or \ref osThreadGetId.
491  \param[in] priority new priority value for the thread function.
492 */
493 #if (!defined(EVR_RTX_DISABLE) && (OS_EVR_THREAD != 0) && !defined(EVR_RTX_THREAD_SET_PRIORITY_DISABLE))
494 extern void EvrRtxThreadSetPriority (osThreadId_t thread_id, osPriority_t priority);
495 #else
496 #define EvrRtxThreadSetPriority(thread_id, priority)
497 #endif
498 
499 /**
500  \brief Event on thread priority updated (Op)
501  \param[in] thread_id thread ID obtained by \ref osThreadNew or \ref osThreadGetId.
502  \param[in] priority new priority value for the thread function.
503 */
504 #if (!defined(EVR_RTX_DISABLE) && (OS_EVR_THREAD != 0) && !defined(EVR_RTX_THREAD_PRIORITY_UPDATED_DISABLE))
505 extern void EvrRtxThreadPriorityUpdated (osThreadId_t thread_id, osPriority_t priority);
506 #else
507 #define EvrRtxThreadPriorityUpdated(thread_id, priority)
508 #endif
509 
510 /**
511  \brief Event on thread priority retrieve (API)
512  \param[in] thread_id thread ID obtained by \ref osThreadNew or \ref osThreadGetId.
513  \param[in] priority current priority value of the specified thread.
514 */
515 #if (!defined(EVR_RTX_DISABLE) && (OS_EVR_THREAD != 0) && !defined(EVR_RTX_THREAD_GET_PRIORITY_DISABLE))
516 extern void EvrRtxThreadGetPriority (osThreadId_t thread_id, osPriority_t priority);
517 #else
518 #define EvrRtxThreadGetPriority(thread_id, priority)
519 #endif
520 
521 /**
522  \brief Event on thread yield (API)
523 */
524 #if (!defined(EVR_RTX_DISABLE) && (OS_EVR_THREAD != 0) && !defined(EVR_RTX_THREAD_YIELD_DISABLE))
525 extern void EvrRtxThreadYield (void);
526 #else
527 #define EvrRtxThreadYield()
528 #endif
529 
530 /**
531  \brief Event on thread suspend (API)
532  \param[in] thread_id thread ID obtained by \ref osThreadNew or \ref osThreadGetId.
533 */
534 #if (!defined(EVR_RTX_DISABLE) && (OS_EVR_THREAD != 0) && !defined(EVR_RTX_THREAD_SUSPEND_DISABLE))
535 extern void EvrRtxThreadSuspend (osThreadId_t thread_id);
536 #else
537 #define EvrRtxThreadSuspend(thread_id)
538 #endif
539 
540 /**
541  \brief Event on successful thread suspend (Op)
542  \param[in] thread_id thread ID obtained by \ref osThreadNew or \ref osThreadGetId.
543 */
544 #if (!defined(EVR_RTX_DISABLE) && (OS_EVR_THREAD != 0) && !defined(EVR_RTX_THREAD_SUSPENDED_DISABLE))
545 extern void EvrRtxThreadSuspended (osThreadId_t thread_id);
546 #else
547 #define EvrRtxThreadSuspended(thread_id)
548 #endif
549 
550 /**
551  \brief Event on thread resume (API)
552  \param[in] thread_id thread ID obtained by \ref osThreadNew or \ref osThreadGetId.
553 */
554 #if (!defined(EVR_RTX_DISABLE) && (OS_EVR_THREAD != 0) && !defined(EVR_RTX_THREAD_RESUME_DISABLE))
555 extern void EvrRtxThreadResume (osThreadId_t thread_id);
556 #else
557 #define EvrRtxThreadResume(thread_id)
558 #endif
559 
560 /**
561  \brief Event on successful thread resume (Op)
562  \param[in] thread_id thread ID obtained by \ref osThreadNew or \ref osThreadGetId.
563 */
564 #if (!defined(EVR_RTX_DISABLE) && (OS_EVR_THREAD != 0) && !defined(EVR_RTX_THREAD_RESUMED_DISABLE))
565 extern void EvrRtxThreadResumed (osThreadId_t thread_id);
566 #else
567 #define EvrRtxThreadResumed(thread_id)
568 #endif
569 
570 /**
571  \brief Event on thread detach (API)
572  \param[in] thread_id thread ID obtained by \ref osThreadNew or \ref osThreadGetId.
573 */
574 #if (!defined(EVR_RTX_DISABLE) && (OS_EVR_THREAD != 0) && !defined(EVR_RTX_THREAD_DETACH_DISABLE))
575 extern void EvrRtxThreadDetach (osThreadId_t thread_id);
576 #else
577 #define EvrRtxThreadDetach(thread_id)
578 #endif
579 
580 /**
581  \brief Event on successful thread detach (Op)
582  \param[in] thread_id thread ID obtained by \ref osThreadNew or \ref osThreadGetId.
583 */
584 #if (!defined(EVR_RTX_DISABLE) && (OS_EVR_THREAD != 0) && !defined(EVR_RTX_THREAD_DETACHED_DISABLE))
585 extern void EvrRtxThreadDetached (osThreadId_t thread_id);
586 #else
587 #define EvrRtxThreadDetached(thread_id)
588 #endif
589 
590 /**
591  \brief Event on thread join (API)
592  \param[in] thread_id thread ID obtained by \ref osThreadNew or \ref osThreadGetId.
593 */
594 #if (!defined(EVR_RTX_DISABLE) && (OS_EVR_THREAD != 0) && !defined(EVR_RTX_THREAD_JOIN_DISABLE))
595 extern void EvrRtxThreadJoin (osThreadId_t thread_id);
596 #else
597 #define EvrRtxThreadJoin(thread_id)
598 #endif
599 
600 /**
601  \brief Event on pending thread join (Op)
602  \param[in] thread_id thread ID obtained by \ref osThreadNew or \ref osThreadGetId.
603 */
604 #if (!defined(EVR_RTX_DISABLE) && (OS_EVR_THREAD != 0) && !defined(EVR_RTX_THREAD_JOIN_PENDING_DISABLE))
605 extern void EvrRtxThreadJoinPending (osThreadId_t thread_id);
606 #else
607 #define EvrRtxThreadJoinPending(thread_id)
608 #endif
609 
610 /**
611  \brief Event on successful thread join (Op)
612  \param[in] thread_id thread ID obtained by \ref osThreadNew or \ref osThreadGetId.
613 */
614 #if (!defined(EVR_RTX_DISABLE) && (OS_EVR_THREAD != 0) && !defined(EVR_RTX_THREAD_JOINED_DISABLE))
615 extern void EvrRtxThreadJoined (osThreadId_t thread_id);
616 #else
617 #define EvrRtxThreadJoined(thread_id)
618 #endif
619 
620 /**
621  \brief Event on thread execution block (Detail)
622  \param[in] thread_id thread ID obtained by \ref osThreadNew or \ref osThreadGetId.
623  \param[in] timeout \ref CMSIS_RTOS_TimeOutValue or 0 in case of no time-out.
624 */
625 #if (!defined(EVR_RTX_DISABLE) && (OS_EVR_THREAD != 0) && !defined(EVR_RTX_THREAD_BLOCKED_DISABLE))
626 extern void EvrRtxThreadBlocked (osThreadId_t thread_id, uint32_t timeout);
627 #else
628 #define EvrRtxThreadBlocked(thread_id, timeout)
629 #endif
630 
631 /**
632  \brief Event on thread execution unblock (Detail)
633  \param[in] thread_id thread ID obtained by \ref osThreadNew or \ref osThreadGetId.
634  \param[in] ret_val extended execution status of the thread.
635 */
636 #if (!defined(EVR_RTX_DISABLE) && (OS_EVR_THREAD != 0) && !defined(EVR_RTX_THREAD_UNBLOCKED_DISABLE))
637 extern void EvrRtxThreadUnblocked (osThreadId_t thread_id, uint32_t ret_val);
638 #else
639 #define EvrRtxThreadUnblocked(thread_id, ret_val)
640 #endif
641 
642 /**
643  \brief Event on running thread pre-emption (Detail)
644  \param[in] thread_id thread ID obtained by \ref osThreadNew or \ref osThreadGetId.
645 */
646 #if (!defined(EVR_RTX_DISABLE) && (OS_EVR_THREAD != 0) && !defined(EVR_RTX_THREAD_PREEMPTED_DISABLE))
647 extern void EvrRtxThreadPreempted (osThreadId_t thread_id);
648 #else
649 #define EvrRtxThreadPreempted(thread_id)
650 #endif
651 
652 /**
653  \brief Event on running thread switch (Op)
654  \param[in] thread_id thread ID obtained by \ref osThreadNew or \ref osThreadGetId.
655 */
656 #if (!defined(EVR_RTX_DISABLE) && (OS_EVR_THREAD != 0) && !defined(EVR_RTX_THREAD_SWITCHED_DISABLE))
657 extern void EvrRtxThreadSwitched (osThreadId_t thread_id);
658 #else
659 #define EvrRtxThreadSwitched(thread_id)
660 #endif
661 
662 /**
663  \brief Event on thread exit (API)
664 */
665 #if (!defined(EVR_RTX_DISABLE) && (OS_EVR_THREAD != 0) && !defined(EVR_RTX_THREAD_EXIT_DISABLE))
666 extern void EvrRtxThreadExit (void);
667 #else
668 #define EvrRtxThreadExit()
669 #endif
670 
671 /**
672  \brief Event on thread terminate (API)
673  \param[in] thread_id thread ID obtained by \ref osThreadNew or \ref osThreadGetId.
674 */
675 #if (!defined(EVR_RTX_DISABLE) && (OS_EVR_THREAD != 0) && !defined(EVR_RTX_THREAD_TERMINATE_DISABLE))
676 extern void EvrRtxThreadTerminate (osThreadId_t thread_id);
677 #else
678 #define EvrRtxThreadTerminate(thread_id)
679 #endif
680 
681 /**
682  \brief Event on successful thread terminate (Op)
683  \param[in] thread_id thread ID obtained by \ref osThreadNew or \ref osThreadGetId.
684 */
685 #if (!defined(EVR_RTX_DISABLE) && (OS_EVR_THREAD != 0) && !defined(EVR_RTX_THREAD_DESTROYED_DISABLE))
686 extern void EvrRtxThreadDestroyed (osThreadId_t thread_id);
687 #else
688 #define EvrRtxThreadDestroyed(thread_id)
689 #endif
690 
691 /**
692  \brief Event on active thread count retrieve (API)
693  \param[in] count number of active threads.
694 */
695 #if (!defined(EVR_RTX_DISABLE) && (OS_EVR_THREAD != 0) && !defined(EVR_RTX_THREAD_GET_COUNT_DISABLE))
696 extern void EvrRtxThreadGetCount (uint32_t count);
697 #else
698 #define EvrRtxThreadGetCount(count)
699 #endif
700 
701 /**
702  \brief Event on active threads enumerate (API)
703  \param[in] thread_array pointer to array for retrieving thread IDs.
704  \param[in] array_items maximum number of items in array for retrieving thread IDs.
705  \param[in] count number of enumerated threads.
706 */
707 #if (!defined(EVR_RTX_DISABLE) && (OS_EVR_THREAD != 0) && !defined(EVR_RTX_THREAD_ENUMERATE_DISABLE))
708 extern void EvrRtxThreadEnumerate (osThreadId_t *thread_array, uint32_t array_items, uint32_t count);
709 #else
710 #define EvrRtxThreadEnumerate(thread_array, array_items, count)
711 #endif
712 
713 
714 // ==== Thread Flags Events ====
715 
716 /**
717  \brief Event on thread flags error (Error)
718  \param[in] thread_id thread ID obtained by \ref osThreadNew or \ref osThreadGetId or NULL when ID is unknown.
719  \param[in] status extended execution status.
720 */
721 #if (!defined(EVR_RTX_DISABLE) && (OS_EVR_THFLAGS != 0) && !defined(EVR_RTX_THREAD_FLAGS_ERROR_DISABLE))
722 extern void EvrRtxThreadFlagsError (osThreadId_t thread_id, int32_t status);
723 #else
724 #define EvrRtxThreadFlagsError(thread_id, status)
725 #endif
726 
727 /**
728  \brief Event on thread flags set (API)
729  \param[in] thread_id thread ID obtained by \ref osThreadNew or \ref osThreadGetId.
730  \param[in] flags flags of the thread that shall be set.
731 */
732 #if (!defined(EVR_RTX_DISABLE) && (OS_EVR_THFLAGS != 0) && !defined(EVR_RTX_THREAD_FLAGS_SET_DISABLE))
733 extern void EvrRtxThreadFlagsSet (osThreadId_t thread_id, uint32_t flags);
734 #else
735 #define EvrRtxThreadFlagsSet(thread_id, flags)
736 #endif
737 
738 /**
739  \brief Event on successful thread flags set (Op)
740  \param[in] thread_id thread ID obtained by \ref osThreadNew or \ref osThreadGetId.
741  \param[in] thread_flags thread flags after setting.
742 */
743 #if (!defined(EVR_RTX_DISABLE) && (OS_EVR_THFLAGS != 0) && !defined(EVR_RTX_THREAD_FLAGS_SET_DONE_DISABLE))
744 extern void EvrRtxThreadFlagsSetDone (osThreadId_t thread_id, uint32_t thread_flags);
745 #else
746 #define EvrRtxThreadFlagsSetDone(thread_id, thread_flags)
747 #endif
748 
749 /**
750  \brief Event on thread flags clear (API)
751  \param[in] flags flags of the thread that shall be cleared.
752 */
753 #if (!defined(EVR_RTX_DISABLE) && (OS_EVR_THFLAGS != 0) && !defined(EVR_RTX_THREAD_FLAGS_CLEAR_DISABLE))
754 extern void EvrRtxThreadFlagsClear (uint32_t flags);
755 #else
756 #define EvrRtxThreadFlagsClear(flags)
757 #endif
758 
759 /**
760  \brief Event on successful thread flags clear (Op)
761  \param[in] thread_flags thread flags before clearing.
762 */
763 #if (!defined(EVR_RTX_DISABLE) && (OS_EVR_THFLAGS != 0) && !defined(EVR_RTX_THREAD_FLAGS_CLEAR_DONE_DISABLE))
764 extern void EvrRtxThreadFlagsClearDone (uint32_t thread_flags);
765 #else
766 #define EvrRtxThreadFlagsClearDone(thread_flags)
767 #endif
768 
769 /**
770  \brief Event on thread flags retrieve (API)
771  \param[in] thread_flags current thread flags.
772 */
773 #if (!defined(EVR_RTX_DISABLE) && (OS_EVR_THFLAGS != 0) && !defined(EVR_RTX_THREAD_FLAGS_GET_DISABLE))
774 extern void EvrRtxThreadFlagsGet (uint32_t thread_flags);
775 #else
776 #define EvrRtxThreadFlagsGet(thread_flags)
777 #endif
778 
779 /**
780  \brief Event on wait for thread flags (API)
781  \param[in] flags flags to wait for.
782  \param[in] options flags options (osFlagsXxxx).
783  \param[in] timeout \ref CMSIS_RTOS_TimeOutValue or 0 in case of no time-out.
784 */
785 #if (!defined(EVR_RTX_DISABLE) && (OS_EVR_THFLAGS != 0) && !defined(EVR_RTX_THREAD_FLAGS_WAIT_DISABLE))
786 extern void EvrRtxThreadFlagsWait (uint32_t flags, uint32_t options, uint32_t timeout);
787 #else
788 #define EvrRtxThreadFlagsWait(flags, options, timeout)
789 #endif
790 
791 /**
792  \brief Event on pending wait for thread flags (Op)
793  \param[in] flags flags to wait for.
794  \param[in] options flags options (osFlagsXxxx).
795  \param[in] timeout \ref CMSIS_RTOS_TimeOutValue or 0 in case of no time-out.
796 */
797 #if (!defined(EVR_RTX_DISABLE) && (OS_EVR_THFLAGS != 0) && !defined(EVR_RTX_THREAD_FLAGS_WAIT_PENDING_DISABLE))
798 extern void EvrRtxThreadFlagsWaitPending (uint32_t flags, uint32_t options, uint32_t timeout);
799 #else
800 #define EvrRtxThreadFlagsWaitPending(flags, options, timeout)
801 #endif
802 
803 /**
804  \brief Event on wait timeout for thread flags (Op)
805  \param[in] thread_id thread ID obtained by \ref osThreadNew or \ref osThreadGetId.
806 */
807 #if (!defined(EVR_RTX_DISABLE) && (OS_EVR_THFLAGS != 0) && !defined(EVR_RTX_THREAD_FLAGS_WAIT_TIMEOUT_DISABLE))
808 extern void EvrRtxThreadFlagsWaitTimeout (osThreadId_t thread_id);
809 #else
810 #define EvrRtxThreadFlagsWaitTimeout(thread_id)
811 #endif
812 
813 /**
814  \brief Event on successful wait for thread flags (Op)
815  \param[in] flags flags to wait for.
816  \param[in] options flags options (osFlagsXxxx).
817  \param[in] thread_flags thread flags before clearing.
818  \param[in] thread_id thread ID obtained by \ref osThreadNew or \ref osThreadGetId.
819 */
820 #if (!defined(EVR_RTX_DISABLE) && (OS_EVR_THFLAGS != 0) && !defined(EVR_RTX_THREAD_FLAGS_WAIT_COMPLETED_DISABLE))
821 extern void EvrRtxThreadFlagsWaitCompleted (uint32_t flags, uint32_t options, uint32_t thread_flags, osThreadId_t thread_id);
822 #else
823 #define EvrRtxThreadFlagsWaitCompleted(flags, options, thread_flags, thread_id)
824 #endif
825 
826 /**
827  \brief Event on unsuccessful wait for thread flags (Op)
828  \param[in] flags flags to wait for.
829  \param[in] options flags options (osFlagsXxxx).
830 */
831 #if (!defined(EVR_RTX_DISABLE) && (OS_EVR_THFLAGS != 0) && !defined(EVR_RTX_THREAD_FLAGS_WAIT_NOT_COMPLETED_DISABLE))
832 extern void EvrRtxThreadFlagsWaitNotCompleted (uint32_t flags, uint32_t options);
833 #else
834 #define EvrRtxThreadFlagsWaitNotCompleted(flags, options)
835 #endif
836 
837 
838 // ==== Generic Wait Events ====
839 
840 /**
841  \brief Event on delay error (Error)
842  \param[in] status extended execution status.
843 */
844 #if (!defined(EVR_RTX_DISABLE) && (OS_EVR_WAIT != 0) && !defined(EVR_RTX_DELAY_ERROR_DISABLE))
845 extern void EvrRtxDelayError (int32_t status);
846 #else
847 #define EvrRtxDelayError(status)
848 #endif
849 
850 /**
851  \brief Event on delay for specified time (API)
852  \param[in] ticks \ref CMSIS_RTOS_TimeOutValue "time ticks" value.
853 */
854 #if (!defined(EVR_RTX_DISABLE) && (OS_EVR_WAIT != 0) && !defined(EVR_RTX_DELAY_DISABLE))
855 extern void EvrRtxDelay (uint32_t ticks);
856 #else
857 #define EvrRtxDelay(ticks)
858 #endif
859 
860 /**
861  \brief Event on delay until specified time (API)
862  \param[in] ticks absolute time in ticks.
863 */
864 #if (!defined(EVR_RTX_DISABLE) && (OS_EVR_WAIT != 0) && !defined(EVR_RTX_DELAY_UNTIL_DISABLE))
865 extern void EvrRtxDelayUntil (uint32_t ticks);
866 #else
867 #define EvrRtxDelayUntil(ticks)
868 #endif
869 
870 /**
871  \brief Event on delay started (Op)
872  \param[in] ticks \ref CMSIS_RTOS_TimeOutValue "time ticks" value.
873 */
874 #if (!defined(EVR_RTX_DISABLE) && (OS_EVR_WAIT != 0) && !defined(EVR_RTX_DELAY_STARTED_DISABLE))
875 extern void EvrRtxDelayStarted (uint32_t ticks);
876 #else
877 #define EvrRtxDelayStarted(ticks)
878 #endif
879 
880 /**
881  \brief Event on delay until specified time started (Op)
882  \param[in] ticks \ref CMSIS_RTOS_TimeOutValue "time ticks" value.
883 */
884 #if (!defined(EVR_RTX_DISABLE) && (OS_EVR_WAIT != 0) && !defined(EVR_RTX_DELAY_UNTIL_STARTED_DISABLE))
885 extern void EvrRtxDelayUntilStarted (uint32_t ticks);
886 #else
887 #define EvrRtxDelayUntilStarted(ticks)
888 #endif
889 
890 /**
891  \brief Event on delay completed (Op)
892  \param[in] thread_id thread ID obtained by \ref osThreadNew or \ref osThreadGetId.
893 */
894 #if (!defined(EVR_RTX_DISABLE) && (OS_EVR_WAIT != 0) && !defined(EVR_RTX_DELAY_COMPLETED_DISABLE))
895 extern void EvrRtxDelayCompleted (osThreadId_t thread_id);
896 #else
897 #define EvrRtxDelayCompleted(thread_id)
898 #endif
899 
900 
901 // ==== Timer Events ====
902 
903 /**
904  \brief Event on timer error (Error)
905  \param[in] timer_id timer ID obtained by \ref osTimerNew or NULL when ID is unknown.
906  \param[in] status extended execution status.
907 */
908 #if (!defined(EVR_RTX_DISABLE) && (OS_EVR_TIMER != 0) && !defined(EVR_RTX_TIMER_ERROR_DISABLE))
909 extern void EvrRtxTimerError (osTimerId_t timer_id, int32_t status);
910 #else
911 #define EvrRtxTimerError(timer_id, status)
912 #endif
913 
914 /**
915  \brief Event on timer callback call (Op)
916  \param[in] func start address of a timer call back function.
917  \param[in] argument argument to the timer call back function.
918 */
919 #if (!defined(EVR_RTX_DISABLE) && (OS_EVR_TIMER != 0) && !defined(EVR_RTX_TIMER_CALLBACK_DISABLE))
920 extern void EvrRtxTimerCallback (osTimerFunc_t func, void *argument);
921 #else
922 #define EvrRtxTimerCallback(func, argument)
923 #endif
924 
925 /**
926  \brief Event on timer create and initialize (API)
927  \param[in] func start address of a timer call back function.
928  \param[in] type osTimerOnce for one-shot or osTimerPeriodic for periodic behavior.
929  \param[in] argument argument to the timer call back function.
930  \param[in] attr timer attributes.
931 */
932 #if (!defined(EVR_RTX_DISABLE) && (OS_EVR_TIMER != 0) && !defined(EVR_RTX_TIMER_NEW_DISABLE))
933 extern void EvrRtxTimerNew (osTimerFunc_t func, osTimerType_t type, void *argument, const osTimerAttr_t *attr);
934 #else
935 #define EvrRtxTimerNew(func, type, argument, attr)
936 #endif
937 
938 /**
939  \brief Event on successful timer create (Op)
940  \param[in] timer_id timer ID obtained by \ref osTimerNew.
941  \param[in] name pointer to timer object name.
942 */
943 #if (!defined(EVR_RTX_DISABLE) && (OS_EVR_TIMER != 0) && !defined(EVR_RTX_TIMER_CREATED_DISABLE))
944 extern void EvrRtxTimerCreated (osTimerId_t timer_id, const char *name);
945 #else
946 #define EvrRtxTimerCreated(timer_id, name)
947 #endif
948 
949 /**
950  \brief Event on timer name retrieve (API)
951  \param[in] timer_id timer ID obtained by \ref osTimerNew.
952  \param[in] name pointer to timer object name.
953 */
954 #if (!defined(EVR_RTX_DISABLE) && (OS_EVR_TIMER != 0) && !defined(EVR_RTX_TIMER_GET_NAME_DISABLE))
955 extern void EvrRtxTimerGetName (osTimerId_t timer_id, const char *name);
956 #else
957 #define EvrRtxTimerGetName(timer_id, name)
958 #endif
959 
960 /**
961  \brief Event on timer start (API)
962  \param[in] timer_id timer ID obtained by \ref osTimerNew.
963  \param[in] ticks \ref CMSIS_RTOS_TimeOutValue "time ticks" value of the timer.
964 */
965 #if (!defined(EVR_RTX_DISABLE) && (OS_EVR_TIMER != 0) && !defined(EVR_RTX_TIMER_START_DISABLE))
966 extern void EvrRtxTimerStart (osTimerId_t timer_id, uint32_t ticks);
967 #else
968 #define EvrRtxTimerStart(timer_id, ticks)
969 #endif
970 
971 /**
972  \brief Event on successful timer start (Op)
973  \param[in] timer_id timer ID obtained by \ref osTimerNew.
974 */
975 #if (!defined(EVR_RTX_DISABLE) && (OS_EVR_TIMER != 0) && !defined(EVR_RTX_TIMER_STARTED_DISABLE))
976 extern void EvrRtxTimerStarted (osTimerId_t timer_id);
977 #else
978 #define EvrRtxTimerStarted(timer_id)
979 #endif
980 
981 /**
982  \brief Event on timer stop (API)
983  \param[in] timer_id timer ID obtained by \ref osTimerNew.
984 */
985 #if (!defined(EVR_RTX_DISABLE) && (OS_EVR_TIMER != 0) && !defined(EVR_RTX_TIMER_STOP_DISABLE))
986 extern void EvrRtxTimerStop (osTimerId_t timer_id);
987 #else
988 #define EvrRtxTimerStop(timer_id)
989 #endif
990 
991 /**
992  \brief Event on successful timer stop (Op)
993  \param[in] timer_id timer ID obtained by \ref osTimerNew.
994 */
995 #if (!defined(EVR_RTX_DISABLE) && (OS_EVR_TIMER != 0) && !defined(EVR_RTX_TIMER_STOPPED_DISABLE))
996 extern void EvrRtxTimerStopped (osTimerId_t timer_id);
997 #else
998 #define EvrRtxTimerStopped(timer_id)
999 #endif
1000 
1001 /**
1002  \brief Event on timer running state check (API)
1003  \param[in] timer_id timer ID obtained by \ref osTimerNew.
1004  \param[in] running running state: 0 not running, 1 running.
1005 */
1006 #if (!defined(EVR_RTX_DISABLE) && (OS_EVR_TIMER != 0) && !defined(EVR_RTX_TIMER_IS_RUNNING_DISABLE))
1007 extern void EvrRtxTimerIsRunning (osTimerId_t timer_id, uint32_t running);
1008 #else
1009 #define EvrRtxTimerIsRunning(timer_id, running)
1010 #endif
1011 
1012 /**
1013  \brief Event on timer delete (API)
1014  \param[in] timer_id timer ID obtained by \ref osTimerNew.
1015 */
1016 #if (!defined(EVR_RTX_DISABLE) && (OS_EVR_TIMER != 0) && !defined(EVR_RTX_TIMER_DELETE_DISABLE))
1017 extern void EvrRtxTimerDelete (osTimerId_t timer_id);
1018 #else
1019 #define EvrRtxTimerDelete(timer_id)
1020 #endif
1021 
1022 /**
1023  \brief Event on successful timer delete (Op)
1024  \param[in] timer_id timer ID obtained by \ref osTimerNew.
1025 */
1026 #if (!defined(EVR_RTX_DISABLE) && (OS_EVR_TIMER != 0) && !defined(EVR_RTX_TIMER_DESTROYED_DISABLE))
1027 extern void EvrRtxTimerDestroyed (osTimerId_t timer_id);
1028 #else
1029 #define EvrRtxTimerDestroyed(timer_id)
1030 #endif
1031 
1032 
1033 // ==== Event Flags Events ====
1034 
1035 /**
1036  \brief Event on event flags error (Error)
1037  \param[in] ef_id event flags ID obtained by \ref osEventFlagsNew or NULL when ID is unknown.
1038  \param[in] status extended execution status.
1039 */
1040 #if (!defined(EVR_RTX_DISABLE) && (OS_EVR_EVFLAGS != 0) && !defined(EVR_RTX_EVENT_FLAGS_ERROR_DISABLE))
1041 extern void EvrRtxEventFlagsError (osEventFlagsId_t ef_id, int32_t status);
1042 #else
1043 #define EvrRtxEventFlagsError(ef_id, status)
1044 #endif
1045 
1046 /**
1047  \brief Event on event flags create and initialize (API)
1048  \param[in] attr event flags attributes.
1049 */
1050 #if (!defined(EVR_RTX_DISABLE) && (OS_EVR_EVFLAGS != 0) && !defined(EVR_RTX_EVENT_FLAGS_NEW_DISABLE))
1051 extern void EvrRtxEventFlagsNew (const osEventFlagsAttr_t *attr);
1052 #else
1053 #define EvrRtxEventFlagsNew(attr)
1054 #endif
1055 
1056 /**
1057  \brief Event on successful event flags create (Op)
1058  \param[in] ef_id event flags ID obtained by \ref osEventFlagsNew.
1059  \param[in] name pointer to event flags object name.
1060 */
1061 #if (!defined(EVR_RTX_DISABLE) && (OS_EVR_EVFLAGS != 0) && !defined(EVR_RTX_EVENT_FLAGS_CREATED_DISABLE))
1062 extern void EvrRtxEventFlagsCreated (osEventFlagsId_t ef_id, const char *name);
1063 #else
1064 #define EvrRtxEventFlagsCreated(ef_id, name)
1065 #endif
1066 
1067 /**
1068  \brief Event on event flags name retrieve (API)
1069  \param[in] ef_id event flags ID obtained by \ref osEventFlagsNew.
1070  \param[in] name pointer to event flags object name.
1071 */
1072 #if (!defined(EVR_RTX_DISABLE) && (OS_EVR_EVFLAGS != 0) && !defined(EVR_RTX_EVENT_FLAGS_GET_NAME_DISABLE))
1073 extern void EvrRtxEventFlagsGetName (osEventFlagsId_t ef_id, const char *name);
1074 #else
1075 #define EvrRtxEventFlagsGetName(ef_id, name)
1076 #endif
1077 
1078 /**
1079  \brief Event on event flags set (API)
1080  \param[in] ef_id event flags ID obtained by \ref osEventFlagsNew.
1081  \param[in] flags flags that shall be set.
1082 */
1083 #if (!defined(EVR_RTX_DISABLE) && (OS_EVR_EVFLAGS != 0) && !defined(EVR_RTX_EVENT_FLAGS_SET_DISABLE))
1084 extern void EvrRtxEventFlagsSet (osEventFlagsId_t ef_id, uint32_t flags);
1085 #else
1086 #define EvrRtxEventFlagsSet(ef_id, flags)
1087 #endif
1088 
1089 /**
1090  \brief Event on successful event flags set (Op)
1091  \param[in] ef_id event flags ID obtained by \ref osEventFlagsNew.
1092  \param[in] event_flags event flags after setting.
1093 */
1094 #if (!defined(EVR_RTX_DISABLE) && (OS_EVR_EVFLAGS != 0) && !defined(EVR_RTX_EVENT_FLAGS_SET_DONE_DISABLE))
1095 extern void EvrRtxEventFlagsSetDone (osEventFlagsId_t ef_id, uint32_t event_flags);
1096 #else
1097 #define EvrRtxEventFlagsSetDone(ef_id, event_flags)
1098 #endif
1099 
1100 /**
1101  \brief Event on event flags clear (API)
1102  \param[in] ef_id event flags ID obtained by \ref osEventFlagsNew.
1103  \param[in] flags flags that shall be cleared.
1104 */
1105 #if (!defined(EVR_RTX_DISABLE) && (OS_EVR_EVFLAGS != 0) && !defined(EVR_RTX_EVENT_FLAGS_CLEAR_DISABLE))
1106 extern void EvrRtxEventFlagsClear (osEventFlagsId_t ef_id, uint32_t flags);
1107 #else
1108 #define EvrRtxEventFlagsClear(ef_id, flags)
1109 #endif
1110 
1111 /**
1112  \brief Event on successful event flags clear (Op)
1113  \param[in] ef_id event flags ID obtained by \ref osEventFlagsNew.
1114  \param[in] event_flags event flags before clearing.
1115 */
1116 #if (!defined(EVR_RTX_DISABLE) && (OS_EVR_EVFLAGS != 0) && !defined(EVR_RTX_EVENT_FLAGS_CLEAR_DONE_DISABLE))
1117 extern void EvrRtxEventFlagsClearDone (osEventFlagsId_t ef_id, uint32_t event_flags);
1118 #else
1119 #define EvrRtxEventFlagsClearDone(ef_id, event_flags)
1120 #endif
1121 
1122 /**
1123  \brief Event on event flags retrieve (API)
1124  \param[in] ef_id event flags ID obtained by \ref osEventFlagsNew.
1125  \param[in] event_flags current event flags.
1126 */
1127 #if (!defined(EVR_RTX_DISABLE) && (OS_EVR_EVFLAGS != 0) && !defined(EVR_RTX_EVENT_FLAGS_GET_DISABLE))
1128 extern void EvrRtxEventFlagsGet (osEventFlagsId_t ef_id, uint32_t event_flags);
1129 #else
1130 #define EvrRtxEventFlagsGet(ef_id, event_flags)
1131 #endif
1132 
1133 /**
1134  \brief Event on wait for event flags (API)
1135  \param[in] ef_id event flags ID obtained by \ref osEventFlagsNew.
1136  \param[in] flags flags to wait for.
1137  \param[in] options flags options (osFlagsXxxx).
1138  \param[in] timeout \ref CMSIS_RTOS_TimeOutValue or 0 in case of no time-out.
1139 */
1140 #if (!defined(EVR_RTX_DISABLE) && (OS_EVR_EVFLAGS != 0) && !defined(EVR_RTX_EVENT_FLAGS_WAIT_DISABLE))
1141 extern void EvrRtxEventFlagsWait (osEventFlagsId_t ef_id, uint32_t flags, uint32_t options, uint32_t timeout);
1142 #else
1143 #define EvrRtxEventFlagsWait(ef_id, flags, options, timeout)
1144 #endif
1145 
1146 /**
1147  \brief Event on pending wait for event flags (Op)
1148  \param[in] ef_id event flags ID obtained by \ref osEventFlagsNew.
1149  \param[in] flags flags to wait for.
1150  \param[in] options flags options (osFlagsXxxx).
1151  \param[in] timeout \ref CMSIS_RTOS_TimeOutValue or 0 in case of no time-out.
1152 */
1153 #if (!defined(EVR_RTX_DISABLE) && (OS_EVR_EVFLAGS != 0) && !defined(EVR_RTX_EVENT_FLAGS_WAIT_PENDING_DISABLE))
1154 extern void EvrRtxEventFlagsWaitPending (osEventFlagsId_t ef_id, uint32_t flags, uint32_t options, uint32_t timeout);
1155 #else
1156 #define EvrRtxEventFlagsWaitPending(ef_id, flags, options, timeout)
1157 #endif
1158 
1159 /**
1160  \brief Event on wait timeout for event flags (Op)
1161  \param[in] ef_id event flags ID obtained by \ref osEventFlagsNew.
1162 */
1163 #if (!defined(EVR_RTX_DISABLE) && (OS_EVR_EVFLAGS != 0) && !defined(EVR_RTX_EVENT_FLAGS_WAIT_TIMEOUT_DISABLE))
1164 extern void EvrRtxEventFlagsWaitTimeout (osEventFlagsId_t ef_id);
1165 #else
1166 #define EvrRtxEventFlagsWaitTimeout(ef_id)
1167 #endif
1168 
1169 /**
1170  \brief Event on successful wait for event flags (Op)
1171  \param[in] ef_id event flags ID obtained by \ref osEventFlagsNew.
1172  \param[in] flags flags to wait for.
1173  \param[in] options flags options (osFlagsXxxx).
1174  \param[in] event_flags event flags before clearing or 0 if specified flags have not been set.
1175 */
1176 #if (!defined(EVR_RTX_DISABLE) && (OS_EVR_EVFLAGS != 0) && !defined(EVR_RTX_EVENT_FLAGS_WAIT_COMPLETED_DISABLE))
1177 extern void EvrRtxEventFlagsWaitCompleted (osEventFlagsId_t ef_id, uint32_t flags, uint32_t options, uint32_t event_flags);
1178 #else
1179 #define EvrRtxEventFlagsWaitCompleted(ef_id, flags, options, event_flags)
1180 #endif
1181 
1182 /**
1183  \brief Event on unsuccessful wait for event flags (Op)
1184  \param[in] ef_id event flags ID obtained by \ref osEventFlagsNew.
1185  \param[in] flags flags to wait for.
1186  \param[in] options flags options (osFlagsXxxx).
1187 */
1188 #if (!defined(EVR_RTX_DISABLE) && (OS_EVR_EVFLAGS != 0) && !defined(EVR_RTX_EVENT_FLAGS_WAIT_NOT_COMPLETED_DISABLE))
1189 extern void EvrRtxEventFlagsWaitNotCompleted (osEventFlagsId_t ef_id, uint32_t flags, uint32_t options);
1190 #else
1191 #define EvrRtxEventFlagsWaitNotCompleted(ef_id, flags, options)
1192 #endif
1193 
1194 /**
1195  \brief Event on event flags delete (API)
1196  \param[in] ef_id event flags ID obtained by \ref osEventFlagsNew.
1197 */
1198 #if (!defined(EVR_RTX_DISABLE) && (OS_EVR_EVFLAGS != 0) && !defined(EVR_RTX_EVENT_FLAGS_DELETE_DISABLE))
1199 extern void EvrRtxEventFlagsDelete (osEventFlagsId_t ef_id);
1200 #else
1201 #define EvrRtxEventFlagsDelete(ef_id)
1202 #endif
1203 
1204 /**
1205  \brief Event on successful event flags delete (Op)
1206  \param[in] ef_id event flags ID obtained by \ref osEventFlagsNew.
1207 */
1208 #if (!defined(EVR_RTX_DISABLE) && (OS_EVR_EVFLAGS != 0) && !defined(EVR_RTX_EVENT_FLAGS_DESTROYED_DISABLE))
1209 extern void EvrRtxEventFlagsDestroyed (osEventFlagsId_t ef_id);
1210 #else
1211 #define EvrRtxEventFlagsDestroyed(ef_id)
1212 #endif
1213 
1214 
1215 // ==== Mutex Events ====
1216 
1217 /**
1218  \brief Event on mutex error (Error)
1219  \param[in] mutex_id mutex ID obtained by \ref osMutexNew or NULL when ID is unknown.
1220  \param[in] status extended execution status.
1221 */
1222 #if (!defined(EVR_RTX_DISABLE) && (OS_EVR_MUTEX != 0) && !defined(EVR_RTX_MUTEX_ERROR_DISABLE))
1223 extern void EvrRtxMutexError (osMutexId_t mutex_id, int32_t status);
1224 #else
1225 #define EvrRtxMutexError(mutex_id, status)
1226 #endif
1227 
1228 /**
1229  \brief Event on mutex create and initialize (API)
1230  \param[in] attr mutex attributes.
1231 */
1232 #if (!defined(EVR_RTX_DISABLE) && (OS_EVR_MUTEX != 0) && !defined(EVR_RTX_MUTEX_NEW_DISABLE))
1233 extern void EvrRtxMutexNew (const osMutexAttr_t *attr);
1234 #else
1235 #define EvrRtxMutexNew(attr)
1236 #endif
1237 
1238 /**
1239  \brief Event on successful mutex create (Op)
1240  \param[in] mutex_id mutex ID obtained by \ref osMutexNew.
1241  \param[in] name pointer to mutex object name.
1242 */
1243 #if (!defined(EVR_RTX_DISABLE) && (OS_EVR_MUTEX != 0) && !defined(EVR_RTX_MUTEX_CREATED_DISABLE))
1244 extern void EvrRtxMutexCreated (osMutexId_t mutex_id, const char *name);
1245 #else
1246 #define EvrRtxMutexCreated(mutex_id, name)
1247 #endif
1248 
1249 /**
1250  \brief Event on mutex name retrieve (API)
1251  \param[in] mutex_id mutex ID obtained by \ref osMutexNew.
1252  \param[in] name pointer to mutex object name.
1253 */
1254 #if (!defined(EVR_RTX_DISABLE) && (OS_EVR_MUTEX != 0) && !defined(EVR_RTX_MUTEX_GET_NAME_DISABLE))
1255 extern void EvrRtxMutexGetName (osMutexId_t mutex_id, const char *name);
1256 #else
1257 #define EvrRtxMutexGetName(mutex_id, name)
1258 #endif
1259 
1260 /**
1261  \brief Event on mutex acquire (API)
1262  \param[in] mutex_id mutex ID obtained by \ref osMutexNew.
1263  \param[in] timeout \ref CMSIS_RTOS_TimeOutValue or 0 in case of no time-out.
1264 */
1265 #if (!defined(EVR_RTX_DISABLE) && (OS_EVR_MUTEX != 0) && !defined(EVR_RTX_MUTEX_ACQUIRE_DISABLE))
1266 extern void EvrRtxMutexAcquire (osMutexId_t mutex_id, uint32_t timeout);
1267 #else
1268 #define EvrRtxMutexAcquire(mutex_id, timeout)
1269 #endif
1270 
1271 /**
1272  \brief Event on pending mutex acquire (Op)
1273  \param[in] mutex_id mutex ID obtained by \ref osMutexNew.
1274  \param[in] timeout \ref CMSIS_RTOS_TimeOutValue or 0 in case of no time-out.
1275 */
1276 #if (!defined(EVR_RTX_DISABLE) && (OS_EVR_MUTEX != 0) && !defined(EVR_RTX_MUTEX_ACQUIRE_PENDING_DISABLE))
1277 extern void EvrRtxMutexAcquirePending (osMutexId_t mutex_id, uint32_t timeout);
1278 #else
1279 #define EvrRtxMutexAcquirePending(mutex_id, timeout);
1280 #endif
1281 
1282 /**
1283  \brief Event on mutex acquire timeout (Op)
1284  \param[in] mutex_id mutex ID obtained by \ref osMutexNew.
1285 */
1286 #if (!defined(EVR_RTX_DISABLE) && (OS_EVR_MUTEX != 0) && !defined(EVR_RTX_MUTEX_ACQUIRE_TIMEOUT_DISABLE))
1287 extern void EvrRtxMutexAcquireTimeout (osMutexId_t mutex_id);
1288 #else
1289 #define EvrRtxMutexAcquireTimeout(mutex_id)
1290 #endif
1291 
1292 /**
1293  \brief Event on successful mutex acquire (Op)
1294  \param[in] mutex_id mutex ID obtained by \ref osMutexNew.
1295  \param[in] lock current number of times mutex object is locked.
1296 */
1297 #if (!defined(EVR_RTX_DISABLE) && (OS_EVR_MUTEX != 0) && !defined(EVR_RTX_MUTEX_ACQUIRED_DISABLE))
1298 extern void EvrRtxMutexAcquired (osMutexId_t mutex_id, uint32_t lock);
1299 #else
1300 #define EvrRtxMutexAcquired(mutex_id, lock)
1301 #endif
1302 
1303 /**
1304  \brief Event on unsuccessful mutex acquire (Op)
1305  \param[in] mutex_id mutex ID obtained by \ref osMutexNew.
1306 */
1307 #if (!defined(EVR_RTX_DISABLE) && (OS_EVR_MUTEX != 0) && !defined(EVR_RTX_MUTEX_NOT_ACQUIRED_DISABLE))
1308 extern void EvrRtxMutexNotAcquired (osMutexId_t mutex_id);
1309 #else
1310 #define EvrRtxMutexNotAcquired(mutex_id)
1311 #endif
1312 
1313 /**
1314  \brief Event on mutex release (API)
1315  \param[in] mutex_id mutex ID obtained by \ref osMutexNew.
1316 */
1317 #if (!defined(EVR_RTX_DISABLE) && (OS_EVR_MUTEX != 0) && !defined(EVR_RTX_MUTEX_RELEASE_DISABLE))
1318 extern void EvrRtxMutexRelease (osMutexId_t mutex_id);
1319 #else
1320 #define EvrRtxMutexRelease(mutex_id)
1321 #endif
1322 
1323 /**
1324  \brief Event on successful mutex release (Op)
1325  \param[in] mutex_id mutex ID obtained by \ref osMutexNew.
1326  \param[in] lock current number of times mutex object is locked.
1327 */
1328 #if (!defined(EVR_RTX_DISABLE) && (OS_EVR_MUTEX != 0) && !defined(EVR_RTX_MUTEX_RELEASED_DISABLE))
1329 extern void EvrRtxMutexReleased (osMutexId_t mutex_id, uint32_t lock);
1330 #else
1331 #define EvrRtxMutexReleased(mutex_id, lock)
1332 #endif
1333 
1334 /**
1335  \brief Event on mutex owner retrieve (API)
1336  \param[in] mutex_id mutex ID obtained by \ref osMutexNew.
1337  \param[in] thread_id thread ID obtained by \ref osThreadNew or \ref osThreadGetId.
1338 */
1339 #if (!defined(EVR_RTX_DISABLE) && (OS_EVR_MUTEX != 0) && !defined(EVR_RTX_MUTEX_GET_OWNER_DISABLE))
1340 extern void EvrRtxMutexGetOwner (osMutexId_t mutex_id, osThreadId_t thread_id);
1341 #else
1342 #define EvrRtxMutexGetOwner(mutex_id, thread_id)
1343 #endif
1344 
1345 /**
1346  \brief Event on mutex delete (API)
1347  \param[in] mutex_id mutex ID obtained by \ref osMutexNew.
1348 */
1349 #if (!defined(EVR_RTX_DISABLE) && (OS_EVR_MUTEX != 0) && !defined(EVR_RTX_MUTEX_DELETE_DISABLE))
1350 extern void EvrRtxMutexDelete (osMutexId_t mutex_id);
1351 #else
1352 #define EvrRtxMutexDelete(mutex_id)
1353 #endif
1354 
1355 /**
1356  \brief Event on successful mutex delete (Op)
1357  \param[in] mutex_id mutex ID obtained by \ref osMutexNew.
1358 */
1359 #if (!defined(EVR_RTX_DISABLE) && (OS_EVR_MUTEX != 0) && !defined(EVR_RTX_MUTEX_DESTROYED_DISABLE))
1360 extern void EvrRtxMutexDestroyed (osMutexId_t mutex_id);
1361 #else
1362 #define EvrRtxMutexDestroyed(mutex_id)
1363 #endif
1364 
1365 
1366 // ==== Semaphore Events ====
1367 
1368 /**
1369  \brief Event on semaphore error (Error)
1370  \param[in] semaphore_id semaphore ID obtained by \ref osSemaphoreNew or NULL when ID is unknown.
1371  \param[in] status extended execution status.
1372 */
1373 #if (!defined(EVR_RTX_DISABLE) && (OS_EVR_SEMAPHORE != 0) && !defined(EVR_RTX_SEMAPHORE_ERROR_DISABLE))
1374 extern void EvrRtxSemaphoreError (osSemaphoreId_t semaphore_id, int32_t status);
1375 #else
1376 #define EvrRtxSemaphoreError(semaphore_id, status)
1377 #endif
1378 
1379 /**
1380  \brief Event on semaphore create and initialize (API)
1381  \param[in] max_count maximum number of available tokens.
1382  \param[in] initial_count initial number of available tokens.
1383  \param[in] attr semaphore attributes.
1384 */
1385 #if (!defined(EVR_RTX_DISABLE) && (OS_EVR_SEMAPHORE != 0) && !defined(EVR_RTX_SEMAPHORE_NEW_DISABLE))
1386 extern void EvrRtxSemaphoreNew (uint32_t max_count, uint32_t initial_count, const osSemaphoreAttr_t *attr);
1387 #else
1388 #define EvrRtxSemaphoreNew(max_count, initial_count, attr)
1389 #endif
1390 
1391 /**
1392  \brief Event on successful semaphore create (Op)
1393  \param[in] semaphore_id semaphore ID obtained by \ref osSemaphoreNew.
1394  \param[in] name pointer to semaphore object name.
1395 */
1396 #if (!defined(EVR_RTX_DISABLE) && (OS_EVR_SEMAPHORE != 0) && !defined(EVR_RTX_SEMAPHORE_CREATED_DISABLE))
1397 extern void EvrRtxSemaphoreCreated (osSemaphoreId_t semaphore_id, const char *name);
1398 #else
1399 #define EvrRtxSemaphoreCreated(semaphore_id, name)
1400 #endif
1401 
1402 /**
1403  \brief Event on semaphore name retrieve (API)
1404  \param[in] semaphore_id semaphore ID obtained by \ref osSemaphoreNew.
1405  \param[in] name pointer to semaphore object name.
1406 */
1407 #if (!defined(EVR_RTX_DISABLE) && (OS_EVR_SEMAPHORE != 0) && !defined(EVR_RTX_SEMAPHORE_GET_NAME_DISABLE))
1408 extern void EvrRtxSemaphoreGetName (osSemaphoreId_t semaphore_id, const char *name);
1409 #else
1410 #define EvrRtxSemaphoreGetName(semaphore_id, name)
1411 #endif
1412 
1413 /**
1414  \brief Event on semaphore acquire (API)
1415  \param[in] semaphore_id semaphore ID obtained by \ref osSemaphoreNew.
1416  \param[in] timeout \ref CMSIS_RTOS_TimeOutValue or 0 in case of no time-out.
1417 */
1418 #if (!defined(EVR_RTX_DISABLE) && (OS_EVR_SEMAPHORE != 0) && !defined(EVR_RTX_SEMAPHORE_ACQUIRE_DISABLE))
1419 extern void EvrRtxSemaphoreAcquire (osSemaphoreId_t semaphore_id, uint32_t timeout);
1420 #else
1421 #define EvrRtxSemaphoreAcquire(semaphore_id, timeout)
1422 #endif
1423 
1424 /**
1425  \brief Event on pending semaphore acquire (Op)
1426  \param[in] semaphore_id semaphore ID obtained by \ref osSemaphoreNew.
1427  \param[in] timeout \ref CMSIS_RTOS_TimeOutValue or 0 in case of no time-out.
1428 */
1429 #if (!defined(EVR_RTX_DISABLE) && (OS_EVR_SEMAPHORE != 0) && !defined(EVR_RTX_SEMAPHORE_ACQUIRE_PENDING_DISABLE))
1430 extern void EvrRtxSemaphoreAcquirePending (osSemaphoreId_t semaphore_id, uint32_t timeout);
1431 #else
1432 #define EvrRtxSemaphoreAcquirePending(semaphore_id, timeout);
1433 #endif
1434 
1435 /**
1436  \brief Event on semaphore acquire timeout (Op)
1437  \param[in] semaphore_id semaphore ID obtained by \ref osSemaphoreNew.
1438 */
1439 #if (!defined(EVR_RTX_DISABLE) && (OS_EVR_SEMAPHORE != 0) && !defined(EVR_RTX_SEMAPHORE_ACQUIRE_TIMEOUT_DISABLE))
1440 extern void EvrRtxSemaphoreAcquireTimeout (osSemaphoreId_t semaphore_id);
1441 #else
1442 #define EvrRtxSemaphoreAcquireTimeout(semaphore_id)
1443 #endif
1444 
1445 /**
1446  \brief Event on successful semaphore acquire (Op)
1447  \param[in] semaphore_id semaphore ID obtained by \ref osSemaphoreNew.
1448  \param[in] tokens number of available tokens.
1449 */
1450 #if (!defined(EVR_RTX_DISABLE) && (OS_EVR_SEMAPHORE != 0) && !defined(EVR_RTX_SEMAPHORE_ACQUIRED_DISABLE))
1451 extern void EvrRtxSemaphoreAcquired (osSemaphoreId_t semaphore_id, uint32_t tokens);
1452 #else
1453 #define EvrRtxSemaphoreAcquired(semaphore_id, tokens)
1454 #endif
1455 
1456 /**
1457  \brief Event on unsuccessful semaphore acquire (Op)
1458  \param[in] semaphore_id semaphore ID obtained by \ref osSemaphoreNew.
1459 */
1460 #if (!defined(EVR_RTX_DISABLE) && (OS_EVR_SEMAPHORE != 0) && !defined(EVR_RTX_SEMAPHORE_NOT_ACQUIRED_DISABLE))
1461 extern void EvrRtxSemaphoreNotAcquired (osSemaphoreId_t semaphore_id);
1462 #else
1463 #define EvrRtxSemaphoreNotAcquired(semaphore_id)
1464 #endif
1465 
1466 /**
1467  \brief Event on semaphore release (API)
1468  \param[in] semaphore_id semaphore ID obtained by \ref osSemaphoreNew.
1469 */
1470 #if (!defined(EVR_RTX_DISABLE) && (OS_EVR_SEMAPHORE != 0) && !defined(EVR_RTX_SEMAPHORE_RELEASE_DISABLE))
1471 extern void EvrRtxSemaphoreRelease (osSemaphoreId_t semaphore_id);
1472 #else
1473 #define EvrRtxSemaphoreRelease(semaphore_id)
1474 #endif
1475 
1476 /**
1477  \brief Event on successful semaphore release (Op)
1478  \param[in] semaphore_id semaphore ID obtained by \ref osSemaphoreNew.
1479  \param[in] tokens number of available tokens.
1480 */
1481 #if (!defined(EVR_RTX_DISABLE) && (OS_EVR_SEMAPHORE != 0) && !defined(EVR_RTX_SEMAPHORE_RELEASED_DISABLE))
1482 extern void EvrRtxSemaphoreReleased (osSemaphoreId_t semaphore_id, uint32_t tokens);
1483 #else
1484 #define EvrRtxSemaphoreReleased(semaphore_id, tokens)
1485 #endif
1486 
1487 /**
1488  \brief Event on semaphore token count retrieval (API)
1489  \param[in] semaphore_id semaphore ID obtained by \ref osSemaphoreNew.
1490  \param[in] count current number of available tokens.
1491 */
1492 #if (!defined(EVR_RTX_DISABLE) && (OS_EVR_SEMAPHORE != 0) && !defined(EVR_RTX_SEMAPHORE_GET_COUNT_DISABLE))
1493 extern void EvrRtxSemaphoreGetCount (osSemaphoreId_t semaphore_id, uint32_t count);
1494 #else
1495 #define EvrRtxSemaphoreGetCount(semaphore_id, count)
1496 #endif
1497 
1498 /**
1499  \brief Event on semaphore delete (API)
1500  \param[in] semaphore_id semaphore ID obtained by \ref osSemaphoreNew.
1501 */
1502 #if (!defined(EVR_RTX_DISABLE) && (OS_EVR_SEMAPHORE != 0) && !defined(EVR_RTX_SEMAPHORE_DELETE_DISABLE))
1503 extern void EvrRtxSemaphoreDelete (osSemaphoreId_t semaphore_id);
1504 #else
1505 #define EvrRtxSemaphoreDelete(semaphore_id)
1506 #endif
1507 
1508 /**
1509  \brief Event on successful semaphore delete (Op)
1510  \param[in] semaphore_id semaphore ID obtained by \ref osSemaphoreNew.
1511 */
1512 #if (!defined(EVR_RTX_DISABLE) && (OS_EVR_SEMAPHORE != 0) && !defined(EVR_RTX_SEMAPHORE_DESTROYED_DISABLE))
1513 extern void EvrRtxSemaphoreDestroyed (osSemaphoreId_t semaphore_id);
1514 #else
1515 #define EvrRtxSemaphoreDestroyed(semaphore_id)
1516 #endif
1517 
1518 
1519 // ==== Memory Pool Events ====
1520 
1521 /**
1522  \brief Event on memory pool error (Error)
1523  \param[in] mp_id memory pool ID obtained by \ref osMemoryPoolNew or NULL when ID is unknown.
1524  \param[in] status extended execution status.
1525 */
1526 #if (!defined(EVR_RTX_DISABLE) && (OS_EVR_MEMPOOL != 0) && !defined(EVR_RTX_MEMORY_POOL_ERROR_DISABLE))
1527 extern void EvrRtxMemoryPoolError (osMemoryPoolId_t mp_id, int32_t status);
1528 #else
1529 #define EvrRtxMemoryPoolError(mp_id, status)
1530 #endif
1531 
1532 /**
1533  \brief Event on memory pool create and initialize (API)
1534  \param[in] block_count maximum number of memory blocks in memory pool.
1535  \param[in] block_size memory block size in bytes.
1536  \param[in] attr memory pool attributes; NULL: default values.
1537 */
1538 #if (!defined(EVR_RTX_DISABLE) && (OS_EVR_MEMPOOL != 0) && !defined(EVR_RTX_MEMORY_POOL_NEW_DISABLE))
1539 extern void EvrRtxMemoryPoolNew (uint32_t block_count, uint32_t block_size, const osMemoryPoolAttr_t *attr);
1540 #else
1541 #define EvrRtxMemoryPoolNew(block_count, block_size, attr)
1542 #endif
1543 
1544 /**
1545  \brief Event on successful memory pool create (Op)
1546  \param[in] mp_id memory pool ID obtained by \ref osMemoryPoolNew.
1547  \param[in] name pointer to memory pool object name.
1548 */
1549 #if (!defined(EVR_RTX_DISABLE) && (OS_EVR_MEMPOOL != 0) && !defined(EVR_RTX_MEMORY_POOL_CREATED_DISABLE))
1550 extern void EvrRtxMemoryPoolCreated (osMemoryPoolId_t mp_id, const char *name);
1551 #else
1552 #define EvrRtxMemoryPoolCreated(mp_id, name)
1553 #endif
1554 
1555 /**
1556  \brief Event on memory pool name retrieve (API)
1557  \param[in] mp_id memory pool ID obtained by \ref osMemoryPoolNew.
1558  \param[in] name pointer to memory pool object name.
1559 */
1560 #if (!defined(EVR_RTX_DISABLE) && (OS_EVR_MEMPOOL != 0) && !defined(EVR_RTX_MEMORY_POOL_GET_NAME_DISABLE))
1561 extern void EvrRtxMemoryPoolGetName (osMemoryPoolId_t mp_id, const char *name);
1562 #else
1563 #define EvrRtxMemoryPoolGetName(mp_id, name)
1564 #endif
1565 
1566 /**
1567  \brief Event on memory pool allocation (API)
1568  \param[in] mp_id memory pool ID obtained by \ref osMemoryPoolNew.
1569  \param[in] timeout \ref CMSIS_RTOS_TimeOutValue or 0 in case of no time-out.
1570 */
1571 #if (!defined(EVR_RTX_DISABLE) && (OS_EVR_MEMPOOL != 0) && !defined(EVR_RTX_MEMORY_POOL_ALLOC_DISABLE))
1572 extern void EvrRtxMemoryPoolAlloc (osMemoryPoolId_t mp_id, uint32_t timeout);
1573 #else
1574 #define EvrRtxMemoryPoolAlloc(mp_id, timeout)
1575 #endif
1576 
1577 /**
1578  \brief Event on pending memory pool allocation (Op)
1579  \param[in] mp_id memory pool ID obtained by \ref osMemoryPoolNew.
1580  \param[in] timeout \ref CMSIS_RTOS_TimeOutValue or 0 in case of no time-out.
1581 */
1582 #if (!defined(EVR_RTX_DISABLE) && (OS_EVR_MEMPOOL != 0) && !defined(EVR_RTX_MEMORY_POOL_ALLOC_PENDING_DISABLE))
1583 extern void EvrRtxMemoryPoolAllocPending (osMemoryPoolId_t mp_id, uint32_t timeout);
1584 #else
1585 #define EvrRtxMemoryPoolAllocPending(mp_id, timeout)
1586 #endif
1587 
1588 /**
1589  \brief Event on memory pool allocation timeout (Op)
1590  \param[in] mp_id memory pool ID obtained by \ref osMemoryPoolNew.
1591 */
1592 #if (!defined(EVR_RTX_DISABLE) && (OS_EVR_MEMPOOL != 0) && !defined(EVR_RTX_MEMORY_POOL_ALLOC_TIMEOUT_DISABLE))
1593 extern void EvrRtxMemoryPoolAllocTimeout (osMemoryPoolId_t mp_id);
1594 #else
1595 #define EvrRtxMemoryPoolAllocTimeout(mp_id)
1596 #endif
1597 
1598 /**
1599  \brief Event on successful memory pool allocation (Op)
1600  \param[in] mp_id memory pool ID obtained by \ref osMemoryPoolNew.
1601  \param[in] block address of the allocated memory block.
1602 */
1603 #if (!defined(EVR_RTX_DISABLE) && (OS_EVR_MEMPOOL != 0) && !defined(EVR_RTX_MEMORY_POOL_ALLOCATED_DISABLE))
1604 extern void EvrRtxMemoryPoolAllocated (osMemoryPoolId_t mp_id, void *block);
1605 #else
1606 #define EvrRtxMemoryPoolAllocated(mp_id, block)
1607 #endif
1608 
1609 /**
1610  \brief Event on unsuccessful memory pool allocation (Op)
1611  \param[in] mp_id memory pool ID obtained by \ref osMemoryPoolNew.
1612 */
1613 #if (!defined(EVR_RTX_DISABLE) && (OS_EVR_MEMPOOL != 0) && !defined(EVR_RTX_MEMORY_POOL_ALLOC_FAILED_DISABLE))
1614 extern void EvrRtxMemoryPoolAllocFailed (osMemoryPoolId_t mp_id);
1615 #else
1616 #define EvrRtxMemoryPoolAllocFailed(mp_id)
1617 #endif
1618 
1619 /**
1620  \brief Event on memory pool free (API)
1621  \param[in] mp_id memory pool ID obtained by \ref osMemoryPoolNew.
1622  \param[in] block address of the allocated memory block to be returned to the memory pool.
1623 */
1624 #if (!defined(EVR_RTX_DISABLE) && (OS_EVR_MEMPOOL != 0) && !defined(EVR_RTX_MEMORY_POOL_FREE_DISABLE))
1625 extern void EvrRtxMemoryPoolFree (osMemoryPoolId_t mp_id, void *block);
1626 #else
1627 #define EvrRtxMemoryPoolFree(mp_id, block)
1628 #endif
1629 
1630 /**
1631  \brief Event on successful memory pool free (Op)
1632  \param[in] mp_id memory pool ID obtained by \ref osMemoryPoolNew.
1633  \param[in] block address of the allocated memory block to be returned to the memory pool.
1634 */
1635 #if (!defined(EVR_RTX_DISABLE) && (OS_EVR_MEMPOOL != 0) && !defined(EVR_RTX_MEMORY_POOL_DEALLOCATED_DISABLE))
1636 extern void EvrRtxMemoryPoolDeallocated (osMemoryPoolId_t mp_id, void *block);
1637 #else
1638 #define EvrRtxMemoryPoolDeallocated(mp_id, block)
1639 #endif
1640 
1641 /**
1642  \brief Event on unsuccessful memory pool free (Op)
1643  \param[in] mp_id memory pool ID obtained by \ref osMemoryPoolNew.
1644  \param[in] block address of the allocated memory block to be returned to the memory pool.
1645 */
1646 #if (!defined(EVR_RTX_DISABLE) && (OS_EVR_MEMPOOL != 0) && !defined(EVR_RTX_MEMORY_POOL_FREE_FAILED_DISABLE))
1647 extern void EvrRtxMemoryPoolFreeFailed (osMemoryPoolId_t mp_id, void *block);
1648 #else
1649 #define EvrRtxMemoryPoolFreeFailed(mp_id, block)
1650 #endif
1651 
1652 /**
1653  \brief Event on memory pool capacity retrieve (API)
1654  \param[in] mp_id memory pool ID obtained by \ref osMemoryPoolNew.
1655  \param[in] capacity maximum number of memory blocks.
1656 */
1657 #if (!defined(EVR_RTX_DISABLE) && (OS_EVR_MEMPOOL != 0) && !defined(EVR_RTX_MEMORY_POOL_GET_CAPACITY_DISABLE))
1658 extern void EvrRtxMemoryPoolGetCapacity (osMemoryPoolId_t mp_id, uint32_t capacity);
1659 #else
1660 #define EvrRtxMemoryPoolGetCapacity(mp_id, capacity)
1661 #endif
1662 
1663 /**
1664  \brief Event on memory pool block size retrieve (API)
1665  \param[in] mp_id memory pool ID obtained by \ref osMemoryPoolNew.
1666  \param[in] block_size memory block size in bytes.
1667 */
1668 #if (!defined(EVR_RTX_DISABLE) && (OS_EVR_MEMPOOL != 0) && !defined(EVR_RTX_MEMORY_POOL_GET_BLOCK_SZIE_DISABLE))
1669 extern void EvrRtxMemoryPoolGetBlockSize (osMemoryPoolId_t mp_id, uint32_t block_size);
1670 #else
1671 #define EvrRtxMemoryPoolGetBlockSize(mp_id, block_size)
1672 #endif
1673 
1674 /**
1675  \brief Event on used memory pool blocks retrieve (API)
1676  \param[in] mp_id memory pool ID obtained by \ref osMemoryPoolNew.
1677  \param[in] count number of memory blocks used.
1678 */
1679 #if (!defined(EVR_RTX_DISABLE) && (OS_EVR_MEMPOOL != 0) && !defined(EVR_RTX_MEMORY_POOL_GET_COUNT_DISABLE))
1680 extern void EvrRtxMemoryPoolGetCount (osMemoryPoolId_t mp_id, uint32_t count);
1681 #else
1682 #define EvrRtxMemoryPoolGetCount(mp_id, count)
1683 #endif
1684 
1685 /**
1686  \brief Event on available memory pool blocks retrieve (API)
1687  \param[in] mp_id memory pool ID obtained by \ref osMemoryPoolNew.
1688  \param[in] space number of memory blocks available.
1689 */
1690 #if (!defined(EVR_RTX_DISABLE) && (OS_EVR_MEMPOOL != 0) && !defined(EVR_RTX_MEMORY_POOL_GET_SPACE_DISABLE))
1691 extern void EvrRtxMemoryPoolGetSpace (osMemoryPoolId_t mp_id, uint32_t space);
1692 #else
1693 #define EvrRtxMemoryPoolGetSpace(mp_id, space)
1694 #endif
1695 
1696 /**
1697  \brief Event on memory pool delete (API)
1698  \param[in] mp_id memory pool ID obtained by \ref osMemoryPoolNew.
1699 */
1700 #if (!defined(EVR_RTX_DISABLE) && (OS_EVR_MEMPOOL != 0) && !defined(EVR_RTX_MEMORY_POOL_DELETE_DISABLE))
1701 extern void EvrRtxMemoryPoolDelete (osMemoryPoolId_t mp_id);
1702 #else
1703 #define EvrRtxMemoryPoolDelete(mp_id)
1704 #endif
1705 
1706 /**
1707  \brief Event on successful memory pool delete (Op)
1708  \param[in] mp_id memory pool ID obtained by \ref osMemoryPoolNew.
1709 */
1710 #if (!defined(EVR_RTX_DISABLE) && (OS_EVR_MEMPOOL != 0) && !defined(EVR_RTX_MEMORY_POOL_DESTROYED_DISABLE))
1711 extern void EvrRtxMemoryPoolDestroyed (osMemoryPoolId_t mp_id);
1712 #else
1713 #define EvrRtxMemoryPoolDestroyed(mp_id)
1714 #endif
1715 
1716 
1717 // ==== Message Queue Events ====
1718 
1719 /**
1720  \brief Event on message queue error (Error)
1721  \param[in] mq_id message queue ID obtained by \ref osMessageQueueNew or NULL when ID is unknown.
1722  \param[in] status extended execution status.
1723 */
1724 #if (!defined(EVR_RTX_DISABLE) && (OS_EVR_MSGQUEUE != 0) && !defined(EVR_RTX_MESSAGE_QUEUE_ERROR_DISABLE))
1725 extern void EvrRtxMessageQueueError (osMessageQueueId_t mq_id, int32_t status);
1726 #else
1727 #define EvrRtxMessageQueueError(mq_id, status)
1728 #endif
1729 
1730 /**
1731  \brief Event on message queue create and initialization (API)
1732  \param[in] msg_count maximum number of messages in queue.
1733  \param[in] msg_size maximum message size in bytes.
1734  \param[in] attr message queue attributes; NULL: default values.
1735 */
1736 #if (!defined(EVR_RTX_DISABLE) && (OS_EVR_MSGQUEUE != 0) && !defined(EVR_RTX_MESSAGE_QUEUE_NEW_DISABLE))
1737 extern void EvrRtxMessageQueueNew (uint32_t msg_count, uint32_t msg_size, const osMessageQueueAttr_t *attr);
1738 #else
1739 #define EvrRtxMessageQueueNew(msg_count, msg_size, attr)
1740 #endif
1741 
1742 /**
1743  \brief Event on successful message queue create (Op)
1744  \param[in] mq_id message queue ID obtained by \ref osMessageQueueNew.
1745  \param[in] name pointer to message queue object name.
1746 */
1747 #if (!defined(EVR_RTX_DISABLE) && (OS_EVR_MSGQUEUE != 0) && !defined(EVR_RTX_MESSAGE_QUEUE_CREATED_DISABLE))
1748 extern void EvrRtxMessageQueueCreated (osMessageQueueId_t mq_id, const char *name);
1749 #else
1750 #define EvrRtxMessageQueueCreated(mq_id, name)
1751 #endif
1752 
1753 /**
1754  \brief Event on message queue name retrieve(API)
1755  \param[in] mq_id message queue ID obtained by \ref osMessageQueueNew.
1756  \param[in] name pointer to message queue object name.
1757 */
1758 #if (!defined(EVR_RTX_DISABLE) && (OS_EVR_MSGQUEUE != 0) && !defined(EVR_RTX_MESSAGE_QUEUE_GET_NAME_DISABLE))
1759 extern void EvrRtxMessageQueueGetName (osMessageQueueId_t mq_id, const char *name);
1760 #else
1761 #define EvrRtxMessageQueueGetName(mq_id, name)
1762 #endif
1763 
1764 /**
1765  \brief Event on message put (API)
1766  \param[in] mq_id message queue ID obtained by \ref osMessageQueueNew.
1767  \param[in] msg_ptr pointer to buffer with message to put into a queue.
1768  \param[in] msg_prio message priority.
1769  \param[in] timeout \ref CMSIS_RTOS_TimeOutValue or 0 in case of no time-out.
1770 */
1771 #if (!defined(EVR_RTX_DISABLE) && (OS_EVR_MSGQUEUE != 0) && !defined(EVR_RTX_MESSAGE_QUEUE_PUT_DISABLE))
1772 extern void EvrRtxMessageQueuePut (osMessageQueueId_t mq_id, const void *msg_ptr, uint8_t msg_prio, uint32_t timeout);
1773 #else
1774 #define EvrRtxMessageQueuePut(mq_id, msg_ptr, msg_prio, timeout)
1775 #endif
1776 
1777 /**
1778  \brief Event on pending message put (Op)
1779  \param[in] mq_id message queue ID obtained by \ref osMessageQueueNew.
1780  \param[in] msg_ptr pointer to buffer with message to put into a queue.
1781  \param[in] timeout \ref CMSIS_RTOS_TimeOutValue or 0 in case of no time-out.
1782 */
1783 #if (!defined(EVR_RTX_DISABLE) && (OS_EVR_MSGQUEUE != 0) && !defined(EVR_RTX_MESSAGE_QUEUE_PUT_PENDING_DISABLE))
1784 extern void EvrRtxMessageQueuePutPending (osMessageQueueId_t mq_id, const void *msg_ptr, uint32_t timeout);
1785 #else
1786 #define EvrRtxMessageQueuePutPending(mq_id, msg_ptr, timeout)
1787 #endif
1788 
1789 /**
1790  \brief Event on message put timeout (Op)
1791  \param[in] mq_id message queue ID obtained by \ref osMessageQueueNew.
1792 */
1793 #if (!defined(EVR_RTX_DISABLE) && (OS_EVR_MSGQUEUE != 0) && !defined(EVR_RTX_MESSAGE_QUEUE_PUT_TIMEOUT_DISABLE))
1794 extern void EvrRtxMessageQueuePutTimeout (osMessageQueueId_t mq_id);
1795 #else
1796 #define EvrRtxMessageQueuePutTimeout(mq_id)
1797 #endif
1798 
1799 /**
1800  \brief Event on pending message insert (Op)
1801  \param[in] mq_id message queue ID obtained by \ref osMessageQueueNew.
1802  \param[in] msg_ptr pointer to buffer with message to put into a queue.
1803 */
1804 #if (!defined(EVR_RTX_DISABLE) && (OS_EVR_MSGQUEUE != 0) && !defined(EVR_RTX_MESSAGE_QUEUE_INSERT_PENDING_DISABLE))
1805 extern void EvrRtxMessageQueueInsertPending (osMessageQueueId_t mq_id, const void *msg_ptr);
1806 #else
1807 #define EvrRtxMessageQueueInsertPending(mq_id, msg_ptr)
1808 #endif
1809 
1810 /**
1811  \brief Event on successful message insert (Op)
1812  \param[in] mq_id message queue ID obtained by \ref osMessageQueueNew.
1813  \param[in] msg_ptr pointer to buffer with message to put into a queue.
1814 */
1815 #if (!defined(EVR_RTX_DISABLE) && (OS_EVR_MSGQUEUE != 0) && !defined(EVR_RTX_MESSAGE_QUEUE_INSERTED_DISABLE))
1816 extern void EvrRtxMessageQueueInserted (osMessageQueueId_t mq_id, const void *msg_ptr);
1817 #else
1818 #define EvrRtxMessageQueueInserted(mq_id, msg_ptr)
1819 #endif
1820 
1821 /**
1822  \brief Event on unsuccessful message insert (Op)
1823  \param[in] mq_id message queue ID obtained by \ref osMessageQueueNew.
1824  \param[in] msg_ptr pointer to buffer with message to put into a queue.
1825 */
1826 #if (!defined(EVR_RTX_DISABLE) && (OS_EVR_MSGQUEUE != 0) && !defined(EVR_RTX_MESSAGE_QUEUE_NOT_INSERTED_DISABLE))
1827 extern void EvrRtxMessageQueueNotInserted (osMessageQueueId_t mq_id, const void *msg_ptr);
1828 #else
1829 #define EvrRtxMessageQueueNotInserted(mq_id, msg_ptr)
1830 #endif
1831 
1832 /**
1833  \brief Event on message get (API)
1834  \param[in] mq_id message queue ID obtained by \ref osMessageQueueNew.
1835  \param[in] msg_ptr pointer to buffer for message to get from a queue.
1836  \param[in] msg_prio message priority.
1837  \param[in] timeout \ref CMSIS_RTOS_TimeOutValue or 0 in case of no time-out.
1838 */
1839 #if (!defined(EVR_RTX_DISABLE) && (OS_EVR_MSGQUEUE != 0) && !defined(EVR_RTX_MESSAGE_QUEUE_GET_DISABLE))
1840 extern void EvrRtxMessageQueueGet (osMessageQueueId_t mq_id, void *msg_ptr, uint8_t *msg_prio, uint32_t timeout);
1841 #else
1842 #define EvrRtxMessageQueueGet(mq_id, msg_ptr, msg_prio, timeout)
1843 #endif
1844 
1845 /**
1846  \brief Event on pending message get (Op)
1847  \param[in] mq_id message queue ID obtained by \ref osMessageQueueNew.
1848  \param[in] msg_ptr pointer to buffer for message to get from a queue.
1849  \param[in] timeout \ref CMSIS_RTOS_TimeOutValue or 0 in case of no time-out.
1850 */
1851 #if (!defined(EVR_RTX_DISABLE) && (OS_EVR_MSGQUEUE != 0) && !defined(EVR_RTX_MESSAGE_QUEUE_GET_PENDING_DISABLE))
1852 extern void EvrRtxMessageQueueGetPending (osMessageQueueId_t mq_id, void *msg_ptr, uint32_t timeout);
1853 #else
1854 #define EvrRtxMessageQueueGetPending(mq_id, msg_ptr, timeout)
1855 #endif
1856 
1857 /**
1858  \brief Event on message get timeout (Op)
1859  \param[in] mq_id message queue ID obtained by \ref osMessageQueueNew.
1860 */
1861 #if (!defined(EVR_RTX_DISABLE) && (OS_EVR_MSGQUEUE != 0) && !defined(EVR_RTX_MESSAGE_QUEUE_GET_TIMEOUT_DISABLE))
1862 extern void EvrRtxMessageQueueGetTimeout (osMessageQueueId_t mq_id);
1863 #else
1864 #define EvrRtxMessageQueueGetTimeout(mq_id)
1865 #endif
1866 
1867 /**
1868  \brief Event on successful message get (Op)
1869  \param[in] mq_id message queue ID obtained by \ref osMessageQueueNew.
1870  \param[in] msg_ptr pointer to buffer for message to get from a queue.
1871 */
1872 #if (!defined(EVR_RTX_DISABLE) && (OS_EVR_MSGQUEUE != 0) && !defined(EVR_RTX_MESSAGE_QUEUE_RETRIEVED_DISABLE))
1873 extern void EvrRtxMessageQueueRetrieved (osMessageQueueId_t mq_id, void *msg_ptr);
1874 #else
1875 #define EvrRtxMessageQueueRetrieved(mq_id, msg_ptr)
1876 #endif
1877 
1878 /**
1879  \brief Event on unsuccessful message get (Op)
1880  \param[in] mq_id message queue ID obtained by \ref osMessageQueueNew.
1881  \param[in] msg_ptr pointer to buffer for message to get from a queue.
1882 */
1883 #if (!defined(EVR_RTX_DISABLE) && (OS_EVR_MSGQUEUE != 0) && !defined(EVR_RTX_MESSAGE_QUEUE_NOT_RETRIEVED_DISABLE))
1884 extern void EvrRtxMessageQueueNotRetrieved (osMessageQueueId_t mq_id, void *msg_ptr);
1885 #else
1886 #define EvrRtxMessageQueueNotRetrieved(mq_id, msg_ptr)
1887 #endif
1888 
1889 /**
1890  \brief Event on message queue capacity retrieve (API)
1891  \param[in] mq_id message queue ID obtained by \ref osMessageQueueNew.
1892  \param[in] capacity maximum number of messages.
1893 */
1894 #if (!defined(EVR_RTX_DISABLE) && (OS_EVR_MSGQUEUE != 0) && !defined(EVR_RTX_MESSAGE_QUEUE_GET_CAPACITY_DISABLE))
1895 extern void EvrRtxMessageQueueGetCapacity (osMessageQueueId_t mq_id, uint32_t capacity);
1896 #else
1897 #define EvrRtxMessageQueueGetCapacity(mq_id, capacity)
1898 #endif
1899 
1900 /**
1901  \brief Event on message queue message size retrieve (API)
1902  \param[in] mq_id message queue ID obtained by \ref osMessageQueueNew.
1903  \param[in] msg_size maximum message size in bytes.
1904 */
1905 #if (!defined(EVR_RTX_DISABLE) && (OS_EVR_MSGQUEUE != 0) && !defined(EVR_RTX_MESSAGE_QUEUE_GET_MSG_SIZE_DISABLE))
1906 extern void EvrRtxMessageQueueGetMsgSize (osMessageQueueId_t mq_id, uint32_t msg_size);
1907 #else
1908 #define EvrRtxMessageQueueGetMsgSize(mq_id, msg_size)
1909 #endif
1910 
1911 /**
1912  \brief Event on message queue message count retrieve (API)
1913  \param[in] mq_id message queue ID obtained by \ref osMessageQueueNew.
1914  \param[in] count number of queued messages.
1915 */
1916 #if (!defined(EVR_RTX_DISABLE) && (OS_EVR_MSGQUEUE != 0) && !defined(EVR_RTX_MESSAGE_QUEUE_GET_COUNT_DISABLE))
1917 extern void EvrRtxMessageQueueGetCount (osMessageQueueId_t mq_id, uint32_t count);
1918 #else
1919 #define EvrRtxMessageQueueGetCount(mq_id, count)
1920 #endif
1921 
1922 /**
1923  \brief Event on message queue message slots retrieve (API)
1924  \param[in] mq_id message queue ID obtained by \ref osMessageQueueNew.
1925  \param[in] space number of available slots for messages.
1926 */
1927 #if (!defined(EVR_RTX_DISABLE) && (OS_EVR_MSGQUEUE != 0) && !defined(EVR_RTX_MESSAGE_QUEUE_GET_SPACE_DISABLE))
1928 extern void EvrRtxMessageQueueGetSpace (osMessageQueueId_t mq_id, uint32_t space);
1929 #else
1930 #define EvrRtxMessageQueueGetSpace(mq_id, space)
1931 #endif
1932 
1933 /**
1934  \brief Event on message queue reset (API)
1935  \param[in] mq_id message queue ID obtained by \ref osMessageQueueNew.
1936 */
1937 #if (!defined(EVR_RTX_DISABLE) && (OS_EVR_MSGQUEUE != 0) && !defined(EVR_RTX_MESSAGE_QUEUE_RESET_DISABLE))
1938 extern void EvrRtxMessageQueueReset (osMessageQueueId_t mq_id);
1939 #else
1940 #define EvrRtxMessageQueueReset(mq_id)
1941 #endif
1942 
1943 /**
1944  \brief Event on successful message queue reset (Op)
1945  \param[in] mq_id message queue ID obtained by \ref osMessageQueueNew.
1946 */
1947 #if (!defined(EVR_RTX_DISABLE) && (OS_EVR_MSGQUEUE != 0) && !defined(EVR_RTX_MESSAGE_QUEUE_RESET_DONE_DISABLE))
1948 extern void EvrRtxMessageQueueResetDone (osMessageQueueId_t mq_id);
1949 #else
1950 #define EvrRtxMessageQueueResetDone(mq_id)
1951 #endif
1952 
1953 /**
1954  \brief Event on message queue delete (API)
1955  \param[in] mq_id message queue ID obtained by \ref osMessageQueueNew.
1956 */
1957 #if (!defined(EVR_RTX_DISABLE) && (OS_EVR_MSGQUEUE != 0) && !defined(EVR_RTX_MESSAGE_QUEUE_DELETE_DISABLE))
1958 extern void EvrRtxMessageQueueDelete (osMessageQueueId_t mq_id);
1959 #else
1960 #define EvrRtxMessageQueueDelete(mq_id)
1961 #endif
1962 
1963 /**
1964  \brief Event on successful message queue delete (Op)
1965  \param[in] mq_id message queue ID obtained by \ref osMessageQueueNew.
1966 */
1967 #if (!defined(EVR_RTX_DISABLE) && (OS_EVR_MSGQUEUE != 0) && !defined(EVR_RTX_MESSAGE_QUEUE_DESTROYED_DISABLE))
1968 extern void EvrRtxMessageQueueDestroyed (osMessageQueueId_t mq_id);
1969 #else
1970 #define EvrRtxMessageQueueDestroyed(mq_id)
1971 #endif
1972 
1973 
1974 #endif // RTX_EVR_H_
Attributes structure for thread.
Definition: cmsis_os2.h:240
Attributes structure for memory pool.
Definition: cmsis_os2.h:285
Attributes structure for event flags.
Definition: cmsis_os2.h:261
Attributes structure for message queue.
Definition: cmsis_os2.h:295
Memory Pool Information.
Definition: rtx_os.h:213
Attributes structure for timer.
Definition: cmsis_os2.h:253
Attributes structure for semaphore.
Definition: cmsis_os2.h:277
Version information.
Definition: cmsis_os2.h:76
Attributes structure for mutex.
Definition: cmsis_os2.h:269
Important Information for this Arm website

This site uses cookies to store information on your computer. By continuing to use our site, you consent to our cookies. If you are not happy with the use of these cookies, please review our Cookie Policy to learn how they can be disabled. By disabling cookies, some features of the site will not work.