Skip to content

Commit 33199e5

Browse files
authored
Merge pull request #23 from bxparks/develop
merge v1.2.2 into master
2 parents 599ca4c + 1322860 commit 33199e5

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

69 files changed

+324
-220
lines changed

CHANGELOG.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,19 @@
11
# Changelog
22

33
* Unreleased
4+
* 1.2.2 (2020-12-20)
5+
* Add generic definition of `FPSTR()` macro for unrecognized platforms.
6+
Allows code with `ARDUINO_ARCH_STM32` dependencies to compile. I will
7+
support it officially after I get hardware to perform actual validation.
8+
* Clean up MemoryBenchmark scripts for consistency with other `Ace*`
9+
libraries.
10+
* No functional change in this release.
411
* 1.2.1 (2020-11-12)
512
* Add `DEVELOPER.md` notes to myself.
613
* Add python script to generate the README.md in
714
[examples/MemoryBenchmarks](examples/MemoryBenchmarks) to automatically
815
regenerate the embedded ascii tables. Regenerate README.md for v1.2.
16+
* No functional change in this release.
917
* 1.2 (2020-11-10)
1018
* Fix an infinite loop in the internal singly-linked list of coroutines when
1119
`resume()` is called immediately after `suspend()`, without waiting for

README.md

Lines changed: 17 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
# AceRoutine
22

3+
![AUnit Tests](https://github.com/bxparks/AceRoutine/workflows/AUnit%20Tests/badge.svg)
4+
35
A low-memory, fast-switching, cooperative multitasking library using
46
stackless coroutines on Arduino platforms.
57

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

82-
83-
**Version**: 1.2.1 (2020-11-12)
84+
**Version**: 1.2.2 (2020-12-20)
8485

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

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

90-
![AUnit Tests](https://github.com/bxparks/AceRoutine/workflows/AUnit%20Tests/badge.svg)
91-
92-
**Table of Contents**
91+
## Table of Contents
9392

9493
* [Hello Coroutines](#HelloCoroutines)
9594
* [Installation](#Installation)
9695
* [Source Code](#SourceCode)
97-
* [Docs](#Docs)
96+
* [Documentation](#Documentation)
9897
* [Examples](#Examples)
99-
* [User Guide](#UserGuide)
10098
* [Comparisons](#Comparisons)
10199
* [Resource Consumption](#ResourceConsumption)
100+
* [Static Memory](#StaticMemory)
101+
* [Flash Memory](#FlashMemory)
102+
* [CPU](#CPU)
102103
* [System Requirements](#SystemRequirements)
103104
* [License](#LicenseSystemRequirements)
104105
* [Feedback](#Feedback)
@@ -281,11 +282,13 @@ The source files are organized as follows:
281282
[AUnit](https://github.com/bxparks/AUnit)
282283
* `examples/` - example programs
283284
284-
<a name="Docs"></a>
285-
### Docs
285+
<a name="Documentation"></a>
286+
## Documentation
286287
287-
The [docs/](docs/) directory contains the
288-
[Doxygen docs published on GitHub Pages](https://bxparks.github.io/AceRoutine/html).
288+
* [README.md](README.md) - this file
289+
* [Doxygen docs](https://bxparks.github.io/AceRoutine/html) published on GitHub
290+
Pages
291+
* [USER_GUIDE.md](USER_GUIDE.md)
289292
290293
<a name="Examples"></a>
291294
### Examples
@@ -331,11 +334,6 @@ The following programs are provided under the `examples` directory:
331334
of CPU overhead of a `Channel` by using 2 coroutines to ping-pong an
332335
integer across 2 channels
333336
334-
<a name="UserGuide"></a>
335-
## User Guide
336-
337-
**The user guide has been moved to [USER_GUIDE.md](USER_GUIDE.md).**
338-
339337
<a name="Comparisons"></a>
340338
## Comparisons to Other Multitasking Libraries
341339
@@ -421,6 +419,7 @@ advantages:
421419
<a name="ResourceConsumption"></a>
422420
## Resource Consumption
423421
422+
<a name="StaticMemory"></a>
424423
### Static Memory
425424
426425
All objects are statically allocated (i.e. not heap or stack).
@@ -446,6 +445,7 @@ The `Channel` object requires 2 copies of the parameterized `<T>` type so its
446445
size is equal to `1 + 2 * sizeof(T)`, rounded to the nearest memory alignment
447446
boundary (i.e. a total of 12 bytes for a 32-bit processor).
448447
448+
<a name="FlashMemory"></a>
449449
### Flash Memory
450450
451451
The [examples/MemoryBenchmark](examples/MemoryBenchmark) program gathers
@@ -463,6 +463,7 @@ etc) for a handful of AceRoutine features. Here are some highlights:
463463
* `CoroutineScheduler()` + 1 Coroutine: 808 bytes
464464
* `CoroutineScheduler()` + 2 Coroutines: 908 bytes
465465
466+
<a name="CPU"></a>
466467
### CPU
467468
468469
See [examples/AutoBenchmark](examples/AutoBenchmark).

USER_GUIDE.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,9 @@ See the [README.md](README.md) for installation instructions and other
44
background information. This document describes how to use the library once it
55
is installed.
66

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

9-
**Table of Contents**
9+
## Table of Contents
1010

1111
* [Coroutine Setup](#Setup)
1212
* [Include Header and Namespace](#IncludeHeader)

docs/doxygen.cfg

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ PROJECT_NAME = "AceRoutine"
3838
# could be handy for archiving the generated documentation or if some version
3939
# control system is used.
4040

41-
PROJECT_NUMBER = 1.2.1
41+
PROJECT_NUMBER = 1.2.2
4242

4343
# Using the PROJECT_BRIEF tag one can provide an optional one line description
4444
# for a project that appears at the top of each page and should give viewer a

docs/html/AceRoutine_8h_source.html

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
<tr style="height: 56px;">
2323
<td id="projectalign" style="padding-left: 0.5em;">
2424
<div id="projectname">AceRoutine
25-
&#160;<span id="projectnumber">1.2.1</span>
25+
&#160;<span id="projectnumber">1.2.2</span>
2626
</div>
2727
<div id="projectbrief">A low-memory, fast-switching, cooperative multitasking library using stackless coroutines on Arduino platforms.</div>
2828
</td>
@@ -103,8 +103,8 @@
103103
<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>
104104
<div class="line"><a name="l00042"></a><span class="lineno"> 42</span>&#160; </div>
105105
<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>
106-
<div class="line"><a name="l00044"></a><span class="lineno"> 44</span>&#160;<span class="preprocessor">#define ACE_ROUTINE_VERSION 10201</span></div>
107-
<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>
106+
<div class="line"><a name="l00044"></a><span class="lineno"> 44</span>&#160;<span class="preprocessor">#define ACE_ROUTINE_VERSION 10202</span></div>
107+
<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>
108108
<div class="line"><a name="l00046"></a><span class="lineno"> 46</span>&#160; </div>
109109
<div class="line"><a name="l00047"></a><span class="lineno"> 47</span>&#160;<span class="preprocessor">#endif</span></div>
110110
</div><!-- fragment --></div><!-- contents -->

docs/html/Channel_8h_source.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
<tr style="height: 56px;">
2323
<td id="projectalign" style="padding-left: 0.5em;">
2424
<div id="projectname">AceRoutine
25-
&#160;<span id="projectnumber">1.2.1</span>
25+
&#160;<span id="projectnumber">1.2.2</span>
2626
</div>
2727
<div id="projectbrief">A low-memory, fast-switching, cooperative multitasking library using stackless coroutines on Arduino platforms.</div>
2828
</td>

docs/html/CoroutineScheduler_8cpp_source.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
<tr style="height: 56px;">
2323
<td id="projectalign" style="padding-left: 0.5em;">
2424
<div id="projectname">AceRoutine
25-
&#160;<span id="projectnumber">1.2.1</span>
25+
&#160;<span id="projectnumber">1.2.2</span>
2626
</div>
2727
<div id="projectbrief">A low-memory, fast-switching, cooperative multitasking library using stackless coroutines on Arduino platforms.</div>
2828
</td>

docs/html/CoroutineScheduler_8h_source.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
<tr style="height: 56px;">
2323
<td id="projectalign" style="padding-left: 0.5em;">
2424
<div id="projectname">AceRoutine
25-
&#160;<span id="projectnumber">1.2.1</span>
25+
&#160;<span id="projectnumber">1.2.2</span>
2626
</div>
2727
<div id="projectbrief">A low-memory, fast-switching, cooperative multitasking library using stackless coroutines on Arduino platforms.</div>
2828
</td>

docs/html/Coroutine_8cpp_source.html

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
<tr style="height: 56px;">
2323
<td id="projectalign" style="padding-left: 0.5em;">
2424
<div id="projectname">AceRoutine
25-
&#160;<span id="projectnumber">1.2.1</span>
25+
&#160;<span id="projectnumber">1.2.2</span>
2626
</div>
2727
<div id="projectbrief">A low-memory, fast-switching, cooperative multitasking library using stackless coroutines on Arduino platforms.</div>
2828
</td>
@@ -216,19 +216,20 @@
216216
<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>
217217
<div class="line"><a name="l00144"></a><span class="lineno"> 144</span>&#160; </div>
218218
<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>
219-
<div class="line"><a name="l00146"></a><span class="lineno"> 146</span>&#160; FPSTR(kStatusSuspendedString),</div>
220-
<div class="line"><a name="l00147"></a><span class="lineno"> 147</span>&#160; FPSTR(kStatusYieldingString),</div>
221-
<div class="line"><a name="l00148"></a><span class="lineno"> 148</span>&#160; FPSTR(kStatusDelayingString),</div>
222-
<div class="line"><a name="l00149"></a><span class="lineno"> 149</span>&#160; FPSTR(kStatusRunningString),</div>
223-
<div class="line"><a name="l00150"></a><span class="lineno"> 150</span>&#160; FPSTR(kStatusEndingString),</div>
224-
<div class="line"><a name="l00151"></a><span class="lineno"> 151</span>&#160; FPSTR(kStatusTerminatedString),</div>
219+
<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>
220+
<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>
221+
<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>
222+
<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>
223+
<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>
224+
<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>
225225
<div class="line"><a name="l00152"></a><span class="lineno"> 152</span>&#160;};</div>
226226
<div class="line"><a name="l00153"></a><span class="lineno"> 153</span>&#160; </div>
227227
<div class="line"><a name="l00154"></a><span class="lineno"> 154</span>&#160;}</div>
228228
</div><!-- fragment --></div><!-- contents -->
229229
<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>
230230
<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>
231231
<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>
232+
<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>
232233
<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>
233234
<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>
234235
<div class="ttc" id="acompat_8h_html"><div class="ttname"><a href="compat_8h.html">compat.h</a></div></div>

docs/html/Coroutine_8h.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
<tr style="height: 56px;">
2323
<td id="projectalign" style="padding-left: 0.5em;">
2424
<div id="projectname">AceRoutine
25-
&#160;<span id="projectnumber">1.2.1</span>
25+
&#160;<span id="projectnumber">1.2.2</span>
2626
</div>
2727
<div id="projectbrief">A low-memory, fast-switching, cooperative multitasking library using stackless coroutines on Arduino platforms.</div>
2828
</td>

0 commit comments

Comments
 (0)