瀏覽代碼

feat(esp_common): Added PACKED_ATTR in esp_attr.h

Aditya Patwardhan 2 年之前
父節點
當前提交
8edef17f1a
共有 1 個文件被更改,包括 3 次插入0 次删除
  1. 3 0
      components/esp_common/include/esp_attr.h

+ 3 - 0
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))