I usually do not report docu-bugs, but this one bothers me:
In the example of OSSetTS() on page 353 you are changing the task's timestamp to a variable which is volatile:
code:
void Task(void)
{
OStypeTS timestamp;
...
timestamp = OSGetTS();
OS_Delay(1, label2);
OSSetTS(timestamp);
...
}
This example cannot work, because all OS_xxx() calls will lose volatile stack-variables. You must define "timestamp" as static:
code:
void Task(void)
{
static OStypeTS timestamp;
...
}
Otherwhise you could set "timestamp" to a random value.
BTW, I played a little bit with OSGetTS(), but I never got a return-value <> 0. ...
Regards,
Martin
