[riot-notifications] [RIOT-OS/RIOT] cpu/esp32: fix of periph_* submodule compilation (#11337)

Gunar Schorcht notifications at github.com
Thu Apr 4 00:50:15 CEST 2019


### Contribution description

This PR changes the handling of `periph_*` submoduls during compilation for ESP32. Until now, all `periph_*` 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

- separate submodules and source files are introduced for ADC and DAC,
- functionality which is required by ADC and DAC is moved to a new submodule `periph_adc_ctrl`,
- required dependencies are added to the makefiles, and
- print board configuration is adapted accordingly.

### 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` and `tests/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.
You can view, comment on, or merge this pull request online at:

  https://github.com/RIOT-OS/RIOT/pull/11337

-- Commit Summary --

  * cpu/esp32: use periph.mk in perpih Makefile
  * cpu/esp32: new module for ADC controller functions
  * cpu/esp32: rtcio_* moved to new submodule adc_ctrl
  * cpu/esp32: dac_* moved to separate DAC submodule
  * boards/esp32*: print config for enabled modules
  * cpu/esp32: periph submodules enabled by default
  * cpu/esp32: additional module dependencies

-- File Changes --

    M boards/common/esp32/board_common.c (14)
    M cpu/esp32/Makefile.dep (3)
    M cpu/esp32/Makefile.include (5)
    M cpu/esp32/include/adc_arch.h (10)
    A cpu/esp32/include/adc_ctrl.h (100)
    M cpu/esp32/periph/Makefile (2)
    M cpu/esp32/periph/adc.c (401)
    A cpu/esp32/periph/adc_ctrl.c (253)
    A cpu/esp32/periph/dac.c (152)
    M cpu/esp32/periph/gpio.c (1)

-- Patch Links --

https://github.com/RIOT-OS/RIOT/pull/11337.patch
https://github.com/RIOT-OS/RIOT/pull/11337.diff

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/RIOT-OS/RIOT/pull/11337
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.riot-os.org/pipermail/notifications/attachments/20190403/1a41a580/attachment.html>


More information about the notifications mailing list