Versions Compared

Key

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

...

Some of the time management services must be enabled by seting configuration constants in OS_CFG.H. Specifically, table 5.1 shows which services are compiled based on the value of configuration constants found in OS_CFG.H.

Table 5.1 Time Management configuration constants in OS_CFG.H.

µC/OS-II Time Management Service

Enabled when set to 1 in OS_CFG.H

OSTimeDly()

 

OSTimeDlyHMSM()

OS_TIME_DLY_HMSM_EN

OSTimeDlyResume()

OS_TIME_DLY_RESUME_EN

OSTimeGet()

OS_TIME_GET_SET_EN

OSTimeSet()

OS_TIME_GET_SET_EN

Delaying a Task, OSTimeDly()

...

It is important to realize that the resolution of a delay is between zero and one tick. In other words, if you try to delay for only one tick, you could end up with an intermediate delay between 0 and 1 tick. This is assuming, however, that your processor is not heavily loaded. Figure 5.1 illustrates what happens.Figure 5.1 Delay resolution.

Delaying a Task, OSTimeDlyHMSM()

...