mirror of
https://github.com/pellepl/spiffs.git
synced 2026-08-01 08:07:47 +00:00
updated docs
This commit is contained in:
+24
-1
@@ -50,7 +50,7 @@ Now, write the my_spiffs_mount function:
|
||||
cfg.phys_addr = 0; // start spiffs at start of spi flash
|
||||
cfg.phys_erase_block = 65536; // according to datasheet
|
||||
cfg.log_block_size = 65536; // let us not complicate things
|
||||
cfg.log_block_size = LOG_PAGE_SIZE; // as we said
|
||||
cfg.log_page_size = LOG_PAGE_SIZE; // as we said
|
||||
|
||||
cfg.hal_read_f = my_spi_read;
|
||||
cfg.hal_write_f = my_spi_write;
|
||||
@@ -127,6 +127,29 @@ Compile, run, cross fingers hard, and you'll get the output:
|
||||
Got errors? Check spiffs.h for error definitions to get a clue what went voodoo.
|
||||
|
||||
|
||||
* THINGS TO CHECK
|
||||
|
||||
When you alter the spiffs_config values, make sure you also check the typedefs
|
||||
in spiffs_config.h:
|
||||
|
||||
- spiffs_block_ix
|
||||
- spiffs_page_ix
|
||||
- spiffs_obj_id
|
||||
- spiffs_span_ix
|
||||
|
||||
The sizes of these typedefs must not underflow, else spiffs might end up in
|
||||
eternal loops. Each typedef is commented what check for.
|
||||
|
||||
Also, if you alter the code or just want to verify your configuration, you can
|
||||
run
|
||||
|
||||
> make test
|
||||
|
||||
in the spiffs folder. This will run all testcases using the configuration in
|
||||
default/spiffs_config.h and test/params_test.h. The tests are written for linux
|
||||
but should run under cygwin also.
|
||||
|
||||
|
||||
* INTEGRATING SPIFFS
|
||||
|
||||
In order to integrate spiffs to your embedded target, you will basically need:
|
||||
|
||||
Reference in New Issue
Block a user