Altera_Forum
Honored Contributor
15 years agoMessage Q with Data Structure help
Good day. I am a little rusty on C so would like some basic help. I would like to define a structure to hold Character LCD data such as the text string, the position, and the style. I would like to use the structure to pass messages to the LCD display task which will then write to the LCD.
I have defined typedef struct message{ char text[16]; int xpos; int ypos; enum { STEADY, BLINK } textstyle; } LCDMessage LCDMessage LCDMessages[10]; Now what is the proper method of initializing the Q for MicroC because all the examples show the void type for pointer. So I'm guessing I need to map an array of pointers to the data structures but not sure. Can someone please straighten me out and show me a simple example using a structure for messages. Is this possible? Thanks JT