Added packed attribute to structs

main
noah metz 2023-12-12 20:58:24 -07:00
parent fe30042100
commit c631201b90
1 changed files with 5 additions and 5 deletions

@ -34,26 +34,26 @@ int read_line = 22;
int rx2 = 16; int rx2 = 16;
int tx2 = 17; int tx2 = 17;
typedef struct { typedef struct __attribute__((packed)) {
uint8_t type; uint8_t type;
uint8_t controller_version; uint8_t controller_version;
uint8_t unknown[12]; uint8_t unknown[12];
uint16_t crc; uint16_t crc;
} pkt_init_t; } pkt_init_t;
typedef struct { typedef struct __attribute__((packed)) {
uint8_t type; uint8_t type;
uint8_t unknown[13]; uint8_t unknown[13];
uint16_t crc; uint16_t crc;
} pkt_init_resp_t; } pkt_init_resp_t;
typedef struct { typedef struct __attribute__((packed)) {
uint8_t type; uint8_t type;
uint8_t unknown[13]; uint8_t unknown[13];
uint16_t crc; uint16_t crc;
} pkt_init_2_t; } pkt_init_2_t;
typedef struct { typedef struct __attribute__((packed)) {
uint8_t type; uint8_t type;
uint8_t ack_type; uint8_t ack_type;
uint8_t unknown_1; uint8_t unknown_1;
@ -63,7 +63,7 @@ typedef struct {
uint16_t crc; uint16_t crc;
} pkt_ack_t; } pkt_ack_t;
typedef struct { typedef struct __attribute__((packed)) {
uint8_t type; uint8_t type;
uint8_t unknown[29]; uint8_t unknown[29];
uint16_t crc; uint16_t crc;