-
Notifications
You must be signed in to change notification settings - Fork 9
Add missing field initializers #30
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
OneWireESP32.cpp
Outdated
| .flags = { | ||
| .eot_level = 1 | ||
| .eot_level = 1, | ||
| .queue_nonblocking = false |
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.
perhaps the default value should be true instead (which is also the default) ?
my understanding is that false will block calls to rmt_transmit: while the library is done in a way to return false to write and reset if it does not succeed (up to the user to try later)
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.
Agreed - it probably should be! Although reviewing the definition of rmt_transmit_config_t et al, my understanding is that there are no defaults for these fields, so I set them to the value that would occur if the structure was zero'd before initialization.
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've pushed a new commit that changes this, as I agree with your point that it should be true, even if it may well have been defaulting to false before).
| .invert_in = 0, | ||
| .with_dma = 0, | ||
| .io_loop_back = 0, | ||
| .allow_pd = 0 |
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.
only #if ESP_IDF_VERSION >= ESP_IDF_VERSION_VAL(5, 4, 0)
| .io_loop_back = 1, | ||
| .io_od_mode = 1 | ||
| .io_od_mode = 1, | ||
| .allow_pd = 0 |
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.
only #if ESP_IDF_VERSION >= ESP_IDF_VERSION_VAL(5, 4, 0)
Resolves #18