-
Notifications
You must be signed in to change notification settings - Fork 2k
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
cpu/esp32: fix of periph_* submodule compilation #11337
cpu/esp32: fix of periph_* submodule compilation #11337
Conversation
Includes now $(RIOTMAKE)/periph.mk instead of $(RIOTBASE)/Makefile.include to control compilation of periph submodules.
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.
Just a few comments, it looks good. I will be testing this shortly.
I tested the ADC and DAC on esp32-wroom-32 and works fine. |
@leandrolanzieri I addressed all change requests. |
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.
Changes look good. ACK. Please @gschorcht squash!
Functions that are used by ADC and DAC peripherals are moved to a new submodule periph_adc_ctrl. This is necessary to compile separate submodules for ADC and DAC.
da08c46
to
94a1af3
Compare
@leandrolanzieri Squashed |
@leandrolanzieri Thanks for reviewing and merging it. |
@leandrolanzieri Next, I will rebase PRs #11289 to #11294 |
Contribution description
This PR changes the handling of
periph_*
submoduls during compilation for ESP32. Until now, allperiph_*
submodules were always compiled.#if MODULE_PERIPH_*
wrappers were used instead for the following reason:ADC and DAC channels are implemented by the same hardware controller. Therefore, both peripherals were implemented in the same file
periph/adc.c
, which in turn prevented the use of$(RIOTMAKE)/periph.mk
and periph_ * submodules.With this PR
periph_adc_ctrl
,Testing procedure
Since the implementation of peripherals did not change with exception of ADC and DAC, successful compilation of tests that use peripherals should be enough.
Due to the changes of ADC and DAC implementation structure,
tests/periph_adc
andtests/periph_dac
should be executed on any ESP32 board with ADC and DAC channels, e.g.,esp32-wroom-32
.Issues/PRs references
This PR was initiated by the discussion in PR #11289.