summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLiPeng <[email protected]>2025-09-01 15:32:59 +0800
committersakumisu <[email protected]>2025-09-01 15:35:51 +0800
commit55ce05f270523fe0a05b5f6ca1af6da03a8ff1a9 (patch)
tree1ea81338e8ea570d46974b04145a937a61e12124
parent5d5b61a606b1d2ba5512ef3c71fb11975eed5e40 (diff)
bugfix: Fix support for idf versions lower than 5.3
-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 76fdd397..34795f26 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.