summaryrefslogtreecommitdiff
path: root/src/common
diff options
context:
space:
mode:
Diffstat (limited to 'src/common')
-rw-r--r--src/common/tusb_mcu.h4
-rw-r--r--src/common/tusb_types.h3
2 files changed, 4 insertions, 3 deletions
diff --git a/src/common/tusb_mcu.h b/src/common/tusb_mcu.h
index f6f90c592..622c8fc21 100644
--- a/src/common/tusb_mcu.h
+++ b/src/common/tusb_mcu.h
@@ -373,8 +373,8 @@
#define CFG_TUH_MEM_DCACHE_ENABLE_DEFAULT 1
#endif
- #define CFG_TUD_MEM_DCACHE_LINE_SIZE 64
- #define CFG_TUH_MEM_DCACHE_LINE_SIZE 64
+ #define CFG_TUD_MEM_DCACHE_LINE_SIZE_DEFAULT 64
+ #define CFG_TUH_MEM_DCACHE_LINE_SIZE_DEFAULT 64
#define CFG_TUH_DWC2_DMA_ENABLE_DEFAULT 0 // TODO currently have issue with buffer DMA with espressif
diff --git a/src/common/tusb_types.h b/src/common/tusb_types.h
index c726add84..e5660861d 100644
--- a/src/common/tusb_types.h
+++ b/src/common/tusb_types.h
@@ -35,16 +35,17 @@
extern "C" {
#endif
-// DCache padding for variable to occupy full cache line
#define TUD_EPBUF_DCACHE_SIZE(_size) \
(CFG_TUD_MEM_DCACHE_ENABLE ? (TU_DIV_CEIL(_size, CFG_TUD_MEM_DCACHE_LINE_SIZE) * CFG_TUD_MEM_DCACHE_LINE_SIZE) : (_size))
+// Declare an endpoint buffer with uint8_t[size]
#define TUD_EPBUF_DEF(_name, _size) \
union { \
CFG_TUD_MEM_ALIGN uint8_t _name[_size]; \
uint8_t _name##_dcache_padding[TUD_EPBUF_DCACHE_SIZE(_size)]; \
};
+// Declare an endpoint buffer with a type
#define TUD_EPBUF_TYPE_DEF(_name, _type) \
union { \
CFG_TUD_MEM_ALIGN _type _name; \