Skip to main content
Renesas Electronics Europe - Knowledgebase

How do I use Queues with Half Word Values?

Last Updated:05/09/2017


Explains how to use ThreadX Queues with half word values.


After completing this how-to you will be able to use ThreadX queues with half word values.


You need to have a project that uses a ThreadX Queue.


Go to the area of your code where you use the tx_queue_send or tx_queue_receive API. Use a construct to create a word value. For example: uint16_t testValue[2] = {1234, 0}; You can then use a pointer to testValue in the API. For example:  tx_queue_send(&g_console_queue, &testValue, TX_NO_WAIT);
It is best however to just use word values. This also helps insure messages are aligned on a word boundary, which is required.

What's Next

You should now be able to correctly use messages for ThreadX queue APIs.