diff options
| author | hathach <[email protected]> | 2024-11-22 15:45:08 +0700 |
|---|---|---|
| committer | hathach <[email protected]> | 2024-11-22 15:45:08 +0700 |
| commit | 1533e693ee9884c934540fb3a41d97c92e51c2ee (patch) | |
| tree | 1c0f397da98348815ff28ef5a560a30363002c2b /src/common | |
| parent | 090964cd1b15c247c45d41f54dc249acc047137d (diff) | |
TUD_EPBUF_TYPE_DEF ncm_device
Diffstat (limited to 'src/common')
| -rw-r--r-- | src/common/tusb_mcu.h | 4 | ||||
| -rw-r--r-- | src/common/tusb_types.h | 3 |
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; \ |
