-
Notifications
You must be signed in to change notification settings - Fork 76
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
Defmt support for enums and structs #76
Conversation
But why? Longer version: |
USB tends to be timing sensitive, so in order to add logging inside a USB hal crate (what I'm currently working on https://github.com/atsam-rs/atsam4-hal/pull/49/files) defmt is necessary. My current development flow is to use probe-run + defmt for logging and bracktrace support. If these derive macros aren't added, I would need to maintain either a fork or wrap each enum and struct with another struct in order to handle log message formatting. Does that make sense? |
On Tue, Aug 24, 2021 at 12:45:19AM -0700, Jacob Alexander wrote:
USB tends to be timing sensitive, so in order to add logging inside a USB hal crate defmt is necessary.
... further good text ...
...(https://ferrous-systems.com/blog/defmt/ is a good read ...
Does that make sense?
Yes, it does.
It's worth to add to the commit message.
|
Sorry for the delay, I've been under the weather. |
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.
Can you please also add a CHANGELOG entry for adding defmt implementations for various structures?
Done |
USB tends to be very timing sensitive, using defmt makes it possible to use debug prints with USB (will negatively affect timings if you use traditional debug prints and effect the results). - Adds CI check for the defmt feature
Thanks! |
No problem - thanks for the help! :) |
(similar to how heapless handles defmt)