From 8edef17f1a7549129dfadf085cd560d8161088ce Mon Sep 17 00:00:00 2001 From: Aditya Patwardhan Date: Fri, 13 Oct 2023 14:28:17 +0530 Subject: [PATCH] feat(esp_common): Added PACKED_ATTR in esp_attr.h --- components/esp_common/include/esp_attr.h | 3 +++ 1 file changed, 3 insertions(+) diff --git a/components/esp_common/include/esp_attr.h b/components/esp_common/include/esp_attr.h index bf067862d4..b3c9b10807 100644 --- a/components/esp_common/include/esp_attr.h +++ b/components/esp_common/include/esp_attr.h @@ -57,6 +57,9 @@ extern "C" { // Forces data to be placed to DMA-capable places #define DMA_ATTR WORD_ALIGNED_ATTR DRAM_ATTR +// Forces the data to be tightly packed with minimum required padding and no extra bytes are added for alignment +#define PACKED_ATTR __attribute__((packed)); + // Forces a function to be inlined #define FORCE_INLINE_ATTR static inline __attribute__((always_inline))