-
-
Notifications
You must be signed in to change notification settings - Fork 345
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add delegate support to task queue (#1851)
**Add `ENABLE_TASK_COUNT`** to control task counter, disable by default. When stressed with periodic interrupts, the only way to get a reliable count is to disable interrupts whilst updating the task counts. As this is a diagnostic feature, leaving it disabled by default seems appropriate. Fortunately, `noInterrupts()` already returns the existing interrupt level, so we just need to add `restoreInterrupts()` so we can safely use it from interrupt context. **Fix 'ready' state tracking** If no `onReady` handlers are set then `state` will never be set to ready. Use the original `init_done_cb` callback to handle this separately. Note: this gets called first before any queued task callbacks. **Change standard TaskCallback parameter** to `void*` Makes it easier to use and provides consistency with timer callbacks. Avoids casting in many cases, and only requires `static_cast` for pointers. Add `InterruptCallback` overload. Note: Retaining existing `uint32_t` parameter overload. **Add Delegate support** for System::queueCallback() **Expand documentation** with notes on memory, multitasking, tasks
- Loading branch information
Showing
23 changed files
with
469 additions
and
108 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.