Page 267 of 346 Start Back Next End ZBasic System Library 255 ZBasic Microcontrollers ResumeTask Type Subroutine Invocation ResumeTask(taskStack) ResumeTask() Parameter Method Type Description taskStack ByRef array of Byte The stack for a task of interest. Discussion This routine attempts to change the status of a task to a ready-to-run state. If no task stack is explicitly given, the task stack for the Main() routine is assumed. The table below shows the effect for various task states (as returned by StatusTask()). Effect of Resuming a Task in Various States Status State Effect 0 Ready to run. None, the task is already ready to run. 1 Sleeping. The task is awakened. 2 Awaiting InputCapture(). The task resumes as if the InputCapture() had completed. 3 Awaiting interrupt 0. The task resumes as if the interrupt had occurred. 4 Awaiting interrupt 1. The task resumes as if the interrupt had occurred. 5 Awaiting interrupt 2. The task resumes as if the interrupt had occurred. 6 Awaiting interval expiration. The task resumes as if the interval had expired. 7 Awaiting analog compare. The task resumes as if the comparison interrupt had occurred. 8 Awaiting pin change event 0. The task resumes as if the pin change had occurred. 9 Awaiting pin change event 1. The task resumes as if the pin change had occurred. 10 Awaiting pin change event 2. The task resumes as if the pin change had occurred. 11 Awaiting pin change event 3. The task resumes as if the pin change had occurred. 12 Awaiting OutputCapture(). The task resumes as if the OutputCapture() had completed. 13 Awaiting interrupt 3. The task resumes as if the interrupt had occurred. 14 Awaiting interrupt 4. The task resumes as if the interrupt had occurred. 15 Awaiting interrupt 5. The task resumes as if the interrupt had occurred. 16 Awaiting interrupt 6. The task resumes as if the interrupt had occurred. 17 Awaiting interrupt 7. The task resumes as if the interrupt had occurred. 18 Awaiting pin change event A0. The task resumes as if the pin change event had occurred. 19 Awaiting pin change event A1. The task resumes as if the pin change event had occurred. 20 Awaiting pin change event B0. The task resumes as if the pin change event had occurred. 21 Awaiting pin change event B1. The task resumes as if the pin change event had occurred. 22 Awaiting pin change event C0. The task resumes as if the pin change event had occurred. 23 Awaiting pin change event C1. The task resumes as if the pin change event had occurred. 24 Awaiting pin change event D0. The task resumes as if the pin change event had occurred. 25 Awaiting pin change event D1. The task resumes as if the pin change event had occurred. 26 Awaiting pin change event E0. The task resumes as if the pin change event had occurred. 27 Awaiting pin change event E1. The task resumes as if the pin change event had occurred. 28 Awaiting pin change event F0. The task resumes as if the pin change event had occurred. 29 Awaiting pin change event F1. The task resumes as if the pin change event had occurred. 30 Awaiting pin change event H0. The task resumes as if the pin change event had occurred. 31 Awaiting pin change event H1. The task resumes as if the pin change event had occurred. 32 Awaiting pin change event J0. The task resumes as if the pin change event had occurred. 33 Awaiting pin change event J1. The task resumes as if the pin change event had occurred. 34 Awaiting pin change event K0. The task resumes as if the pin change event had occurred. 35 Awaiting pin change event K1. The task resumes as if the pin change event had occurred. 36 Awaiting pin change event Q0. The task resumes as if the pin change event had occurred.