Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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
RMT Onewire Peripheral #454
RMT Onewire Peripheral #454
Changes from 15 commits
a37af47
d45b33f
4a62132
b9de421
cc879bf
0183797
6e3f9b0
7148db1
719911b
c72e53c
cb17743
af7827b
f2453a4
9696af5
a72fb45
d0f1185
389135b
f8145c1
831be2d
bcf0ddd
8a8d7fd
c110fef
a7e26a9
fd076e8
269f4f3
eb6b1c2
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
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'm relatively sure that in the case where
rmt-legacy
is not enabled, this example will compile with "unused import" warnings, as you import a lot of stuff you don't use. Not the end of the world, but ideally we should fix that too.The easiest way to do it (and to avoid sprinkling
#[cfg(any(feature = "rmt-legacy", esp_idf_version_major = "4"))]
all over the example is to just put the whole example in a new module, as in: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.
done. Will do the other examples soon.
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.
Ditto.
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.
done
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.
Ditto -
mod example {}
.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.
done
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.
This cannot be done so simply. As discussed during the previous iteration, you do need the RMT peripherals which are defined by the
esp_idf_hal::rmt
module. And you need to pass a RMT channel toOWDriver
in addition to the pin. So you can't just#ifNdef
thermt
module when thermt-legacy
feature is not defined. What you need to do instead is to leave thermt
module here unconditionally, and then - inside thermt
module - protect with an#ifdef
all of the driver code, but leave the peripheral definitions always defined and valid - even when the legacy RMT driver is#ifNdef
-ed.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.
Done