Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

change dcd_dcache_*() API return type from void to bool #2887

Merged
merged 1 commit into from
Nov 25, 2024

Conversation

hathach
Copy link
Owner

@hathach hathach commented Nov 25, 2024

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, including TUH_EPBUF_DCACHE_SIZE, TUH_EPBUF_DEF, and TUH_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, and dcd_dcache_clean_invalidate) from void to bool 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 return bool and use TU_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 defining CFG_TUD_MEM_DCACHE_LINE_SIZE and CFG_TUH_MEM_DCACHE_LINE_SIZE based on CFG_TUSB_MEM_DCACHE_LINE_SIZE. [1] [2] [3]

@hathach hathach merged commit 62f0e87 into master Nov 25, 2024
171 checks passed
@hathach hathach deleted the change-dcd_dcache_return-to-bool branch November 25, 2024 13:09
@roma-jam
Copy link
Contributor

@hathach
Hi, do you have any plans to make a v0.17.1 release soon?

@hathach
Copy link
Owner Author

hathach commented Nov 27, 2024

@hathach Hi, do you have any plans to make a v0.17.1 release soon?

I currently have no plan, but if espressif want a tag version, I could probably release it in a week or two. I will need to review other pendings PRs and also wait for the audio driver to be updated to work with dcache as well.

@roma-jam
Copy link
Contributor

@hathach that would be great, thanks a lot.
It is always better to have something tagged.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants