From 0155632dd3b30e398df56c5db920726971cc5d3a Mon Sep 17 00:00:00 2001 From: Alex Stewart Date: Tue, 25 Aug 2015 17:13:13 -0700 Subject: [PATCH] Remove 'packed' attribute from all regs structs --- core/include/esp/dport_regs.h | 2 +- core/include/esp/gpio_regs.h | 2 +- core/include/esp/iomux_regs.h | 2 +- core/include/esp/spi_regs.h | 2 +- core/include/esp/timer_regs.h | 2 +- core/include/esp/uart_regs.h | 2 +- core/include/esp/wdt_regs.h | 2 +- 7 files changed, 7 insertions(+), 7 deletions(-) diff --git a/core/include/esp/dport_regs.h b/core/include/esp/dport_regs.h index 44a3b5b..df17103 100644 --- a/core/include/esp/dport_regs.h +++ b/core/include/esp/dport_regs.h @@ -45,7 +45,7 @@ struct DPORT_REGS { uint32_t volatile OTP_MAC1; // 0x54 uint32_t volatile OTP_CHIPID; // 0x58 uint32_t volatile OTP_MAC2; // 0x5c -} __attribute__ (( packed )); +}; _Static_assert(sizeof(struct DPORT_REGS) == 0x60, "DPORT_REGS is the wrong size"); diff --git a/core/include/esp/gpio_regs.h b/core/include/esp/gpio_regs.h index 21e2c29..3d91efb 100644 --- a/core/include/esp/gpio_regs.h +++ b/core/include/esp/gpio_regs.h @@ -57,7 +57,7 @@ struct GPIO_REGS { uint32_t volatile PWM; // 0x68 uint32_t volatile RTC_CALIB; // 0x6c uint32_t volatile RTC_CALIB_RESULT; // 0x70 -} __attribute__ (( packed )); +}; _Static_assert(sizeof(struct GPIO_REGS) == 0x74, "GPIO_REGS is the wrong size"); diff --git a/core/include/esp/iomux_regs.h b/core/include/esp/iomux_regs.h index d3b9653..4ea3be2 100644 --- a/core/include/esp/iomux_regs.h +++ b/core/include/esp/iomux_regs.h @@ -20,7 +20,7 @@ struct IOMUX_REGS { uint32_t volatile CONF; // 0x00 uint32_t volatile PIN[16]; // 0x04 - 0x40 -} __attribute__ (( packed )); +}; _Static_assert(sizeof(struct IOMUX_REGS) == 0x44, "IOMUX_REGS is the wrong size"); diff --git a/core/include/esp/spi_regs.h b/core/include/esp/spi_regs.h index 7dcf4db..dfcf998 100644 --- a/core/include/esp/spi_regs.h +++ b/core/include/esp/spi_regs.h @@ -67,7 +67,7 @@ struct SPI_REGS { uint32_t volatile EXT1; // 0xf4 uint32_t volatile EXT2; // 0xf8 uint32_t volatile EXT3; // 0xfc -} __attribute__ (( packed )); +}; _Static_assert(sizeof(struct SPI_REGS) == 0x100, "SPI_REGS is the wrong size"); diff --git a/core/include/esp/timer_regs.h b/core/include/esp/timer_regs.h index f2aacfc..867d63f 100644 --- a/core/include/esp/timer_regs.h +++ b/core/include/esp/timer_regs.h @@ -36,7 +36,7 @@ struct TIMER_REGS { // FRC1 FRC2 uint32_t volatile CTRL; // 0x08 0x28 uint32_t volatile STATUS; // 0x0c 0x2c uint32_t volatile ALARM; // 0x30 -} __attribute__ (( packed )); +}; _Static_assert(sizeof(struct TIMER_REGS) == 0x14, "TIMER_REGS is the wrong size"); diff --git a/core/include/esp/uart_regs.h b/core/include/esp/uart_regs.h index fe8e03d..4726823 100644 --- a/core/include/esp/uart_regs.h +++ b/core/include/esp/uart_regs.h @@ -46,7 +46,7 @@ struct UART_REGS { uint32_t volatile _unused[17]; // 0x34 - 0x74 uint32_t volatile DATE; // 0x78 uint32_t volatile ID; // 0x7c -} __attribute__ (( packed )); +}; _Static_assert(sizeof(struct UART_REGS) == 0x80, "UART_REGS is the wrong size"); diff --git a/core/include/esp/wdt_regs.h b/core/include/esp/wdt_regs.h index a9ee063..eb51f57 100644 --- a/core/include/esp/wdt_regs.h +++ b/core/include/esp/wdt_regs.h @@ -27,7 +27,7 @@ struct WDT_REGS { uint32_t volatile REG2; // 0x08 uint32_t volatile _unused[2]; // 0x0c - 0x10 uint32_t volatile FEED; // 0x14 -} __attribute__ (( packed )); +}; _Static_assert(sizeof(struct WDT_REGS) == 0x18, "WDT_REGS is the wrong size");