change dcd_dcache_*() API return type from void to bool #2887
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This pull request includes multiple changes aimed at improving the handling of data cache (DCache) operations and configuration. The most important changes involve the introduction of new macros for host DCache declarations, changes to DCache-related function signatures, and the unification of DCache line size configurations.
DCache Handling Improvements:
src/common/tusb_types.h
: Introduced new macros for host DCache declarations, includingTUH_EPBUF_DCACHE_SIZE
,TUH_EPBUF_DEF
, andTUH_EPBUF_TYPE_DEF
. These macros help in declaring endpoint buffers with appropriate DCache handling.src/device/dcd.h
: Changed the return type of DCache-related functions (dcd_dcache_clean
,dcd_dcache_invalidate
, anddcd_dcache_clean_invalidate
) fromvoid
tobool
to indicate success or failure.src/device/usbd.c
,src/portable/chipidea/ci_hs/dcd_ci_hs.c
,src/portable/synopsys/dwc2/dcd_dwc2.c
,src/portable/synopsys/dwc2/dwc2_esp32.h
: Updated the implementations of DCache-related functions to returnbool
and useTU_VERIFY
for validation. [1] [2] [3] [4]Configuration Simplification:
src/common/tusb_mcu.h
: Removed redundant DCache configuration macros and set default values for DCache enable flags.src/tusb_option.h
: Unified the DCache line size configurations by definingCFG_TUD_MEM_DCACHE_LINE_SIZE
andCFG_TUH_MEM_DCACHE_LINE_SIZE
based onCFG_TUSB_MEM_DCACHE_LINE_SIZE
. [1] [2] [3]