Versions Compared

Key

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

Description

OSVersion() obtains the current version of µC/OS-III.

Files

os.h/os_core.c

Prototype

Code Block
CPU_INT16U  OSVersion (OS_ERR  *p_err

...

File

Called from

Code enabled by

os_core.c

Task or ISR

N/A

...

)

...

Arguments

p_err

is a pointer to a variable that contains an error code returned by this function. Currently, OSVersion() always returnreturns:

OS_ERR_NONE

The call succeeded.

Returned Value

The version is returned as x.yy.zz multiplied by 10,000. For example, V3.00.00 is returned as 30000.

Required Configuration

None

Callers

Application and ISRs.

Notes/Warnings

None

Example Usage

Code Block
titleOSVersion example usage
          void TaskX (void *p_arg)
          {
              CPU_INT16U  os_version;
              OS_ERR      err;
           
           
              while (DEF_ON) {
                  :
                  :
                  os_version = OSVersion(&err);  /* Obtain µC/OS-III's version       */
              }
          }