> Should the struct really be called 'sitalDecodedMessageStruct' from c standpoint?
It doesn't make a difference to C what you call it, so long as it's a unique name.
It depends what the local coding conventions are for the system you're working on.
Leaving the struct name blank is allowed, so you only have the typedef name.
1 2 3 4 5 6
|
typedef struct
{
/// Message type (sitalMessageType_*).
/// Equivalent DDC definition: wType
U16BIT wType;
} sitalDecodedMessageStruct;
|
Making the struct name and typedef name the same is also allowed.
1 2 3 4 5 6
|
typedef struct sitalDecodedMessageStruct
{
/// Message type (sitalMessageType_*).
/// Equivalent DDC definition: wType
U16BIT wType;
} sitalDecodedMessageStruct;
|
So to fix the issue with the function prototype,
> sitalDecodedMessageStructure* dmspDecodedMessage,
you either need to delete a few characters to use the typedef name
sitalDecodedMessageStruct* dmspDecodedMessage,
or use the full structure name with the struct keyword
struct sitalDecodedMessageStructure* dmspDecodedMessage,
Both are equivalent.