11.07.2015 Views

IAR PowerPac RTOS User Guide

IAR PowerPac RTOS User Guide

IAR PowerPac RTOS User Guide

SHOW MORE
SHOW LESS
  • No tags were found...

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

A typical main() looks similar to the following example:Example/************************************************************************* main**************************************************************************/void main(void) {OS_InitKern(); /* Initialize OS (should be first !) */OS_InitHW(); /* Initialize Hardware for OS (in RtosInit.c) *//* Call Init routines of all program modules which in turn will createthe tasks they need ... (Order of creation may be important) */MODULE1_Init();MODULE2_Init();MODULE3_Init();MODULE4_Init();MODULE5_Init();OS_Start(); /* Start multitasking */}With the call to OS_Start(), the scheduler starts the highest-priority task that has been created in main().Note that OS_Start() is called only once during the startup process and does not return.20<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!