Skip to content
Snippets Groups Projects
Commit 416fef73 authored by Andrew Tridgell's avatar Andrew Tridgell
Browse files

AP_Param: use PACKED attribute in examples

parent ed918dc6
No related branches found
No related tags found
No related merge requests found
...@@ -7,9 +7,7 @@ ...@@ -7,9 +7,7 @@
uint8_t eeprom[0x1000]; uint8_t eeprom[0x1000];
#pragma pack(1) struct PACKED EEPROM_header {
struct EEPROM_header {
uint16_t magic; uint16_t magic;
uint8_t revision; uint8_t revision;
uint8_t spare; uint8_t spare;
...@@ -18,7 +16,7 @@ struct EEPROM_header { ...@@ -18,7 +16,7 @@ struct EEPROM_header {
static const uint16_t k_EEPROM_magic = 0x5041; static const uint16_t k_EEPROM_magic = 0x5041;
static const uint16_t k_EEPROM_revision = 2; static const uint16_t k_EEPROM_revision = 2;
struct Var_header { struct PACKED Var_header {
uint8_t size : 6; uint8_t size : 6;
uint8_t spare : 2; uint8_t spare : 2;
uint8_t key; uint8_t key;
......
...@@ -8,9 +8,7 @@ ...@@ -8,9 +8,7 @@
uint8_t eeprom[0x1000]; uint8_t eeprom[0x1000];
#pragma pack(1) struct PACKED EEPROM_header {
struct EEPROM_header {
uint8_t magic[2]; uint8_t magic[2];
uint8_t revision; uint8_t revision;
uint8_t spare; uint8_t spare;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment