Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Files

os.h/os_core.c

Prototype

Code Block
void  OSStart (OS_ERR  *p_err)

Arguments

p_err

is a pointer to a variable used to hold an error code:

...

  1. OSInit() must be called prior to calling OSStart(). OSStart() should only be called once by the application code. However, if you called OSStart() more than once, nothing happens on the second and subsequent calls.

Example Usage

 

...

Code Block
titleOSStart() example usage
          void main (void)
          {
              OS_ERR  err;
              
                                                 /* User Code            */
              :
              OSInit(&err);                      /* Initialize µC/OS-III */
              /* Check "err" */
              :                                  /* User Code            */
              :
              OSStart(&err);                     /* Start Multitasking   */
              /* Any code here should NEVER be executed! */
          }