Use DMA enable for DCache condition
Signed-off-by: HiFiPhile <admin@hifiphile.com>
This commit is contained in:
@@ -88,7 +88,7 @@ TU_ATTR_ALWAYS_INLINE static inline uint8_t dwc2_ep_count(const dwc2_regs_t* dwc
|
||||
//--------------------------------------------------------------------
|
||||
// DMA
|
||||
//--------------------------------------------------------------------
|
||||
#if CFG_TUD_MEM_DCACHE_ENABLE && CFG_TUD_DWC2_DMA_ENABLE
|
||||
#if CFG_TUD_MEM_DCACHE_ENABLE
|
||||
bool dcd_dcache_clean(const void* addr, uint32_t data_size) {
|
||||
TU_VERIFY(addr && data_size);
|
||||
return dwc2_dcache_clean(addr, data_size);
|
||||
|
||||
@@ -280,7 +280,7 @@ static inline void dwc2_phy_update(dwc2_regs_t* dwc2, uint8_t hs_phy_type) {
|
||||
}
|
||||
|
||||
//------------- DCache -------------//
|
||||
#if (CFG_TUD_MEM_DCACHE_ENABLE && CFG_TUD_DWC2_DMA_ENABLE) || (CFG_TUH_MEM_DCACHE_ENABLE && CFG_TUH_DWC2_DMA_ENABLE)
|
||||
#if CFG_TUD_MEM_DCACHE_ENABLE || CFG_TUH_MEM_DCACHE_ENABLE
|
||||
|
||||
typedef struct
|
||||
{
|
||||
|
||||
@@ -141,7 +141,7 @@ TU_ATTR_ALWAYS_INLINE static inline bool dma_host_enabled(const dwc2_regs_t* dwc
|
||||
return CFG_TUH_DWC2_DMA_ENABLE && ghwcfg2.arch == GHWCFG2_ARCH_INTERNAL_DMA;
|
||||
}
|
||||
|
||||
#if CFG_TUH_MEM_DCACHE_ENABLE && CFG_TUH_DWC2_DMA_ENABLE
|
||||
#if CFG_TUH_MEM_DCACHE_ENABLE
|
||||
bool hcd_dcache_clean(const void* addr, uint32_t data_size) {
|
||||
TU_VERIFY(addr && data_size);
|
||||
return dwc2_dcache_clean(addr, data_size);
|
||||
|
||||
Reference in New Issue
Block a user