]> begriffs open source - cmsis/blob - CMSIS/DoxyGen/RTOS2/src/cmsis_os2_Migration.txt
RTOS2 Doc
[cmsis] / CMSIS / DoxyGen / RTOS2 / src / cmsis_os2_Migration.txt
1 /*=======0=========1=========2=========3=========4=========5=========6=========7=========8=========9=========0=========1====*/
2 /**
3 \page os2Migration Migration from API v1 to API v2
4
5 To use the API version 2 functions follow the steps described in:
6  - \subpage os2MigrationGuide - Steps to migrate from API version 1 to API version 2
7  - \subpage os2MigrationFunctions - List of function differences
8
9 \if NEVER_ENABLE
10 =======0=========1=========2=========3=========4=========5=========6=========7=========8=========9=========0=========1====
11        Functions 
12 \endif
13 \page os2MigrationFunctions Detailed API Function Differences 
14
15 This section lists the CMSIS-RTOS API v1 and API v2 functions along with the differences in functionality.
16 The list is sorted alphabetically by API v2 function names and is structured the following way:
17
18   - RTOS API v2 function prototype
19   - RTOS API v1 function prototype that is equivalent or provides similar functionality
20   - Brief description of the RTOS v2 function.
21   - Description of the difference.
22
23 The background color indicates:
24   - <div class="new">Green: New functions in API v2 that are not available in API v1 </div>
25   
26   - <div class="mod">Amber: Functions that are modified or replaced in API v2 compared to API v1 </div>
27   
28   - <div class="del">Red: Functions in API v1 that are deprecated in API v2 </div>
29
30
31 \if NEVER_ENABLE
32 =======0=========1=========2=========3=========4=========5=========6=========7=========8=========9=========0=========1====
33        Kernel Information and Control  
34 \endif
35
36 \section mig_kernel Kernel Information and Control
37
38 \div{new}
39 \func{osStatus_t #osKernelGetInfo (osVersion_t* version, char* id_buf, uint32_t id_size)}
40 \none
41 \copybrief{osKernelGetInfo}
42 New function #osKernelGetInfo.
43 \enddiv
44
45 \div{mod} 
46 \func{osKernelState_t #osKernelGetState (void)}
47 \func{int32_t &nbsp; &nbsp; &nbsp; &nbsp; osKernelRunning (void)}
48 \copybrief{osKernelGetState}
49  - The function \b osKernelGetState replaces the RTOS v1 function \b osKernelRunning.
50  - Return type changed to \ref osKernelState_t.
51
52 \enddiv
53
54 \div{mod}
55 \func{uint32_t #osKernelGetTickCount (void)}
56 \func{uint32_t osKernelSysTick (void)}
57 \copybrief{osKernelGetTickCount}
58  - The function \b osKernelGetTickCount replaces the RTOS v1 function \b osKernelSysTick.
59
60 \enddiv
61
62 \div{new}
63 \func{uint32_t #osKernelGetTickFreq (void)}
64 \none
65 \copybrief{osKernelGetTickFreq}
66  - The function \b osKernelGetTickFreq replaces the RTOS v1 macro \b osKernelTickMicroSec.
67
68 \enddiv
69
70 \div{new}
71 \func{uint64_t #osKernelGetSysTimerCount (void)}
72 \none
73 \copybrief{osKernelGetSysTimerCount}
74 New function.
75 \enddiv
76
77 \div{new}
78 \func{uint64_t #osKernelGetSysTimerFreq (void)}
79 \none
80 \copybrief{osKernelGetSysTimerFreq}
81 New function.
82 \enddiv
83
84 \div{mod}
85 \func{osStatus_t #osKernelInitialize (void)}
86 \func{osStatus &nbsp; osKernelInitialize (void)}
87 \copybrief{osKernelInitialize}
88  - Return type changed to \ref osStatus_t.
89
90 \enddiv
91
92 \div{new}
93 \func{uint32_t #osKernelLock (void)}
94 \none
95 \copybrief{osKernelLock}
96 New function.
97 \enddiv
98
99 \div{new}
100 \func{void #osKernelResume (uint32_t sleep_time)}
101 \none
102 \copybrief{osKernelResume}
103 New function.
104 \enddiv
105
106 \div{mod}
107 \func{osStatus_t #osKernelStart (void)}
108 \func{osStatus &nbsp; osKernelStart (void)}
109 \copybrief{osKernelStart}
110  - Return type changed to \ref osStatus_t.
111
112 \enddiv
113
114 \div{new}
115 \func{uint32_t #osKernelSuspend (void)}
116 \none
117 \copybrief{osKernelSuspend}
118 New function.
119 \enddiv
120
121 \div{new}
122 \func{void #osKernelUnlock (void)}
123 \none
124 \copybrief{osKernelUnlock}
125 New function.
126 \enddiv
127
128
129 \if NEVER_ENABLE
130 =======0=========1=========2=========3=========4=========5=========6=========7=========8=========9=========0=========1====
131 ======  Thread Management  =======
132 \endif 
133
134 \section mig_threadMgmt Thread Management
135
136 \div{new}
137 \func{osStatus_t #osThreadDetach (osThreadId_t thread_id)}
138 \none
139 \copybrief{osThreadDetach}
140 New function.
141 \enddiv
142
143 \div{new}
144 \func{__NO_RETURN void #osThreadExit (void)}
145 \none
146 \copybrief{osThreadExit}
147 New function.
148 \enddiv
149
150 \div{new}
151 \func{const char *#osThreadGetName (osThreadId_t thread_id)}
152 \none
153 \copybrief{osThreadGetName}
154 New function.
155 \enddiv
156
157 \div{mod}
158 \func{osThreadId_t #osThreadGetId (void)}
159 \func{osThreadId &nbsp; osThreadGetId (void)}
160 \copybrief{osThreadGetId}
161  - Return type changed to #osThreadId_t.
162
163 \enddiv
164
165 \div{mod}
166 \func{osPriority_t #osThreadGetPriority (osThreadId_t thread_id)}
167 \func{osPriority &nbsp; osThreadGetPriority (osThreadId thread_id)}
168 \copybrief{osThreadGetPriority}
169  - Return type changed to #osPriority_t. 
170  - Parameter type changed to #osThreadId_t.
171
172 \enddiv
173
174 \div{new}
175 \func{osThreadState_t #osThreadGetState (osThreadId_t thread_id)}
176 \none
177 \copybrief{osThreadGetState}
178 New function.
179 \enddiv
180
181 \div{new}
182 \func{osStatus_t #osThreadJoin (osThreadId_t thread_id)}
183 \none
184 \copybrief{osThreadJoin}
185 New function.
186 \enddiv
187
188 \div{mod}
189 \func{osThreadId_t #osThreadNew (os_thread_func_t function, void *argument, const osThreadAttr_t *attr)}
190 \func{osThreadId &nbsp; osThreadCreate (const osThreadDef_t *thread_def, void *argument)} 
191 \copybrief{osThreadNew}
192  - The function \b osThreadNew replaces the RTOS v1 function \b osThreadCreate.
193  - Options are now passed using a \ref osThreadAttr_t struct, replacing the \b osThreadDef macro. 
194  - New function prototype is <kbd>void func (void *arg)</kbd>, before: <kbd>void func (const void *arg)</kbd>.
195
196 \enddiv
197
198 \div{new}
199 \func{osStatus_t #osThreadResume (osThreadId_t thread_id)}
200 \none
201 \copybrief{osThreadResume}
202 New function.
203 \enddiv
204
205 \div{mod}
206 \func{osStatus_t #osThreadSetPriority (osThreadId_t thread_id, osPriority_t priority)}
207 \func{osStatus  &nbsp; osThreadSetPriority (osThreadId thread_id, osPriority priority)} 
208 \copybrief{osThreadSetPriority}
209  - Return type changed to #osStatus_t. 
210  - Parameter types changed to #osThreadId_t and #osPriority_t.
211
212 \enddiv
213
214 \div{new}
215 \func{osStatus_t #osThreadSuspend (osThreadId_t thread_id)}
216 \none
217 \copybrief{osThreadSuspend}
218 New function.
219 \enddiv
220
221 \div{new}
222 \func{osStatus_t #osThreadTerminate (osThreadId_t thread_id)}
223 \none
224 \copybrief{osThreadTerminate}
225 New function.
226 \enddiv
227
228 \div{mod}
229 \func{osStatus_t #osThreadYield (void)}
230 \func{osStatus  &nbsp; osThreadYield (void)} 
231 \copybrief{osThreadYield}
232  - Return type changed to #osStatus_t.
233
234 \enddiv
235
236
237 \if NEVER_ENABLE
238 =======0=========1=========2=========3=========4=========5=========6=========7=========8=========9=========0=========1====
239 ======  Generic Wait Functions  =======
240 \endif
241
242 \section mig_wait Generic Wait Functions
243 \details
244 Refer to \ref CMSIS_RTOS_Wait for details.
245
246 \div{mod}
247 \func{osStatus_t #osDelay (uint32_t ticks)}
248 \func{osStatus &nbsp; osDelay (uint32_t timeout)}
249 \copybrief{osDelay}
250  - The return type changed to #osStatus_t. 
251
252 \enddiv
253
254 \div{mod}
255 \func{osStatus_t #osDelayUntil (uint64_t ticks)}
256 \func{osStatus &nbsp; osDelayUntil (uint64_t timeout)}
257 \copybrief{osDelayUntil}
258  - The return type changed to #osStatus_t. 
259
260 \enddiv
261
262
263 \if NEVER_ENABLE
264 =======0=========1=========2=========3=========4=========5=========6=========7=========8=========9=========0=========1====
265 ======  Timer Management  =======
266 \endif
267
268 \section mig_timer Timer Management
269 \details
270 Refer to \ref CMSIS_RTOS_TimerMgmt for details.
271
272 \div{mod}
273 \func{osStatus_t #osTimerDelete (osTimerId_t timer_id)}
274 \func{osStatus &nbsp; osTimerDelete (osTimerId timer_id)}
275 \copybrief{osTimerDelete}
276  - The return type changed to #osStatus_t. 
277  - The parameter type has changed to #osTimerId_t.
278
279 \enddiv
280
281 \div{new}
282 \func{uint32_t #osTimerIsRunning (osTimerId_t timer_id)}
283 \none
284 \copybrief{osTimerIsRunning}
285 New function.
286 \enddiv
287
288 \div{mod}
289 \func{osTimerId_t #osTimerNew (os_timer_func_t func, osTimerType_t type, void *argument, const osTimerAttr_t *attr)}
290 \func{osTimerId &nbsp; osTimerCreate (const osTimerDef_t *timer_def, os_timer_type type, void *argument)}
291 \copybrief{osTimerNew}
292  - The function \b osTimerNew replaces the RTOS v1 function \b osTimerCreate.
293  - The return type changed to #osTimerId_t. 
294  - The parameter list and types have changed.
295
296 \enddiv
297
298 \div{mod}
299 \func{osStatus_t #osTimerStart (osTimerId_t timer_id, uint32_t ticks)}
300 \func{osStatus &nbsp; osTimerStart (osTimerId timer_id, uint32_t timeout)}
301 \copybrief{osTimerStart}
302  - The return type changed to #osStatus_t. 
303  - The first parameter type has changed to #osTimerId_t.
304
305 \enddiv
306
307 \div{mod}
308 \func{osStatus_t #osTimerStop (osTimerId_t timer_id)}
309 \func{osStatus &nbsp; osTimerStop (osTimerId timer_id)}
310 \copybrief{osTimerStop}
311  - The return type changed to #osStatus_t. 
312  - The parameter type has changed to #osTimerId_t.
313
314 \enddiv
315
316
317 \if NEVER_ENABLE
318 =======0=========1=========2=========3=========4=========5=========6=========7=========8=========9=========0=========1====
319 ======  Signal Events  =======
320 \endif
321
322 \section mig_signalEvents Signal Events
323 \details
324 The section RTOS v1 <b>Signal Events</b> has been deprecated.
325 Use the functions listed under \ref mig_threadFlags and \ref mig_eventFlags instead.
326
327 \div{del}
328 \none
329 \func{int32_t osSignalClear (osThreadId thread_id, int32_t signals)}
330 \n
331 Deprecated.
332 \enddiv
333
334 \div{del}
335 \none
336 \func{int32_t osSignalSet (osThreadId thread_id, int32_t signals)}
337 \n
338 Deprecated.
339 \enddiv
340
341 \div{del}
342 \none
343 \func{osEvent osSignalWait (int32_t signals, uint32_t timeout)}
344 \n
345 Deprecated.
346 \enddiv
347
348
349
350 \if NEVER_ENABLE
351 =======0=========1=========2=========3=========4=========5=========6=========7=========8=========9=========0=========1====
352 ======  Event Flags  =======
353 \endif 
354
355 \section mig_eventFlags Event Flags
356 \details
357 New section to synchronize events using flags. Event flags and thread flags are replacing the RTOS v1 <b>Signal Events</b>.
358 All functions listed in the RTOS v1 <b>Signal Events</b> have been deprecated.
359 Refer to \ref mig_signalEvents for a list of deprecated functions.
360 Refer to \ref CMSIS_RTOS_EventFlags for details about the new function.
361
362 \div{new}
363 \func{int32_t #osEventFlagsClear (osEventFlagsId_t ef_id, int32_t flags)}
364 \none
365 \copybrief{osEventFlagsClear}
366 New function.
367 \enddiv
368
369 \div{new}
370 \func{osStatus_t #osEventFlagsDelete (osEventFlagsId_t ef_id)}
371 \none
372 \copybrief{osEventFlagsDelete}
373 New function.
374 \enddiv
375
376 \div{new}
377 \func{int32_t #osEventFlagsGet (osEventFlagsId_t ef_id)}
378 \none
379 \copybrief{osEventFlagsGet}
380 New function.
381 \enddiv
382
383 \div{new}
384 \func{osEventFlagsId_t #osEventFlagsNew (const osEventFlagsAttr_t *attr)}
385 \none
386 \copybrief{osEventFlagsNew}
387 New function.
388 \enddiv
389
390 \div{new}
391 \func{int32_t #osEventFlagsSet (osEventFlagsId_t ef_id, int32_t flags)}
392 \none
393 \copybrief{osEventFlagsSet}
394 New function.
395 \enddiv
396
397 \div{new}
398 \func{int32_t #osEventFlagsWait (osEventFlagsId_t ef_id, int32_t flags, uint32_t options, uint32_t timeout)}
399 \none
400 \copybrief{osEventFlagsWait}
401 New function.
402 \enddiv
403
404
405 \if NEVER_ENABLE
406 =======0=========1=========2=========3=========4=========5=========6=========7=========8=========9=========0=========1====
407 ======  Thread Flags  =======
408 \endif 
409
410 \section mig_threadFlags Thread Flags
411 \details
412 New section to synchronize threads using flags. Thread flags and the more flexible \ref mig_eventFlags are replacing the RTOS v1 <b>Signal Events</b>. Refer to \ref mig_signalEvents for a list of deprecated functions.
413 Refer to \ref CMSIS_RTOS_ThreadFlagsMgmt for details.
414
415 \div{new}
416 \func{int32_t #osThreadFlagsSet (osThreadId_t thread_id, int32_t flags)}
417 \none
418 \copybrief{osThreadFlagsSet}
419 New function.
420 \enddiv
421
422 \div{new}
423 \func{int32_t #osThreadFlagsClear (int32_t flags)}
424 \none
425 \copybrief{osThreadFlagsClear}
426 New function.
427 \enddiv
428
429 \div{new}
430 \func{int32_t #osThreadFlagsGet (void)}
431 \none
432 \copybrief{osThreadFlagsGet}
433 New function.
434 \enddiv
435
436 \div{new}
437 \func{int32_t #osThreadFlagsWait (int32_t flags, uint32_t options, uint32_t timeout)}
438 \none
439 \copybrief{osThreadFlagsWait}
440 New function.
441 \enddiv
442
443
444 \if NEVER_ENABLE
445 =======0=========1=========2=========3=========4=========5=========6=========7=========8=========9=========0=========1====
446 ======  Message Queue  =======
447 \endif
448
449 \section mig_msgQueue Message Queue
450 Refer to \ref CMSIS_RTOS_Message for details.
451
452 \div{new}
453 \func{osStatus_t #osMessageQueueDelete (osMessageQueueId_t mq_id)}
454 \none
455 \copybrief{osMessageQueueDelete}
456 New function.
457 \enddiv
458
459 \div{mod}
460 \func{osStatus_t #osMessageQueueGet (osMessageQueueId_t mq_id, void *msg_ptr, uint8_t *msg_prio, uint32_t timeout)}
461 \func{osEvent &nbsp;&nbsp; osMessageGet (osMessageQId queue_id, uint32_t timeout)}
462 \copybrief{osMessageQueueGet}
463  - The function \b osMessageQueueGet replaces the RTOS v1 function \b osMessageGet.
464  - The return type changed to #osStatus_t. 
465  - The parameter list and parameter types have changed. 
466
467 \enddiv
468
469 \div{new}
470 \func{uint32_t #osMessageQueueGetCapacity (osMessageQueueId_t mq_id)}
471 \none
472 \copybrief{osMessageQueueGetCapacity}
473 New function.
474 \enddiv
475
476 \div{new}
477 \func{uint32_t #osMessageQueueGetCount (osMessageQueueId_t mq_id)}
478 \none
479 \copybrief{osMessageQueueGetCount}
480 New function.
481 \enddiv
482
483 \div{new}
484 \func{uint32_t #osMessageQueueGetMsgSize (osMessageQueueId_t mq_id)}
485 \none
486 \copybrief{osMessageQueueGetMsgSize}
487 New function.
488 \enddiv
489
490 \div{new}
491 \func{uint32_t #osMessageQueueGetSpace (osMessageQueueId_t mq_id)}
492 \none
493 \copybrief{osMessageQueueGetSpace}
494 New function.
495 \enddiv
496
497 \div{mod}
498 \func{osMessageQueueId_t #osMessageQueueNew (uint32_t msg_count, uint32_t msg_size, const osMessageQueueAttr_t *attr)}
499 \func{osMessageQId &nbsp; &nbsp; &nbsp; osMessageCreate (const osMessageQDef_t *queue_def, osThreadId thread_id)}
500 \copybrief{osMessageQueueNew}
501  - The function \b osMessageQueueNew replaces the RTOS v1 function \b osMessageCreate.
502  - The return type changed to #osMessageQueueId_t. 
503  - The parameter list and parameter types have changed. 
504
505 \enddiv
506
507 \div{mod}
508 \func{osStatus_t #osMessageQueuePut (osMessageQueueId_t mq_id, const void *msg_ptr, uint8_t msg_prio, uint32_t timeout)}
509 \func{osStatus &nbsp; osMessagePut (osMessageQId queue_id, uint32_t info, uint32_t timeout)}
510 \copybrief{osMessageQueuePut}
511  - The function \b osMessageQueuePut replaces the RTOS v1 function \b osMessagePut.
512  - The return type changed to #osStatus_t. 
513  - The parameter list and parameter types have changed. 
514
515 \enddiv
516
517 \div{new}
518 \func{osStatus_t #osMessageQueueReset (osMessageQueueId_t mq_id)}
519 \none
520 \copybrief{osMessageQueueReset}
521 New function.
522 \enddiv
523
524
525 \if NEVER_ENABLE
526 =======0=========1=========2=========3=========4=========5=========6=========7=========8=========9=========0=========1====
527 ======  Memory Pool  =======
528 \endif
529
530 \section mig_memPool Memory Pool
531
532 \div{mod}
533 \func{void * #osMemoryPoolAlloc (osMemoryPoolId_t mp_id, uint32_t timeout)}
534 \func{void * osPoolAlloc &nbsp;(osPoolId pool_id)} 
535 \func{void * osPoolCAlloc (osPoolId pool_id)} 
536 \copybrief{osMemoryPoolAlloc}
537  - The function \b osMemoryPoolAlloc replaces both RTOS v1 functions \b osPoolAlloc and \b osPoolCAlloc.
538  - The parameter list and types changed.
539
540 \enddiv
541
542 \div{new}
543 \func{osStatus_t #osMemoryPoolDelete (osMemoryPoolId_t mp_id)}
544 \none
545 \copybrief{osMemoryPoolDelete}
546 New function.
547 \enddiv
548
549 \div{mod}
550 \func{osStatus_t #osMemoryPoolFree (osMemoryPoolId_t mp_id, void * block)}
551 \func{osStatus &nbsp; osPoolFree (osPoolId pool_id, void * block)} 
552 \copybrief{osMemoryPoolFree}
553  - The function \b osMemoryPoolFree replaces the RTOS v1 function \b osPoolFree.
554  - The first parameter type \b osMemoryPoolId_t replaces the ROTS v1 type \b osPoolId.
555
556 \enddiv
557
558 \div{new}
559 \func{uint32_t #osMemoryPoolGetBlockSize (osMemoryPoolId_t mp_id)}
560 \none
561 \copybrief{osMemoryPoolGetBlockSize}
562 New function.
563 \enddiv
564
565 \div{new}
566 \func{uint32_t #osMemoryPoolGetCapacity (osMemoryPoolId_t mp_id)}
567 \none
568 \copybrief{osMemoryPoolGetCapacity}
569 New function.
570 \enddiv
571
572 \div{new}
573 \func{uint32_t #osMemoryPoolGetCount (osMemoryPoolId_t mp_id)}
574 \none
575 \copybrief{osMemoryPoolGetCount}
576 New function.
577 \enddiv
578
579 \div{new}
580 \func{uint32_t #osMemoryPoolGetSpace (osMemoryPoolId_t mp_id)}
581 \none
582 \copybrief{osMemoryPoolGetSpace}
583 New function.
584 \enddiv
585
586 \div{mod}
587 \func{osMemoryPoolId_t #osMemoryPoolNew (uint32_t block_count, uint32_t block_size, const osMemoryPoolAttr_t *attr)}
588 \func{osPoolId &nbsp; &nbsp; &nbsp; &nbsp; osPoolCreate (const osPoolDef_t * pool_def)}
589 \copybrief{osMemoryPoolGetSpace}
590  - The function \b osMemoryPoolNew replaces the RTOS v1 function \b osPoolCreate. 
591  - The return type changed to #osMemoryPoolId_t.
592  - Parameter list and parameter types have changed.
593
594 \enddiv
595
596
597 \if NEVER_ENABLE
598 =======0=========1=========2=========3=========4=========5=========6=========7=========8=========9=========0=========1====
599 ======  Mail Queue  =======
600 \endif
601
602 \section mig_mailQueue Mail Queue
603 The <b>Mail Queue</b> RTOS v1 functions have been deprecated.
604 Use the functionality of the \ref CMSIS_RTOS_Message instead. 
605 Differences are listed under \ref mig_msgQueue.
606
607 \div{del}
608 \none
609 \func{void * osMailAlloc (osMailQId queue_id, uint32_t timeout)}
610 \n
611 Deprecated.
612 \enddiv
613
614 \div{del}
615 \none
616 \func{void * osMailCAlloc (osMailQId queue_id, uint32_t timeout)}
617 \n
618 Deprecated.
619 \enddiv
620
621 \div{del}
622 \none
623 \func{osMailQId osMailCreate (const osMailQDef_t *queue_def, osThreadId thread_id)}
624 \n
625 Deprecated.
626 \enddiv
627
628 \div{del}
629 \none
630 \func{osStatus osMailFree (osMailQId queue_id, void *mail)}
631 \n
632 Deprecated.
633 \enddiv
634
635 \div{del}
636 \none
637 \func{osEvent osMailGet (osMailQId queue_id, uint32_t timeout)}
638 \n
639 Deprecated.
640 \enddiv
641
642 \div{del}
643 \none
644 \func{osStatus osMailPut (osMailQId queue_id, void *mail)}
645 \n
646 Deprecated.
647 \enddiv
648
649
650 \if NEVER_ENABLE
651 =======0=========1=========2=========3=========4=========5=========6=========7=========8=========9=========0=========1====
652 ======  Mutexes  =======
653 \endif
654
655 \section mig_mutex Mutexes
656 Refer to \ref CMSIS_RTOS_MutexMgmt for details.
657
658 \div{mod}
659 \func{osStatus_t #osMutexAcquire (osMutexId_t mutex_id, uint32_t timeout)}
660 \func{osStatus &nbsp; osMutexWait (osMutexId mutex_id, uint32_t timeout)}
661 \copybrief{osMutexAcquire}
662  - The function \b osMutexAcquire replaces the RTOS v1 function \b osMutexWait.
663  - Return type changed to \ref osStatus_t. 
664  - First parameter type changed to \ref osMutexId_t.
665
666 \enddiv
667
668 \div{mod}
669 \func{osStatus_t #osMutexDelete (osMutexId_t mutex_id)}
670 \func{osStatus  &nbsp; osMutexDelete (osMutexId mutex_id)}
671 \copybrief{osMutexDelete}
672  - The return type changed to \ref osStatus_t. 
673  - The parameter type changed to \ref osMutexId_t.
674
675 \enddiv
676
677 \div{new}
678 \func{osThreadId_t #osMutexGetOwner (osMutexId_t mutex_id)}
679 \none
680 \copybrief{osMutexGetOwner}
681 New function.
682 \enddiv
683
684 \div{mod}
685 \func{osMutexId_t #osMutexNew (const osMutexAttr_t *attr)}
686 \func{osMutexId &nbsp; osMutexCreate (const osMutexDef_t *mutex_def)}
687 \copybrief{osMutexNew}
688  - The function \b osMutexNew replaces the RTOS v1 function \b osMutexCreate.
689  - The return type changed to \ref osMutexId_t. 
690  - The parameter type changed to \ref osMutexAttr_t.
691
692 \enddiv
693
694 \div{mod}
695 \func{osStatus_t #osMutexRelease (osMutexId_t mutex_id)}
696 \func{osStatus  &nbsp; osMutexRelease (osMutexId mutex_id)}
697 \copybrief{osMutexRelease}
698  - The return type changed to \ref osStatus_t. 
699  - The parameter type changed to \ref osMutexId_t.
700
701 \enddiv
702
703
704 \if NEVER_ENABLE
705 =======0=========1=========2=========3=========4=========5=========6=========7=========8=========9=========0=========1====
706 ======  SEMAPHORES  =======
707 \endif
708
709 \section mig_sem Semaphores
710 Refer to \ref CMSIS_RTOS_SemaphoreMgmt for details.
711
712 \div{new}
713 \func{osStatus_t #osSemaphoreAcquire (osSemaphoreId_t semaphore_id, uint32_t timeout)}
714 \none
715 \copybrief{osSemaphoreAcquire}
716 New function.
717 \enddiv
718
719 \div{mod}
720 \func{osStatus_t #osSemaphoreDelete (osSemaphoreId_t semaphore_id)}
721 \func{osStatus &nbsp; osSemaphoreDelete (osSemaphoreId semaphore_id)}
722 \copybrief{osSemaphoreDelete}
723  - The return type changed to #osStatus_t. 
724  - The parameter type has changed to #osSemaphoreId_t.
725
726 \enddiv
727
728 \div{new}
729 \func{uint32_t #osSemaphoreGetCount (osSemaphoreId_t semaphore_id)}
730 \none
731 \copybrief{osSemaphoreGetCount}
732 New function.
733 \enddiv
734
735 \div{mod}
736 \func{osSemaphoreId_t #osSemaphoreNew (uint32_t max_count, uint32_t initial_count, const osSemaphoreAttr_t *attr)}
737 \func{osSemaphoreId &nbsp; osSemaphoreCreate (const osSemaphoreDef_t *semaphore_def, int32_t count)}
738 \copybrief{osSemaphoreNew}
739  - The function \b osSemaphoreNew replaces the RTOS v1 function \b osSemaphoreCreate.
740  - The return type changed to #osSemaphoreId_t. 
741  - The parameter list and types have changed.
742
743 \enddiv
744
745 \div{mod}
746 \func{osStatus_t #osSemaphoreRelease (osSemaphoreId_t semaphore_id)}
747 \func{osStatus &nbsp; osSemaphoreRelease (osSemaphoreId semaphore_id)}
748 \copybrief{osSemaphoreRelease}
749  - The return type changed to #osStatus_t. 
750  - The parameter type has changed to #osSemaphoreId_t.
751
752 \enddiv
753
754 \div{del}
755 \none
756 \func{int32_t osSemaphoreWait (osSemaphoreId semaphore_id, uint32_t timeout)}
757 \n
758 Deprecated. 
759 \enddiv
760 */