I came across this piece of code in one of MicroChip's example codes. I'm unable to understand what it exactly means
typedef struct __attribute__((packed))
{
BYTE command;
BYTE data;
} ACCESSORY_APP_PACKET;
I can understand that a struct aliased ACCESSORY_APP_PACKET is being created, but what does the __attribute__((packed)) mean? It makes __attribute__ as a function. But if that is so, how is it being typedef'd as a struct?
BYTE is a known datatype made by Microchip.
Thanks.