Skip to content

Commit

Permalink
Merge pull request #23 from bxparks/develop
Browse files Browse the repository at this point in the history
merge v1.2.2 into master
  • Loading branch information
bxparks authored Dec 20, 2020
2 parents 599ca4c + 1322860 commit 33199e5
Show file tree
Hide file tree
Showing 69 changed files with 324 additions and 220 deletions.
8 changes: 8 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,19 @@
# Changelog

* Unreleased
* 1.2.2 (2020-12-20)
* Add generic definition of `FPSTR()` macro for unrecognized platforms.
Allows code with `ARDUINO_ARCH_STM32` dependencies to compile. I will
support it officially after I get hardware to perform actual validation.
* Clean up MemoryBenchmark scripts for consistency with other `Ace*`
libraries.
* No functional change in this release.
* 1.2.1 (2020-11-12)
* Add `DEVELOPER.md` notes to myself.
* Add python script to generate the README.md in
[examples/MemoryBenchmarks](examples/MemoryBenchmarks) to automatically
regenerate the embedded ascii tables. Regenerate README.md for v1.2.
* No functional change in this release.
* 1.2 (2020-11-10)
* Fix an infinite loop in the internal singly-linked list of coroutines when
`resume()` is called immediately after `suspend()`, without waiting for
Expand Down
33 changes: 17 additions & 16 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
# AceRoutine

![AUnit Tests](https://github.com/bxparks/AceRoutine/workflows/AUnit%20Tests/badge.svg)

A low-memory, fast-switching, cooperative multitasking library using
stackless coroutines on Arduino platforms.

Expand Down Expand Up @@ -79,26 +81,25 @@ AceRoutine is a self-contained library that works on any platform supporting the
Arduino API (AVR, Teensy, ESP8266, ESP32, etc), and it provides a handful of
additional macros that can reduce boilerplate code.


**Version**: 1.2.1 (2020-11-12)
**Version**: 1.2.2 (2020-12-20)

**Changelog**: [CHANGELOG.md](CHANGELOG.md)

**Important Change in v1.1**: This library now depends on the AceCommon library
(https://github.com/bxparks/AceCommon). See the *Installation* section below.

![AUnit Tests](https://github.com/bxparks/AceRoutine/workflows/AUnit%20Tests/badge.svg)

**Table of Contents**
## Table of Contents

* [Hello Coroutines](#HelloCoroutines)
* [Installation](#Installation)
* [Source Code](#SourceCode)
* [Docs](#Docs)
* [Documentation](#Documentation)
* [Examples](#Examples)
* [User Guide](#UserGuide)
* [Comparisons](#Comparisons)
* [Resource Consumption](#ResourceConsumption)
* [Static Memory](#StaticMemory)
* [Flash Memory](#FlashMemory)
* [CPU](#CPU)
* [System Requirements](#SystemRequirements)
* [License](#LicenseSystemRequirements)
* [Feedback](#Feedback)
Expand Down Expand Up @@ -281,11 +282,13 @@ The source files are organized as follows:
[AUnit](https://github.com/bxparks/AUnit)
* `examples/` - example programs
<a name="Docs"></a>
### Docs
<a name="Documentation"></a>
## Documentation
The [docs/](docs/) directory contains the
[Doxygen docs published on GitHub Pages](https://bxparks.github.io/AceRoutine/html).
* [README.md](README.md) - this file
* [Doxygen docs](https://bxparks.github.io/AceRoutine/html) published on GitHub
Pages
* [USER_GUIDE.md](USER_GUIDE.md)
<a name="Examples"></a>
### Examples
Expand Down Expand Up @@ -331,11 +334,6 @@ The following programs are provided under the `examples` directory:
of CPU overhead of a `Channel` by using 2 coroutines to ping-pong an
integer across 2 channels
<a name="UserGuide"></a>
## User Guide
**The user guide has been moved to [USER_GUIDE.md](USER_GUIDE.md).**
<a name="Comparisons"></a>
## Comparisons to Other Multitasking Libraries
Expand Down Expand Up @@ -421,6 +419,7 @@ advantages:
<a name="ResourceConsumption"></a>
## Resource Consumption
<a name="StaticMemory"></a>
### Static Memory
All objects are statically allocated (i.e. not heap or stack).
Expand All @@ -446,6 +445,7 @@ The `Channel` object requires 2 copies of the parameterized `<T>` type so its
size is equal to `1 + 2 * sizeof(T)`, rounded to the nearest memory alignment
boundary (i.e. a total of 12 bytes for a 32-bit processor).
<a name="FlashMemory"></a>
### Flash Memory
The [examples/MemoryBenchmark](examples/MemoryBenchmark) program gathers
Expand All @@ -463,6 +463,7 @@ etc) for a handful of AceRoutine features. Here are some highlights:
* `CoroutineScheduler()` + 1 Coroutine: 808 bytes
* `CoroutineScheduler()` + 2 Coroutines: 908 bytes
<a name="CPU"></a>
### CPU
See [examples/AutoBenchmark](examples/AutoBenchmark).
Expand Down
4 changes: 2 additions & 2 deletions USER_GUIDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@ See the [README.md](README.md) for installation instructions and other
background information. This document describes how to use the library once it
is installed.

**Version**: 1.2.1 (2020-11-12)
**Version**: 1.2.2 (2020-12-20)

**Table of Contents**
## Table of Contents

* [Coroutine Setup](#Setup)
* [Include Header and Namespace](#IncludeHeader)
Expand Down
2 changes: 1 addition & 1 deletion docs/doxygen.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ PROJECT_NAME = "AceRoutine"
# could be handy for archiving the generated documentation or if some version
# control system is used.

PROJECT_NUMBER = 1.2.1
PROJECT_NUMBER = 1.2.2

# Using the PROJECT_BRIEF tag one can provide an optional one line description
# for a project that appears at the top of each page and should give viewer a
Expand Down
6 changes: 3 additions & 3 deletions docs/html/AceRoutine_8h_source.html
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
<tr style="height: 56px;">
<td id="projectalign" style="padding-left: 0.5em;">
<div id="projectname">AceRoutine
&#160;<span id="projectnumber">1.2.1</span>
&#160;<span id="projectnumber">1.2.2</span>
</div>
<div id="projectbrief">A low-memory, fast-switching, cooperative multitasking library using stackless coroutines on Arduino platforms.</div>
</td>
Expand Down Expand Up @@ -103,8 +103,8 @@
<div class="line"><a name="l00041"></a><span class="lineno"> 41</span>&#160;<span class="preprocessor">#include &quot;ace_routine/Channel.h&quot;</span></div>
<div class="line"><a name="l00042"></a><span class="lineno"> 42</span>&#160; </div>
<div class="line"><a name="l00043"></a><span class="lineno"> 43</span>&#160;<span class="comment">// Version format: xxyyzz == &quot;xx.yy.zz&quot;</span></div>
<div class="line"><a name="l00044"></a><span class="lineno"> 44</span>&#160;<span class="preprocessor">#define ACE_ROUTINE_VERSION 10201</span></div>
<div class="line"><a name="l00045"></a><span class="lineno"> 45</span>&#160;<span class="preprocessor">#define ACE_ROUTINE_VERSION_STRING &quot;1.2.1&quot;</span></div>
<div class="line"><a name="l00044"></a><span class="lineno"> 44</span>&#160;<span class="preprocessor">#define ACE_ROUTINE_VERSION 10202</span></div>
<div class="line"><a name="l00045"></a><span class="lineno"> 45</span>&#160;<span class="preprocessor">#define ACE_ROUTINE_VERSION_STRING &quot;1.2.2&quot;</span></div>
<div class="line"><a name="l00046"></a><span class="lineno"> 46</span>&#160; </div>
<div class="line"><a name="l00047"></a><span class="lineno"> 47</span>&#160;<span class="preprocessor">#endif</span></div>
</div><!-- fragment --></div><!-- contents -->
Expand Down
2 changes: 1 addition & 1 deletion docs/html/Channel_8h_source.html
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
<tr style="height: 56px;">
<td id="projectalign" style="padding-left: 0.5em;">
<div id="projectname">AceRoutine
&#160;<span id="projectnumber">1.2.1</span>
&#160;<span id="projectnumber">1.2.2</span>
</div>
<div id="projectbrief">A low-memory, fast-switching, cooperative multitasking library using stackless coroutines on Arduino platforms.</div>
</td>
Expand Down
2 changes: 1 addition & 1 deletion docs/html/CoroutineScheduler_8cpp_source.html
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
<tr style="height: 56px;">
<td id="projectalign" style="padding-left: 0.5em;">
<div id="projectname">AceRoutine
&#160;<span id="projectnumber">1.2.1</span>
&#160;<span id="projectnumber">1.2.2</span>
</div>
<div id="projectbrief">A low-memory, fast-switching, cooperative multitasking library using stackless coroutines on Arduino platforms.</div>
</td>
Expand Down
2 changes: 1 addition & 1 deletion docs/html/CoroutineScheduler_8h_source.html
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
<tr style="height: 56px;">
<td id="projectalign" style="padding-left: 0.5em;">
<div id="projectname">AceRoutine
&#160;<span id="projectnumber">1.2.1</span>
&#160;<span id="projectnumber">1.2.2</span>
</div>
<div id="projectbrief">A low-memory, fast-switching, cooperative multitasking library using stackless coroutines on Arduino platforms.</div>
</td>
Expand Down
15 changes: 8 additions & 7 deletions docs/html/Coroutine_8cpp_source.html
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
<tr style="height: 56px;">
<td id="projectalign" style="padding-left: 0.5em;">
<div id="projectname">AceRoutine
&#160;<span id="projectnumber">1.2.1</span>
&#160;<span id="projectnumber">1.2.2</span>
</div>
<div id="projectbrief">A low-memory, fast-switching, cooperative multitasking library using stackless coroutines on Arduino platforms.</div>
</td>
Expand Down Expand Up @@ -216,19 +216,20 @@
<div class="line"><a name="l00143"></a><span class="lineno"> 143</span>&#160;<span class="keyword">static</span> <span class="keyword">const</span> <span class="keywordtype">char</span> kStatusTerminatedString[] PROGMEM = <span class="stringliteral">&quot;Terminated&quot;</span>;</div>
<div class="line"><a name="l00144"></a><span class="lineno"> 144</span>&#160; </div>
<div class="line"><a name="l00145"></a><span class="lineno"> 145</span>&#160;<span class="keyword">const</span> __FlashStringHelper* <span class="keyword">const</span> Coroutine::sStatusStrings[] = {</div>
<div class="line"><a name="l00146"></a><span class="lineno"> 146</span>&#160; FPSTR(kStatusSuspendedString),</div>
<div class="line"><a name="l00147"></a><span class="lineno"> 147</span>&#160; FPSTR(kStatusYieldingString),</div>
<div class="line"><a name="l00148"></a><span class="lineno"> 148</span>&#160; FPSTR(kStatusDelayingString),</div>
<div class="line"><a name="l00149"></a><span class="lineno"> 149</span>&#160; FPSTR(kStatusRunningString),</div>
<div class="line"><a name="l00150"></a><span class="lineno"> 150</span>&#160; FPSTR(kStatusEndingString),</div>
<div class="line"><a name="l00151"></a><span class="lineno"> 151</span>&#160; FPSTR(kStatusTerminatedString),</div>
<div class="line"><a name="l00146"></a><span class="lineno"> 146</span>&#160; <a class="code" href="compat_8h.html#aaa60649c7ffe7ed1fbe16dc20ed7e8c3">FPSTR</a>(kStatusSuspendedString),</div>
<div class="line"><a name="l00147"></a><span class="lineno"> 147</span>&#160; <a class="code" href="compat_8h.html#aaa60649c7ffe7ed1fbe16dc20ed7e8c3">FPSTR</a>(kStatusYieldingString),</div>
<div class="line"><a name="l00148"></a><span class="lineno"> 148</span>&#160; <a class="code" href="compat_8h.html#aaa60649c7ffe7ed1fbe16dc20ed7e8c3">FPSTR</a>(kStatusDelayingString),</div>
<div class="line"><a name="l00149"></a><span class="lineno"> 149</span>&#160; <a class="code" href="compat_8h.html#aaa60649c7ffe7ed1fbe16dc20ed7e8c3">FPSTR</a>(kStatusRunningString),</div>
<div class="line"><a name="l00150"></a><span class="lineno"> 150</span>&#160; <a class="code" href="compat_8h.html#aaa60649c7ffe7ed1fbe16dc20ed7e8c3">FPSTR</a>(kStatusEndingString),</div>
<div class="line"><a name="l00151"></a><span class="lineno"> 151</span>&#160; <a class="code" href="compat_8h.html#aaa60649c7ffe7ed1fbe16dc20ed7e8c3">FPSTR</a>(kStatusTerminatedString),</div>
<div class="line"><a name="l00152"></a><span class="lineno"> 152</span>&#160;};</div>
<div class="line"><a name="l00153"></a><span class="lineno"> 153</span>&#160; </div>
<div class="line"><a name="l00154"></a><span class="lineno"> 154</span>&#160;}</div>
</div><!-- fragment --></div><!-- contents -->
<div class="ttc" id="aclassace__routine_1_1Coroutine_html_a79844c12576ff2fd2065c5f5e4b422c8"><div class="ttname"><a href="classace__routine_1_1Coroutine.html#a79844c12576ff2fd2065c5f5e4b422c8">ace_routine::Coroutine::kDelayTypeSeconds</a></div><div class="ttdeci">static const uint8_t kDelayTypeSeconds</div><div class="ttdoc">Delay using units of seconds.</div><div class="ttdef"><b>Definition:</b> <a href="Coroutine_8h_source.html#l00503">Coroutine.h:503</a></div></div>
<div class="ttc" id="aclassace__routine_1_1Coroutine_html_ad29d0f43128b49c48a71a167331dac51"><div class="ttname"><a href="classace__routine_1_1Coroutine.html#ad29d0f43128b49c48a71a167331dac51">ace_routine::Coroutine::resume</a></div><div class="ttdeci">void resume()</div><div class="ttdoc">Add a Suspended coroutine into the head of the scheduler linked list, and change the state to Yieldin...</div><div class="ttdef"><b>Definition:</b> <a href="Coroutine_8cpp_source.html#l00103">Coroutine.cpp:103</a></div></div>
<div class="ttc" id="aclassace__routine_1_1Coroutine_html_a668e339557964dc092540bad162056a7"><div class="ttname"><a href="classace__routine_1_1Coroutine.html#a668e339557964dc092540bad162056a7">ace_routine::Coroutine::kDelayTypeMillis</a></div><div class="ttdeci">static const uint8_t kDelayTypeMillis</div><div class="ttdoc">Delay using units of millis.</div><div class="ttdef"><b>Definition:</b> <a href="Coroutine_8h_source.html#l00497">Coroutine.h:497</a></div></div>
<div class="ttc" id="acompat_8h_html_aaa60649c7ffe7ed1fbe16dc20ed7e8c3"><div class="ttname"><a href="compat_8h.html#aaa60649c7ffe7ed1fbe16dc20ed7e8c3">FPSTR</a></div><div class="ttdeci">#define FPSTR(p)</div><div class="ttdoc">A macro that converts a const char* that already points to a PROGMEM string to a const __FlashStringH...</div><div class="ttdef"><b>Definition:</b> <a href="compat_8h_source.html#l00081">compat.h:81</a></div></div>
<div class="ttc" id="aclassace__routine_1_1Coroutine_html_a826df2b7d3db16170a13ba4b2756c853"><div class="ttname"><a href="classace__routine_1_1Coroutine.html#a826df2b7d3db16170a13ba4b2756c853">ace_routine::Coroutine::coroutineMicros</a></div><div class="ttdeci">virtual unsigned long coroutineMicros() const</div><div class="ttdoc">Returns the current millisecond clock.</div><div class="ttdef"><b>Definition:</b> <a href="Coroutine_8cpp_source.html#l00118">Coroutine.cpp:118</a></div></div>
<div class="ttc" id="aclassace__routine_1_1Coroutine_html_a397f0d87d99b538189353fa47e918022"><div class="ttname"><a href="classace__routine_1_1Coroutine.html#a397f0d87d99b538189353fa47e918022">ace_routine::Coroutine::kStatusSuspended</a></div><div class="ttdeci">static const Status kStatusSuspended</div><div class="ttdoc">Coroutine has been suspended using suspend() and the scheduler should remove it from the queue upon t...</div><div class="ttdef"><b>Definition:</b> <a href="Coroutine_8h_source.html#l00479">Coroutine.h:479</a></div></div>
<div class="ttc" id="acompat_8h_html"><div class="ttname"><a href="compat_8h.html">compat.h</a></div></div>
Expand Down
2 changes: 1 addition & 1 deletion docs/html/Coroutine_8h.html
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
<tr style="height: 56px;">
<td id="projectalign" style="padding-left: 0.5em;">
<div id="projectname">AceRoutine
&#160;<span id="projectnumber">1.2.1</span>
&#160;<span id="projectnumber">1.2.2</span>
</div>
<div id="projectbrief">A low-memory, fast-switching, cooperative multitasking library using stackless coroutines on Arduino platforms.</div>
</td>
Expand Down
2 changes: 1 addition & 1 deletion docs/html/Coroutine_8h_source.html
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
<tr style="height: 56px;">
<td id="projectalign" style="padding-left: 0.5em;">
<div id="projectname">AceRoutine
&#160;<span id="projectnumber">1.2.1</span>
&#160;<span id="projectnumber">1.2.2</span>
</div>
<div id="projectbrief">A low-memory, fast-switching, cooperative multitasking library using stackless coroutines on Arduino platforms.</div>
</td>
Expand Down
2 changes: 1 addition & 1 deletion docs/html/annotated.html
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
<tr style="height: 56px;">
<td id="projectalign" style="padding-left: 0.5em;">
<div id="projectname">AceRoutine
&#160;<span id="projectnumber">1.2.1</span>
&#160;<span id="projectnumber">1.2.2</span>
</div>
<div id="projectbrief">A low-memory, fast-switching, cooperative multitasking library using stackless coroutines on Arduino platforms.</div>
</td>
Expand Down
2 changes: 1 addition & 1 deletion docs/html/classace__routine_1_1Channel-members.html
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
<tr style="height: 56px;">
<td id="projectalign" style="padding-left: 0.5em;">
<div id="projectname">AceRoutine
&#160;<span id="projectnumber">1.2.1</span>
&#160;<span id="projectnumber">1.2.2</span>
</div>
<div id="projectbrief">A low-memory, fast-switching, cooperative multitasking library using stackless coroutines on Arduino platforms.</div>
</td>
Expand Down
2 changes: 1 addition & 1 deletion docs/html/classace__routine_1_1Channel.html
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
<tr style="height: 56px;">
<td id="projectalign" style="padding-left: 0.5em;">
<div id="projectname">AceRoutine
&#160;<span id="projectnumber">1.2.1</span>
&#160;<span id="projectnumber">1.2.2</span>
</div>
<div id="projectbrief">A low-memory, fast-switching, cooperative multitasking library using stackless coroutines on Arduino platforms.</div>
</td>
Expand Down
2 changes: 1 addition & 1 deletion docs/html/classace__routine_1_1Coroutine-members.html
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
<tr style="height: 56px;">
<td id="projectalign" style="padding-left: 0.5em;">
<div id="projectname">AceRoutine
&#160;<span id="projectnumber">1.2.1</span>
&#160;<span id="projectnumber">1.2.2</span>
</div>
<div id="projectbrief">A low-memory, fast-switching, cooperative multitasking library using stackless coroutines on Arduino platforms.</div>
</td>
Expand Down
2 changes: 1 addition & 1 deletion docs/html/classace__routine_1_1Coroutine.html
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
<tr style="height: 56px;">
<td id="projectalign" style="padding-left: 0.5em;">
<div id="projectname">AceRoutine
&#160;<span id="projectnumber">1.2.1</span>
&#160;<span id="projectnumber">1.2.2</span>
</div>
<div id="projectbrief">A low-memory, fast-switching, cooperative multitasking library using stackless coroutines on Arduino platforms.</div>
</td>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
<tr style="height: 56px;">
<td id="projectalign" style="padding-left: 0.5em;">
<div id="projectname">AceRoutine
&#160;<span id="projectnumber">1.2.1</span>
&#160;<span id="projectnumber">1.2.2</span>
</div>
<div id="projectbrief">A low-memory, fast-switching, cooperative multitasking library using stackless coroutines on Arduino platforms.</div>
</td>
Expand Down
2 changes: 1 addition & 1 deletion docs/html/classace__routine_1_1CoroutineScheduler.html
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
<tr style="height: 56px;">
<td id="projectalign" style="padding-left: 0.5em;">
<div id="projectname">AceRoutine
&#160;<span id="projectnumber">1.2.1</span>
&#160;<span id="projectnumber">1.2.2</span>
</div>
<div id="projectbrief">A low-memory, fast-switching, cooperative multitasking library using stackless coroutines on Arduino platforms.</div>
</td>
Expand Down
2 changes: 1 addition & 1 deletion docs/html/classes.html
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
<tr style="height: 56px;">
<td id="projectalign" style="padding-left: 0.5em;">
<div id="projectname">AceRoutine
&#160;<span id="projectnumber">1.2.1</span>
&#160;<span id="projectnumber">1.2.2</span>
</div>
<div id="projectbrief">A low-memory, fast-switching, cooperative multitasking library using stackless coroutines on Arduino platforms.</div>
</td>
Expand Down
Loading

0 comments on commit 33199e5

Please sign in to comment.