groger57 wrote on Friday, November 18, 2016:
Hello:
I’m trying to get a message queue functioning in a particular way but having a bit of trouble, so hoping that someone could provide some help. First, I need to send data to a UART using a single-point queue. So I have created that queue and it works with no issues.
However, I have 2 structure types I need to get to the queue. The first has 12 different data members. The size of the struct is 41 bytes - call this “sType”
Some of the messages I need to send to the UART are strings only, used to control the touchscreen. So I have defined another structure that contains just 2 data members, an int and an array of 40 chars. Also 41 chars. Call this “uType”.
Since the queue task handler was created for “sType”: uint16_t QUEUE_ITEM_SIZE = sizeof( *sType );
How can I possibly send an instance of the other data structure to the queue? In short, I need to send one of 2 types to the queue.
Thank you for any help on this.