Hi
I have a struct variable as such:
Now I have a function that is supposed to write a byte array (message) to the data element of the above struct (its 50 bytes long):Code:typedef struct { uint8_t header[APS_ASDU_OFFSET]; uint8_t data[sizeof(AppLowPowerData_t)]; uint8_t footer[APS_AFFIX_LENGTH - APS_ASDU_OFFSET]; } Generic_RF_Packet_t;
Sadly this does not seem to work, and I would like to avoid using a for loop to copy each of the bytes out of the message array and into my (struct based) data array.Code:void sendWirelessPacket2(uint8_t message[]) { messageParams.asduLength = sizeof(message); moduleComms.data = message; } // sendWirelessPacket
Can someone help me out?
Many thanks
David