IAR PowerPac RTOS User Guide

IAR PowerPac RTOS User Guide IAR PowerPac RTOS User Guide

ie.ksu.edu.tw
from ie.ksu.edu.tw More from this publisher
11.07.2015 Views

OS_Terminate()......................................................................................................................................33OS_WakeTask().....................................................................................................................................34OS_IsTask() ...........................................................................................................................................34OS_GetTaskID() ....................................................................................................................................34OS_GetpCurrentTask() ..........................................................................................................................35Software timers.............................................................................................................................................. 37Software timer ...................................................................................................................................37Extended software timer ........................................................................................................................37Software timers API function overview ..........................................................................................38OS_CREATETIMER() ..........................................................................................................................38OS_CreateTimer()..................................................................................................................................39OS_StartTimer().....................................................................................................................................39OS_StopTimer().....................................................................................................................................40OS_RetriggerTimer() .............................................................................................................................40OS_SetTimerPeriod().............................................................................................................................41OS_DeleteTimer()..................................................................................................................................41OS_GetTimerPeriod()............................................................................................................................41OS_GetTimerValue().............................................................................................................................42OS_GetTimerStatus().............................................................................................................................42OS_GetpCurrentTimer() ........................................................................................................................42OS_CREATETIMER_EX()...................................................................................................................43OS_CreateTimerEx() .............................................................................................................................44OS_StartTimerEx() ................................................................................................................................45OS_StopTimerEx() ................................................................................................................................45OS_RetriggerTimerEx().........................................................................................................................46OS_SetTimerPeriodEx() ........................................................................................................................46OS_DeleteTimerEx() .............................................................................................................................47OS_GetTimerPeriodEx()........................................................................................................................47OS_GetTimerValueEx() ........................................................................................................................47OS_GetTimerStatusEx() ........................................................................................................................48OS_GetpCurrentTimerEx()....................................................................................................................48Resource semaphores................................................................................................................................... 49Introduction........................................................................................................................................49Resource semaphores API function overview ................................................................................51OS_CREATERSEMA().........................................................................................................................51OS_Use()................................................................................................................................................51OS_Unuse()............................................................................................................................................52OS_Request() .........................................................................................................................................53OS_GetSemaValue()..............................................................................................................................54OS_GetResourceOwner() ......................................................................................................................54OS_DeleteRSema() ................................................................................................................................54Counting Semaphores................................................................................................................................... 55Introduction........................................................................................................................................55Counting semaphores API function overview ...............................................................................55OS_CREATECSEMA().........................................................................................................................55OS_CreateCSema() ................................................................................................................................56OS_SignalCSema() ................................................................................................................................56OS_SignalCSemaMax().........................................................................................................................566IAR PowerPac RTOSfor ARM CoresPPRTOS-2

ContentsOS_WaitCSema() ..................................................................................................................................57OS_WaitCSemaTimed() ........................................................................................................................57OS_CSemaRequest() .............................................................................................................................58OS_GetCSemaValue()...........................................................................................................................58OS_SetCSemaValue()............................................................................................................................58OS_DeleteCSema()................................................................................................................................59Mailboxes......................................................................................................................................................... 61Why mailboxes?................................................................................................................................. 61Basics................................................................................................................................................... 61Typical applications ........................................................................................................................... 61Single-byte mailbox functions .......................................................................................................... 62Mailboxes API function overview..................................................................................................... 63OS_CREATEMB() ................................................................................................................................63OS_PutMail() / OS_PutMail1() .............................................................................................................64OS_PutMailCond() / OS_PutMailCond1()............................................................................................65OS_PutMailFront() / OS_PutMailFront1()............................................................................................65OS_PutMailFrontCond() / OS_PutMailFrontCond1() ..........................................................................66OS_GetMail() / OS_GetMail1() ............................................................................................................66OS_GetMailCond() / OS_GetMailCond1()...........................................................................................67OS_GetMailTimed() ..............................................................................................................................68OS_WaitMail() ......................................................................................................................................69OS_ClearMB().......................................................................................................................................69OS_GetMessageCnt() ............................................................................................................................69OS_DeleteMB() .....................................................................................................................................70Queues............................................................................................................................................................. 71Why queues? ...................................................................................................................................... 71Basics................................................................................................................................................... 71Queues API function overview......................................................................................................... 71OS_Q_Create() ......................................................................................................................................71OS_Q_Put()............................................................................................................................................72OS_Q_GetPtr() ......................................................................................................................................72OS_Q_GetPtrCond()..............................................................................................................................73OS_Q_GetPtrTimed() ............................................................................................................................74OS_Q_Purge()........................................................................................................................................74OS_Q_Clear() ........................................................................................................................................75OS_Q_GetMessageCnt() .......................................................................................................................75Task events...................................................................................................................................................... 77Introduction ....................................................................................................................................... 77Events API function overview .......................................................................................................... 77OS_WaitEvent().....................................................................................................................................77OS_WaitSingleEvent() ..........................................................................................................................78OS_WaitEventTimed() ..........................................................................................................................78OS_WaitSingleEventTimed() ................................................................................................................79OS_SignalEvent() ..................................................................................................................................79OS_GetEventsOccurred() ......................................................................................................................80OS_ClearEvents() ..................................................................................................................................80PPRTOS-27

OS_Terminate()......................................................................................................................................33OS_WakeTask().....................................................................................................................................34OS_IsTask() ...........................................................................................................................................34OS_GetTaskID() ....................................................................................................................................34OS_GetpCurrentTask() ..........................................................................................................................35Software timers.............................................................................................................................................. 37Software timer ...................................................................................................................................37Extended software timer ........................................................................................................................37Software timers API function overview ..........................................................................................38OS_CREATETIMER() ..........................................................................................................................38OS_CreateTimer()..................................................................................................................................39OS_StartTimer().....................................................................................................................................39OS_StopTimer().....................................................................................................................................40OS_RetriggerTimer() .............................................................................................................................40OS_SetTimerPeriod().............................................................................................................................41OS_DeleteTimer()..................................................................................................................................41OS_GetTimerPeriod()............................................................................................................................41OS_GetTimerValue().............................................................................................................................42OS_GetTimerStatus().............................................................................................................................42OS_GetpCurrentTimer() ........................................................................................................................42OS_CREATETIMER_EX()...................................................................................................................43OS_CreateTimerEx() .............................................................................................................................44OS_StartTimerEx() ................................................................................................................................45OS_StopTimerEx() ................................................................................................................................45OS_RetriggerTimerEx().........................................................................................................................46OS_SetTimerPeriodEx() ........................................................................................................................46OS_DeleteTimerEx() .............................................................................................................................47OS_GetTimerPeriodEx()........................................................................................................................47OS_GetTimerValueEx() ........................................................................................................................47OS_GetTimerStatusEx() ........................................................................................................................48OS_GetpCurrentTimerEx()....................................................................................................................48Resource semaphores................................................................................................................................... 49Introduction........................................................................................................................................49Resource semaphores API function overview ................................................................................51OS_CREATERSEMA().........................................................................................................................51OS_Use()................................................................................................................................................51OS_Unuse()............................................................................................................................................52OS_Request() .........................................................................................................................................53OS_GetSemaValue()..............................................................................................................................54OS_GetResourceOwner() ......................................................................................................................54OS_DeleteRSema() ................................................................................................................................54Counting Semaphores................................................................................................................................... 55Introduction........................................................................................................................................55Counting semaphores API function overview ...............................................................................55OS_CREATECSEMA().........................................................................................................................55OS_CreateCSema() ................................................................................................................................56OS_SignalCSema() ................................................................................................................................56OS_SignalCSemaMax().........................................................................................................................566<strong>IAR</strong> <strong>PowerPac</strong> <strong>RTOS</strong>for ARM CoresPP<strong>RTOS</strong>-2

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!