Skip to content
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

Start discussion about main.cpp #38

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

AnotherButler
Copy link
Contributor

Start discussion about this example.

Start discussion about this example.
@AnotherButler
Copy link
Contributor Author

This example is not the one being sourced in the docs: https://os.mbed.com/docs/mbed-os/v5.12/apis/queue.html

Do we know which one is up to date? How can we stop the duplication?

@AnotherButler AnotherButler requested review from kegilbert and cmonr April 5, 2019 16:42
@kegilbert
Copy link
Contributor

kegilbert commented Apr 5, 2019

@geky for which one is up to date, although I'm assuming the inline would be more out of date. The inline code found in https://raw.githubusercontent.com/ARMmbed/mbed-os-5-docs/development/docs/api/rtos/Queue.md seen below doesn't have a closing brace in the if and is missing the message_t struct defined in the other example so won't compile as is.

Queue<message_t, 32> queue;

message_t *message;

queue.put(message);

osEvent evt = queue.get();
if (evt.status == osEventMessage) {
    message_t *message = (message_t*)evt.value.p;

The second linked example (/rtos/Queue in the MonoRepo link below) currently compiles. Did not test if it actually runs yet, was working on that part of the CI process.

Going forward, these examples should be added to:

https://github.com/armmbed/mbed-os-examples-monorepo (Currently a WIP)

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.

2 participants