8000 0.3 - implement COROUTINE_DELAY_MICROS(); update COROUTINE_DELAY_SECONDS() by bxparks · Pull Request #10 · bxparks/AceRoutine · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

0.3 - implement COROUTINE_DELAY_MICROS(); update COROUTINE_DELAY_SECONDS() #10

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 19 commits into from
Aug 27, 2019

Conversation

bxparks
Copy link
Owner
@bxparks bxparks commented Aug 27, 2019
  • 0.3 (2019-08-26)
    • Update AutoBenchmark/README.md benchmark numbers.
    • Use a do-while loop COROUTINE_AWAIT() so that it is guaranteed to call
      COROUTINE_YIELD() at least once. Previously, if the condition of the
      await was already (or always) true, the while-loop caused the coroutine
      to hog the control flow without yielding.
    • Use a do-while loop in COROUTINE_DELAY() so that COROUTINE_YIELD()
      is guaranteed to be called at least once, even if the delay is 0.
    • Add COROUTINE_DELAY_MICROS(delayMicros) which is similar to the
      existing COROUTINE_DELAY(delayMillis) macro. The actual delay time may
      be inaccurate on slow processors (e.g. 16 MHz AVR processors) and become
      more accurate for faster processors (e.g. ESP32). (Microsecond Timing? #9)
    • Breaking: The COROUTINE_DELAY_SECONDS(delaySeconds) macro now takes
      only one parmeter instead of 2 parameters. An external loopCounter
      variable no longer needs to be provided by the caller, which simplifies
      the API.
    • Add examples/Delay/Delay.ino program to validate the various
      COROUTINE_DELAY*() macros.
    • The sizeof(Coroutine) increases from 14 bytes to 15 bytes on an 8-bit
      processor. No change on 32-bit (still 28 bytes).

bxparks added 19 commits August 5, 2019 13:08
… ensure that COROUTINE_YIELD() is called at least once even if 'condition' is already true
…IELD() issued by COROUTINE_AWAIT(); add tests/Makefile
…void ambiguity with global millis() method (#9)
…INE_DELAY(), COROUTINE_DELAY_MILLIS() and COROUTINE_DELAY_MICROS() (#9)
…eSeconds() and the 2 uint16_t parameters already allocated by COROUTINE_DELAY()
@bxparks bxparks merged commit 7572262 into master Aug 27, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant
0