-
-
Notifications
You must be signed in to change notification settings - Fork 344
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Made spiffs_mount() compatible with rBoot. (#1292)
- Loading branch information
Showing
5 changed files
with
29 additions
and
42 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
#include "spiffs_sming.h" | ||
|
||
/* | ||
* rBoot uses different spiffs organization and we need to override this method | ||
* during application compile time in order to make automatic | ||
* mounting with `spiffs_mount()` work as expected. | ||
*/ | ||
spiffs_config spiffs_get_storage_config() | ||
{ | ||
spiffs_config cfg = {0}; | ||
#ifdef RBOOT_SPIFFS_0 | ||
cfg.phys_addr = RBOOT_SPIFFS_0; | ||
#elif RBOOT_SPIFFS_1 | ||
cfg.phys_addr = RBOOT_SPIFFS_1; | ||
#else | ||
#error "Define either RBOOT_SPIFFS_0 or RBOOT_SPIFFS_1" | ||
#endif | ||
cfg.phys_size = SPIFF_SIZE; | ||
cfg.phys_erase_block = INTERNAL_FLASH_SECTOR_SIZE; // according to datasheet | ||
cfg.log_block_size = INTERNAL_FLASH_SECTOR_SIZE * 2; // Important to make large | ||
cfg.log_page_size = LOG_PAGE_SIZE; // as we said | ||
return cfg; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters