-
Notifications
You must be signed in to change notification settings - Fork 14
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
Add feature-gated support for defmt::Format #20
Conversation
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.
Sounds good to me, thank you!
Could you also:
- Rename the feature
defmt-03
- Add an entry to the changelog
- Document this feature in the readme and lib.rs?
This repo has en example.
Changes have been made. I chose not to add doctest examples in lib.rs, as I do not know how to enable the feature within the doctest context. Since usage is basically like anything else that derives debug or format, this is a pretty trivial usage. Hopefully the example in the readme is sufficient. |
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.
Thank you!
I would also just add a couple of lines about the defmt-03 feature to the lib.rs, without examples.
To enable defmt support, when specifying a dependency on eeprom24x, add the feature "defmt-03" | ||
|
||
```toml | ||
[dependencies] | ||
eeprom24x = { version = "0.7.2", features = ["defmt-03"] } | ||
``` |
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 shorten this section to just this.
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.
Are you suggesting deleting the two previous paragraphs?
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.
Do we still want to add something to lib.rs? I could just move or duplicate the usage example from README.md
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.
yes, I would remove the introduction and example and just make "defmt" into a link to the crates.io page.
Then we are never outdated. Furthermore, I think people will most probably either already know about defmt or not care much about it.
Co-authored-by: Diego Barrios Romero <eldruin@gmail.com>
Co-authored-by: Diego Barrios Romero <eldruin@gmail.com>
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.
Thank you!
Supports defmt::Format operating with the types in this driver. This is especially useful for outputting Errors. To enable operating with defmt, set the feature "defmt" in the dependency.