[riot-notifications] [RIOT-OS/RIOT] periph/dac: support for extension API (#10512)
notifications at github.com
Thu Nov 29 14:33:37 CET 2018
### Contribution description
This is an implementation of the extension API as proposed in #9582 for DAC extensions. It corresponds to the implementation of the GPIO extension API in #9860 and #9958. The PR contains the following contributions:
- Low level function prototypes `dac_*_ll` in `drivers/include/periph.h`.
- Changes of `dac_*` functions to redirect a function call either to the low level functions `dac_*_ll` or to the `dac_ext_*` function provided by an DAC extension device driver.
- New function prototype `dac_channels` which returns the number of channels, in case of low level drivers simply the `DAC_NUMOF`. This new function makes it possible to get the information from a certain device how many channels it has and allows to iterate over the all channels of all devices.
- Changes of low level function `dac_*_ll` for all CPUs that support DAC channels.
### Testing procedure
A test case is provided that implements a soft-driver for the DAC extension interface. The test case uses this driver to confirm that interception and redirection of the API call are working properly. This has been tested and is working properly on esp8266-esp-12x.
### Issues/PRs references
Corresponds to #9860 and #9958
The changes in the `makefiles/pseudomodules.mk` and in `drivers/Makefile.include` made to get it working are the same as in #9958. These changes might be removed once #9958 is merged.
You can view, comment on, or merge this pull request online at:
-- Commit Summary --
* periph/dac: initial DAC extension API
* cpu/*: support for DAC extension API
* drivers/extend: support for DAC extension API
* drivers/extend: Makefile support DAC extension
* tests: Test application for DAC extension
-- File Changes --
M cpu/efm32/periph/dac.c (13)
M cpu/esp32/periph/adc.c (13)
M cpu/kinetis/periph/dac.c (13)
M cpu/sam3/periph/dac.c (13)
M cpu/stm32_common/periph/dac.c (13)
M drivers/Makefile.dep (4)
M drivers/Makefile.include (4)
A drivers/extend/Makefile (1)
A drivers/extend/dac_notsup.c (83)
A drivers/extend/dac_redir.c (120)
A drivers/extend/include/dac_ext_conf.h (56)
A drivers/include/extend/dac.h (159)
A drivers/include/extend/doc.txt (22)
M drivers/include/periph/dac.h (115)
M makefiles/pseudomodules.inc.mk (3)
A tests/extend_dac/Makefile (17)
A tests/extend_dac/Makefile.include (2)
A tests/extend_dac/include/dac_ext_conf.h (64)
A tests/extend_dac/main.c (123)
A tests/extend_dac/tests/01-run.py (33)
-- Patch Links --
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the notifications