olgamill55 Hello, I am having trouble getting these APIs to work : k_queue_append (), k_queue_init(), etc. I am using https://github.com/zephyrproject-rtos/zephyr/blob/main/tests/kernel/queue/src/test_queue_contexts.c as the prime example. However, this example is for ZTEST, but I was looking for a smaller code snippet that uses queues. I also need to use tasks (and I have them), so the queues meant to be for inter-task communication. My other alternative is to use messages queues defined in https://developer.nordicsemi.com/nRF_Connect_SDK/doc/0.3.0/zephyr/kernel/data_passing/message_queues.html (I have not tried them yet). Any ideas are appreciated!
jaredwolff What exactly are you using the queue for? I found that using message queues is a bit more sane for my applications. FIFOs are also useful but require heap usage or a separate pre-allocation of memory.
olgamill55 Planning on using them to pass the info between the threads. I am switching to the message queues. I think they are a lot more straightforward, like you said.
jaredwolff Good! Here’s an example of how I use them: https://github.com/circuitdojo/nrf9160-feather-examples-and-drivers/blob/v2.3.x/samples/tracker/src/main.c Look for K_MSGQ_DEFINE k_msgq_get and k_msgq_put 😎