Subversion Repositories DashDisplay

Rev

Rev 2 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 2 Rev 5
Line 334... Line 334...
334
 
334
 
335
 
335
 
336
//  ==== Generic Wait Functions ====
336
//  ==== Generic Wait Functions ====
337
 
337
 
338
/// Wait for Timeout (Time Delay).
338
/// Wait for Timeout (Time Delay).
339
/// \param[in]     millisec      time delay value
339
/// \param[in]     millisec      \ref CMSIS_RTOS_TimeOutValue "time delay" value
340
/// \return status code that indicates the execution status of the function.
340
/// \return status code that indicates the execution status of the function.
341
osStatus osDelay (uint32_t millisec);
341
osStatus osDelay (uint32_t millisec);
342
 
342
 
343
#if (defined (osFeature_Wait)  &&  (osFeature_Wait != 0))     // Generic Wait available
343
#if (defined (osFeature_Wait)  &&  (osFeature_Wait != 0))     // Generic Wait available
344
 
344
 
345
/// Wait for Signal, Message, Mail, or Timeout.
345
/// Wait for Signal, Message, Mail, or Timeout.
346
/// \param[in] millisec          timeout value or 0 in case of no time-out
346
/// \param[in] millisec          \ref CMSIS_RTOS_TimeOutValue or 0 in case of no time-out
347
/// \return event that contains signal, message, or mail information or error code.
347
/// \return event that contains signal, message, or mail information or error code.
348
/// \note MUST REMAIN UNCHANGED: \b osWait shall be consistent in every CMSIS-RTOS.
348
/// \note MUST REMAIN UNCHANGED: \b osWait shall be consistent in every CMSIS-RTOS.
349
osEvent osWait (uint32_t millisec);
349
osEvent osWait (uint32_t millisec);
350
 
350
 
351
#endif  // Generic Wait available
351
#endif  // Generic Wait available
Line 381... Line 381...
381
/// \note MUST REMAIN UNCHANGED: \b osTimerCreate shall be consistent in every CMSIS-RTOS.
381
/// \note MUST REMAIN UNCHANGED: \b osTimerCreate shall be consistent in every CMSIS-RTOS.
382
osTimerId osTimerCreate (const osTimerDef_t *timer_def, os_timer_type type, void *argument);
382
osTimerId osTimerCreate (const osTimerDef_t *timer_def, os_timer_type type, void *argument);
383
 
383
 
384
/// Start or restart a timer.
384
/// Start or restart a timer.
385
/// \param[in]     timer_id      timer ID obtained by \ref osTimerCreate.
385
/// \param[in]     timer_id      timer ID obtained by \ref osTimerCreate.
386
/// \param[in]     millisec      time delay value of the timer.
386
/// \param[in]     millisec      \ref CMSIS_RTOS_TimeOutValue "time delay" value of the timer.
387
/// \return status code that indicates the execution status of the function.
387
/// \return status code that indicates the execution status of the function.
388
/// \note MUST REMAIN UNCHANGED: \b osTimerStart shall be consistent in every CMSIS-RTOS.
388
/// \note MUST REMAIN UNCHANGED: \b osTimerStart shall be consistent in every CMSIS-RTOS.
389
osStatus osTimerStart (osTimerId timer_id, uint32_t millisec);
389
osStatus osTimerStart (osTimerId timer_id, uint32_t millisec);
390
 
390
 
391
/// Stop the timer.
391
/// Stop the timer.
Line 417... Line 417...
417
/// \note MUST REMAIN UNCHANGED: \b osSignalClear shall be consistent in every CMSIS-RTOS.
417
/// \note MUST REMAIN UNCHANGED: \b osSignalClear shall be consistent in every CMSIS-RTOS.
418
int32_t osSignalClear (osThreadId thread_id, int32_t signals);
418
int32_t osSignalClear (osThreadId thread_id, int32_t signals);
419
 
419
 
420
/// Wait for one or more Signal Flags to become signaled for the current \b RUNNING thread.
420
/// Wait for one or more Signal Flags to become signaled for the current \b RUNNING thread.
421
/// \param[in]     signals       wait until all specified signal flags set or 0 for any single signal flag.
421
/// \param[in]     signals       wait until all specified signal flags set or 0 for any single signal flag.
422
/// \param[in]     millisec      timeout value or 0 in case of no time-out.
422
/// \param[in]     millisec      \ref CMSIS_RTOS_TimeOutValue or 0 in case of no time-out.
423
/// \return event flag information or error code.
423
/// \return event flag information or error code.
424
/// \note MUST REMAIN UNCHANGED: \b osSignalWait shall be consistent in every CMSIS-RTOS.
424
/// \note MUST REMAIN UNCHANGED: \b osSignalWait shall be consistent in every CMSIS-RTOS.
425
osEvent osSignalWait (int32_t signals, uint32_t millisec);
425
osEvent osSignalWait (int32_t signals, uint32_t millisec);
426
 
426
 
427
 
427
 
Line 452... Line 452...
452
/// \note MUST REMAIN UNCHANGED: \b osMutexCreate shall be consistent in every CMSIS-RTOS.
452
/// \note MUST REMAIN UNCHANGED: \b osMutexCreate shall be consistent in every CMSIS-RTOS.
453
osMutexId osMutexCreate (const osMutexDef_t *mutex_def);
453
osMutexId osMutexCreate (const osMutexDef_t *mutex_def);
454
 
454
 
455
/// Wait until a Mutex becomes available.
455
/// Wait until a Mutex becomes available.
456
/// \param[in]     mutex_id      mutex ID obtained by \ref osMutexCreate.
456
/// \param[in]     mutex_id      mutex ID obtained by \ref osMutexCreate.
457
/// \param[in]     millisec      timeout value or 0 in case of no time-out.
457
/// \param[in]     millisec      \ref CMSIS_RTOS_TimeOutValue or 0 in case of no time-out.
458
/// \return status code that indicates the execution status of the function.
458
/// \return status code that indicates the execution status of the function.
459
/// \note MUST REMAIN UNCHANGED: \b osMutexWait shall be consistent in every CMSIS-RTOS.
459
/// \note MUST REMAIN UNCHANGED: \b osMutexWait shall be consistent in every CMSIS-RTOS.
460
osStatus osMutexWait (osMutexId mutex_id, uint32_t millisec);
460
osStatus osMutexWait (osMutexId mutex_id, uint32_t millisec);
461
 
461
 
462
/// Release a Mutex that was obtained by \ref osMutexWait.
462
/// Release a Mutex that was obtained by \ref osMutexWait.
Line 502... Line 502...
502
/// \note MUST REMAIN UNCHANGED: \b osSemaphoreCreate shall be consistent in every CMSIS-RTOS.
502
/// \note MUST REMAIN UNCHANGED: \b osSemaphoreCreate shall be consistent in every CMSIS-RTOS.
503
osSemaphoreId osSemaphoreCreate (const osSemaphoreDef_t *semaphore_def, int32_t count);
503
osSemaphoreId osSemaphoreCreate (const osSemaphoreDef_t *semaphore_def, int32_t count);
504
 
504
 
505
/// Wait until a Semaphore token becomes available.
505
/// Wait until a Semaphore token becomes available.
506
/// \param[in]     semaphore_id  semaphore object referenced with \ref osSemaphoreCreate.
506
/// \param[in]     semaphore_id  semaphore object referenced with \ref osSemaphoreCreate.
507
/// \param[in]     millisec      timeout value or 0 in case of no time-out.
507
/// \param[in]     millisec      \ref CMSIS_RTOS_TimeOutValue or 0 in case of no time-out.
508
/// \return number of available tokens, or -1 in case of incorrect parameters.
508
/// \return number of available tokens, or -1 in case of incorrect parameters.
509
/// \note MUST REMAIN UNCHANGED: \b osSemaphoreWait shall be consistent in every CMSIS-RTOS.
509
/// \note MUST REMAIN UNCHANGED: \b osSemaphoreWait shall be consistent in every CMSIS-RTOS.
510
int32_t osSemaphoreWait (osSemaphoreId semaphore_id, uint32_t millisec);
510
int32_t osSemaphoreWait (osSemaphoreId semaphore_id, uint32_t millisec);
511
 
511
 
512
/// Release a Semaphore token.
512
/// Release a Semaphore token.
Line 612... Line 612...
612
osMessageQId osMessageCreate (const osMessageQDef_t *queue_def, osThreadId thread_id);
612
osMessageQId osMessageCreate (const osMessageQDef_t *queue_def, osThreadId thread_id);
613
 
613
 
614
/// Put a Message to a Queue.
614
/// Put a Message to a Queue.
615
/// \param[in]     queue_id      message queue ID obtained with \ref osMessageCreate.
615
/// \param[in]     queue_id      message queue ID obtained with \ref osMessageCreate.
616
/// \param[in]     info          message information.
616
/// \param[in]     info          message information.
617
/// \param[in]     millisec      timeout value or 0 in case of no time-out.
617
/// \param[in]     millisec      \ref CMSIS_RTOS_TimeOutValue or 0 in case of no time-out.
618
/// \return status code that indicates the execution status of the function.
618
/// \return status code that indicates the execution status of the function.
619
/// \note MUST REMAIN UNCHANGED: \b osMessagePut shall be consistent in every CMSIS-RTOS.
619
/// \note MUST REMAIN UNCHANGED: \b osMessagePut shall be consistent in every CMSIS-RTOS.
620
osStatus osMessagePut (osMessageQId queue_id, uint32_t info, uint32_t millisec);
620
osStatus osMessagePut (osMessageQId queue_id, uint32_t info, uint32_t millisec);
621
 
621
 
622
/// Get a Message or Wait for a Message from a Queue.
622
/// Get a Message or Wait for a Message from a Queue.
623
/// \param[in]     queue_id      message queue ID obtained with \ref osMessageCreate.
623
/// \param[in]     queue_id      message queue ID obtained with \ref osMessageCreate.
624
/// \param[in]     millisec      timeout value or 0 in case of no time-out.
624
/// \param[in]     millisec      \ref CMSIS_RTOS_TimeOutValue or 0 in case of no time-out.
625
/// \return event information that includes status code.
625
/// \return event information that includes status code.
626
/// \note MUST REMAIN UNCHANGED: \b osMessageGet shall be consistent in every CMSIS-RTOS.
626
/// \note MUST REMAIN UNCHANGED: \b osMessageGet shall be consistent in every CMSIS-RTOS.
627
osEvent osMessageGet (osMessageQId queue_id, uint32_t millisec);
627
osEvent osMessageGet (osMessageQId queue_id, uint32_t millisec);
628
 
628
 
629
#endif     // Message Queues available
629
#endif     // Message Queues available
Line 662... Line 662...
662
/// \note MUST REMAIN UNCHANGED: \b osMailCreate shall be consistent in every CMSIS-RTOS.
662
/// \note MUST REMAIN UNCHANGED: \b osMailCreate shall be consistent in every CMSIS-RTOS.
663
osMailQId osMailCreate (const osMailQDef_t *queue_def, osThreadId thread_id);
663
osMailQId osMailCreate (const osMailQDef_t *queue_def, osThreadId thread_id);
664
 
664
 
665
/// Allocate a memory block from a mail.
665
/// Allocate a memory block from a mail.
666
/// \param[in]     queue_id      mail queue ID obtained with \ref osMailCreate.
666
/// \param[in]     queue_id      mail queue ID obtained with \ref osMailCreate.
667
/// \param[in]     millisec      timeout value or 0 in case of no time-out
667
/// \param[in]     millisec      \ref CMSIS_RTOS_TimeOutValue or 0 in case of no time-out
668
/// \return pointer to memory block that can be filled with mail or NULL in case of error.
668
/// \return pointer to memory block that can be filled with mail or NULL in case of error.
669
/// \note MUST REMAIN UNCHANGED: \b osMailAlloc shall be consistent in every CMSIS-RTOS.
669
/// \note MUST REMAIN UNCHANGED: \b osMailAlloc shall be consistent in every CMSIS-RTOS.
670
void *osMailAlloc (osMailQId queue_id, uint32_t millisec);
670
void *osMailAlloc (osMailQId queue_id, uint32_t millisec);
671
 
671
 
672
/// Allocate a memory block from a mail and set memory block to zero.
672
/// Allocate a memory block from a mail and set memory block to zero.
673
/// \param[in]     queue_id      mail queue ID obtained with \ref osMailCreate.
673
/// \param[in]     queue_id      mail queue ID obtained with \ref osMailCreate.
674
/// \param[in]     millisec      timeout value or 0 in case of no time-out
674
/// \param[in]     millisec      \ref CMSIS_RTOS_TimeOutValue or 0 in case of no time-out
675
/// \return pointer to memory block that can be filled with mail or NULL in case of error.
675
/// \return pointer to memory block that can be filled with mail or NULL in case of error.
676
/// \note MUST REMAIN UNCHANGED: \b osMailCAlloc shall be consistent in every CMSIS-RTOS.
676
/// \note MUST REMAIN UNCHANGED: \b osMailCAlloc shall be consistent in every CMSIS-RTOS.
677
void *osMailCAlloc (osMailQId queue_id, uint32_t millisec);
677
void *osMailCAlloc (osMailQId queue_id, uint32_t millisec);
678
 
678
 
679
/// Put a mail to a queue.
679
/// Put a mail to a queue.
Line 683... Line 683...
683
/// \note MUST REMAIN UNCHANGED: \b osMailPut shall be consistent in every CMSIS-RTOS.
683
/// \note MUST REMAIN UNCHANGED: \b osMailPut shall be consistent in every CMSIS-RTOS.
684
osStatus osMailPut (osMailQId queue_id, void *mail);
684
osStatus osMailPut (osMailQId queue_id, void *mail);
685
 
685
 
686
/// Get a mail from a queue.
686
/// Get a mail from a queue.
687
/// \param[in]     queue_id      mail queue ID obtained with \ref osMailCreate.
687
/// \param[in]     queue_id      mail queue ID obtained with \ref osMailCreate.
688
/// \param[in]     millisec      timeout value or 0 in case of no time-out
688
/// \param[in]     millisec      \ref CMSIS_RTOS_TimeOutValue or 0 in case of no time-out
689
/// \return event that contains mail information or error code.
689
/// \return event that contains mail information or error code.
690
/// \note MUST REMAIN UNCHANGED: \b osMailGet shall be consistent in every CMSIS-RTOS.
690
/// \note MUST REMAIN UNCHANGED: \b osMailGet shall be consistent in every CMSIS-RTOS.
691
osEvent osMailGet (osMailQId queue_id, uint32_t millisec);
691
osEvent osMailGet (osMailQId queue_id, uint32_t millisec);
692
 
692
 
693
/// Free a memory block from a mail.
693
/// Free a memory block from a mail.