Skip to content

Start discussion about main.cpp#38

Open
AnotherButler wants to merge 1 commit intomasterfrom
AnotherButler-patch-8
Open

Start discussion about main.cpp#38
AnotherButler wants to merge 1 commit intomasterfrom
AnotherButler-patch-8

Conversation

@AnotherButler
Copy link
Copy Markdown
Contributor

Start discussion about this example.

Start discussion about this example.
@AnotherButler
Copy link
Copy Markdown
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 cmonr and kegilbert April 5, 2019 16:42
@kegilbert
Copy link
Copy Markdown
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