I have a function UartSend() to send data to network through uart. it takes argument unsigned char and an integer
UartSend(unsigned char *psend_data,int length);
i want to send a structure through this function
#pragma pack(push, 1)
struct packet
{
int a;
char b[3];
...
}PacketData;
#pragma pack(pop)
How to covert this structure to unsigned char for sending this data through UartSend? thanks..