jack1998
Junior Member level 2
How to convert msg to uint8_t array msg_arr[8]?
Code:
typedef struct message_t
{
uint16_t time;
uint16_t lat;
uint8_t ns;
uint16_t lon;
uint8_t ew;
} message;
message msg;
msg.time = 0x1234;
msg.lat = 0x2122;
msg.ns = 'n';
msg.lon = 0x1834;
msg.ew = 'e';
uint8_t msg_arr[8];
Last edited by a moderator: