Specifications

Getting Started 31
2. Sets up a costatement which calls two instances of the flashled() function, one for
each LED. Note that one LED is flashed one second on, one-half second (500 ms) off,
while the other is flashed in the reverse pattern.
Note also the wfd keyword in the costatement. This keyword (an abbreviation for wait-
fordone
, which can also be used) must be used when calling cofunctions. For a complete
explanation, see Section 5 and 6 in the Dynamic C Users Manual.
More Information
See the entries for the hitwd() and DelayMs() functions in the Dynamic C Users
Manual, as well as those for the directives #asm and #endasm. For a complete explana-
tion of how Dynamic C handles multitasking with costatements and cofunctions, see
Chapter 5, Multitasking with Dynamic C, and Chapter 6, The Virtual Driver, in the
Dynamic C Users Manual.