Skip to content

fix(idf): support legacy FatFS VFS registration API - #431

Merged
sakumisu merged 1 commit into
cherry-embedded:masterfrom
YanKE01:fix/idf-fatfs-register-compat
Jul 31, 2026
Merged

fix(idf): support legacy FatFS VFS registration API#431
sakumisu merged 1 commit into
cherry-embedded:masterfrom
YanKE01:fix/idf-fatfs-register-compat

Conversation

@YanKE01

@YanKE01 YanKE01 commented Jul 31, 2026

Copy link
Copy Markdown
Contributor

Description

ESP-IDF release/v5.5 is still widely used, so the esp_vfs_fat_register() call should remain compatible across different ESP-IDF versions.

The new esp_vfs_fat_register() API using esp_vfs_fat_conf_t is only available in ESP-IDF 6.0.1 and later. ESP-IDF 6.0.0 and earlier, including release/v5.5, still use the legacy four-argument API.

This PR selects the appropriate API according to ESP_IDF_VERSION, preserving compatibility with both mainstream ESP-IDF 5.5 releases and newer versions.

Summary by CodeRabbit

  • Bug Fixes
    • Improved FAT filesystem compatibility across different ESP-IDF versions.
    • Ensured filesystem registration uses the appropriate configuration method for each supported version.

@coderabbitai

coderabbitai Bot commented Jul 31, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: 10074418-6098-40a2-97a9-9d1870fd20e5

📥 Commits

Reviewing files that changed from the base of the PR and between af3a981 and 08cb6e4.

📒 Files selected for processing (1)
  • platform/idf/usbh_fatfs.c

📝 Walkthrough

Walkthrough

The FATFS registration code now includes ESP-IDF version information and selects the configuration-structure API for versions newer than 6.0. Older versions continue to use the legacy API.

Changes

ESP-IDF FATFS compatibility

Layer / File(s) Summary
Versioned FATFS registration
platform/idf/usbh_fatfs.c
The source includes esp_idf_version.h and selects the appropriate esp_vfs_fat_register call for the ESP-IDF version.

Estimated code review effort: 1 (Trivial) | ~4 minutes

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly describes the change to support the legacy FatFS VFS registration API.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@sakumisu
sakumisu merged commit 487d0b6 into cherry-embedded:master Jul 31, 2026
6 of 7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants