I have a structure as shown below.
typedef struct
{
attribute_code_t field_id;
uint8_t instance_num;
uint8_t length;
uint8_t data[32];
uint32_t crc_value;
}table_entry_t;
I want to populate the structure as follows.
entry->field_id = 54;;
entry->instance_num = 0;
entry->length = 4;
entry->data = 0xfdfcfefa;
It is giving me the error, error: incompatible types in assignment.at the last line.I am wondering what is the best way to do the above assignment.
Any help is appreciated.
The following code copies data to first 4 bytes of 32- byte.