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

Disable SDMMC code when the configuration is off #175

Merged
merged 1 commit into from
Feb 6, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 8 additions & 3 deletions src/littlefs_sdmmc.c
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,11 @@
#include <sys/param.h>
#include "littlefs_api.h"

#if CONFIG_LITTLEFS_SDMMC_SUPPORT && ESP_IDF_VERSION_MAJOR < 5
#if CONFIG_LITTLEFS_SDMMC_SUPPORT

#if ESP_IDF_VERSION_MAJOR < 5
#error "SDMMC feature is only supported in ESP-IDF v5+, see: https://github.com/joltwallet/esp_littlefs/pull/170#issuecomment-1882484668"
#endif
#else

int littlefs_sdmmc_read(const struct lfs_config *c, lfs_block_t block, lfs_off_t off, void *buffer, lfs_size_t size)
{
Expand Down Expand Up @@ -55,4 +57,7 @@ int littlefs_sdmmc_erase(const struct lfs_config *c, lfs_block_t block)
int littlefs_sdmmc_sync(const struct lfs_config *c)
{
return LFS_ERR_OK; // Doesn't require & doesn't support sync
}
}
#endif

#endif
Loading