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

nvs: support StorageIterate #249

Draft
wants to merge 2 commits into
base: master
Choose a base branch
from
Draft

Conversation

codyps
Copy link

@codyps codyps commented Apr 11, 2023

This implements StorageIterate for EspNvs. Note that while the Error on iteration is setup to work, the actual implementation in esp-idf does not return any errors during iteration (other than "Not Found", indicating iteration is complete). As a result, next() will always return Some(Ok(...)) or None and never Some(Err(...)).


This depends on the esp-idf 5 iteration APIs (the ones in esp-idf 4 aren't supported) plus the change in espressif/esp-idf#11118. (Which we can apply in esp-idf-sys).

Plan on landing this:

  1. restrict to esp-idf 5
  2. have esp-idf-sys apply nvs: support iteration over namespace by index (IDFGH-9782) espressif/esp-idf#11118 to the esp-idf we build (5 & master)

embedded-svc PR: esp-rs/embedded-svc#48

@ivmarkov
Copy link
Collaborator

See this though. Let me know what you think.

This implements `StorageIterate` for `EspNvs`. Note that while the
`Error` on iteration is setup to work, the actual implementation in
esp-idf does not return any errors during iteration (other than "Not
Found", indicating iteration is complete). As a result, `next()` will
always return `Some(Ok(...))` or `None` and never `Some(Err(...))`.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants