-
Notifications
You must be signed in to change notification settings - Fork 23
doc: nrf-bm: libraries: add bm_storage documentation #426
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
base: main
Are you sure you want to change the base?
Conversation
|
You can find the documentation preview for this PR here. |
386377e to
d998081
Compare
eivindj-nordic
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As discussed offline I also wonder if the storage init API should take a configuration structure instead of setting parameters in bm_storage strut before calling init.
ba80825 to
d314076
Compare
d314076 to
bc6d392
Compare
| ==== | ||
|
|
||
| Use the :c:func:`bm_storage_read` function to copy data from NVM into RAM. | ||
| The data length must be a multiple of the backend’s program unit and within the configured region. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"must be a multiple of the backend’s program unit"
This leavs me with the question, what is the backend's program unit
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In the sample we have the comment
Write buffer size must be a multiple of the program unit.
To support both RRAM (16 bytes) and SoftDevice (4 bytes) backends, that is 16 bytes.
Could probably be added to the documentation.
bjorn-tore-taraldsen
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"multiple of the erase unit"
Definition of erase units, where is this defined
|
Adding a commit with a bit of review, to be squashed before merging. @MirkoCovizzi , can you add the following:
|
4841ac6 to
1793ab7
Compare
| Use the :c:func:`bm_storage_write` function to write data to NVM. | ||
| Writes are validated against alignment and range, and completion is reported through :c:member:`bm_storage.evt_handler`. | ||
|
|
||
| .. note:: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- You don't need repeat of the same note, delete one of them, and there is no NO mention of "Program units" in "Write", but talks about "alignment".
doc/nrf-bm/libraries/bm_storage.rst
Outdated
|
|
||
| .. note:: | ||
|
|
||
| The program unit is the smallest block of data that can be written at once. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would like to see a reference to where the the program unit is defined.
doc/nrf-bm/libraries/bm_storage.rst
Outdated
|
|
||
| .. note:: | ||
|
|
||
| The erase unit is the minimum erasable block in NVM, and the erase length must be a multiple of this size. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same as for Program unit, reference to where it is defined
1018302 to
f4baf9a
Compare
Adds `bm_storage` library documentation. Signed-off-by: Mirko Covizzi <[email protected]> Co-authored-by: Bartosz Gentkowski <[email protected]>
11c29c7 to
339c706
Compare
* Adds some missing Doxygen for some input parameters. * Make some fields visible by Doxygen. Signed-off-by: Mirko Covizzi <[email protected]>
339c706 to
fcae6f7
Compare
|
@bjorn-tore-taraldsen Comments addressed |
Adds
bm_storagelibrary documentation.