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

spiffs - Detect rBoot integration and replace default mount and format functions... #1269

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
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
4 changes: 2 additions & 2 deletions Sming/Services/SpifFS/spiffs_sming.c
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@ static void spiffs_mount_internal(spiffs_config *cfg)
//debugf("%X", dat);
}

void spiffs_mount()
void spiffs_mount_default()
{
spiffs_config cfg = spiffs_get_storage_config();
spiffs_mount_internal(&cfg);
Expand All @@ -165,7 +165,7 @@ void spiffs_unmount()
}

// FS formatting function
bool spiffs_format()
bool spiffs_format_default()
{
spiffs_unmount();
spiffs_config cfg = spiffs_get_storage_config();
Expand Down
12 changes: 10 additions & 2 deletions Sming/Services/SpifFS/spiffs_sming.h
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,18 @@ extern "C" {

#include "spiffs.h"

void spiffs_mount();
#ifdef RBOOT_INTEGRATION
#define spiffs_mount() spiffs_mount_manual(RBOOT_SPIFFS_0, SPIFF_SIZE)
#define spiffs_format() spiffs_format_manual(RBOOT_SPIFFS_0, SPIFF_SIZE)
#else
#define spiffs_mount() spiffs_mount_default()
#define spiffs_format() spiffs_format_default()
#endif

void spiffs_mount_default();
void spiffs_mount_manual(u32_t phys_addr, u32_t phys_size);
void spiffs_unmount();
bool spiffs_format();
bool spiffs_format_default();
bool spiffs_format_internal(spiffs_config *cfg);
bool spiffs_format_manual(u32_t phys_addr, u32_t phys_size);
spiffs_config spiffs_get_storage_config();
Expand Down