make sure usb buffer occupies whole cache line when DCACHE is enabled for msc,cdc,hid

HIL enable device DMA for p4
This commit is contained in:
hathach
2024-11-21 10:15:30 +07:00
parent 2571889061
commit fa523a5682
10 changed files with 105 additions and 103 deletions

View File

@@ -58,6 +58,9 @@
// Generate a mask with bit from high (31) to low (0) set, e.g TU_GENMASK(3, 0) = 0b1111
#define TU_GENMASK(h, l) ( (UINT32_MAX << (l)) & (UINT32_MAX >> (31 - (h))) )
// DCache padding for variable to occupy full cache line
#define TUD_DCACHE_PADDING uint8_t TU_XSTRCAT(dcache_padding_, _TU_COUNTER_)[CFG_TUD_MEM_DCACHE_ENABLE ? CFG_TUD_MEM_DCACHE_LINE_SIZE : 1]
//--------------------------------------------------------------------+
// Includes
//--------------------------------------------------------------------+