AP_Param: use PACKED attribute in examples
This commit is contained in:
parent
ed918dc6bc
commit
416fef73a8
@ -7,9 +7,7 @@
|
||||
|
||||
uint8_t eeprom[0x1000];
|
||||
|
||||
#pragma pack(1)
|
||||
|
||||
struct EEPROM_header {
|
||||
struct PACKED EEPROM_header {
|
||||
uint16_t magic;
|
||||
uint8_t revision;
|
||||
uint8_t spare;
|
||||
@ -18,7 +16,7 @@ struct EEPROM_header {
|
||||
static const uint16_t k_EEPROM_magic = 0x5041;
|
||||
static const uint16_t k_EEPROM_revision = 2;
|
||||
|
||||
struct Var_header {
|
||||
struct PACKED Var_header {
|
||||
uint8_t size : 6;
|
||||
uint8_t spare : 2;
|
||||
uint8_t key;
|
||||
|
@ -8,9 +8,7 @@
|
||||
|
||||
uint8_t eeprom[0x1000];
|
||||
|
||||
#pragma pack(1)
|
||||
|
||||
struct EEPROM_header {
|
||||
struct PACKED EEPROM_header {
|
||||
uint8_t magic[2];
|
||||
uint8_t revision;
|
||||
uint8_t spare;
|
||||
|
Loading…
Reference in New Issue
Block a user