Start discussion about main.cpp#38
Conversation
Start discussion about this example.
|
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? |
|
@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) |
Start discussion about this example.