summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--osal/idf/usb_config.h7
1 files changed, 6 insertions, 1 deletions
diff --git a/osal/idf/usb_config.h b/osal/idf/usb_config.h
index 152c0b6c..3eca2e79 100644
--- a/osal/idf/usb_config.h
+++ b/osal/idf/usb_config.h
@@ -28,7 +28,12 @@
// #define CONFIG_USB_DCACHE_ENABLE
-/* attribute data into no cache ram */
+/* attribute data into no cache ram
+* DRAM_DMA_ALIGNED_ATTR was introduced in IDF 5.3. If not defined, it falls back to DMA_ATTR
+*/
+#ifndef DRAM_DMA_ALIGNED_ATTR
+#define DRAM_DMA_ALIGNED_ATTR DMA_ATTR
+#endif
#define USB_NOCACHE_RAM_SECTION DRAM_DMA_ALIGNED_ATTR
/* use usb_memcpy default for high performance but cost more flash memory.