Skip to content

Update Event/EventQueue snippets to mirror updates to the API changes #125

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 3 commits into from
Feb 9, 2021

Conversation

adbridge
Copy link
Contributor

@adbridge adbridge commented Jan 21, 2021

ARMmbed/mbed-os#13975 updates the EventQueue dispatch API to

  1. move it to using chrono times and bring it inline with the rest of the code
  2. Separates the API into 3 distinct functions
    a) dispatch_for(duration ms)
    b) dispatch_once()
    c) dispatch_forever()

This PR updates the example snippets to mirror this functionality.

@adbridge
Copy link
Contributor Author

NOTE: will not pass the CI until the Mbed OS PR is merged !

@adbridge
Copy link
Contributor Author

adbridge commented Jan 21, 2021

Ahh looks like UserAllocatedEvent_ex1 also needs updating - will get than one added now. I'll check the other examples in the APIs_RTOS folder to make sure no others are also affected. Actually this is not the case as it turns out. UserAllocatedEvent has its own delay() and period() methods which have not been updated to use Chrono types yet. I will raise an issue to get these updated at a later date.

@adbridge
Copy link
Contributor Author

Looks like we are going to revisit some of the inconsistencies in the event / event queue APIs and fix them all in one go, thus this PR is on hold for now.

@adbridge
Copy link
Contributor Author

adbridge commented Feb 4, 2021

@evedon @0xc0170 please review

Copy link

@evedon evedon left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good.
Please squash your commits before merging.
We also need a green CI after the mbed-os PR is merged.

Also show how to use non_periodic and cancel.

Add timestamp to event printf and add expected results
Mbed OS is being updated to bring the event queue dispatch
function in line with other event functions in moving to using
chrono times. This commit updates the associated snippet
examples accordingly. It also fixes the use of the new split
dispatch functions:
dispatch_once(),
dispatch_for(duration ms),
dispatch_forever()
@adbridge
Copy link
Contributor Author

adbridge commented Feb 8, 2021

@0xc0170 looks like we can merge this ?

@0xc0170 0xc0170 merged commit e1a54bf into ARMmbed:master Feb 9, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants