mirror of
https://github.com/RIOT-OS/RIOT.git
synced 2024-12-29 04:50:03 +01:00
19565: tests: move core related applications to their own tests/core/ folder r=maribu a=aabadie 19568: tests: move remaining driver related applications to tests/drivers r=maribu a=aabadie 19574: cpu/stm32/periph_gpio: reset PU/PD for ADC channels r=maribu a=gschorcht ### Contribution description This PR provides a small fix that is relevant when a GPIO has been used as input/output with a pull resistor before it is initialized as an ADC channel. The PU/PD configuration has to be `0b00` for analog outputs which is corresponds to the reset state. However, if the GPIO is not in the reset state but was used digital input/output with any pull resistor, the PU/PD configuration has also to be reset to use it as ADC channel. ### Testing procedure - Green CI - The `periph_adc` test application should still work for any board that supports the `periph_adc` feature. ### Issues/PRs references Co-authored-by: Alexandre Abadie <alexandre.abadie@inria.fr> Co-authored-by: Gunar Schorcht <gunar@schorcht.net>
This commit is contained in:
commit
d362a8d697
@ -186,8 +186,9 @@ void gpio_init_analog(gpio_t pin)
|
||||
#else
|
||||
periph_clk_en(AHB1, (RCC_AHB1ENR_GPIOAEN << _port_num(pin)));
|
||||
#endif
|
||||
/* set to analog mode */
|
||||
/* set to analog mode, PUPD has to be 0b00 */
|
||||
_port(pin)->MODER |= (0x3 << (2 * _pin_num(pin)));
|
||||
_port(pin)->PUPDR &= ~(0x3 << (2 * _pin_num(pin)));
|
||||
}
|
||||
|
||||
void gpio_irq_enable(gpio_t pin)
|
||||
|
@ -15,6 +15,7 @@ APPLICATION_DIRS := \
|
||||
examples \
|
||||
tests \
|
||||
tests/bench \
|
||||
tests/core \
|
||||
tests/drivers \
|
||||
tests/periph \
|
||||
tests/pkg \
|
||||
|
2
tests/core/Makefile.core_common
Normal file
2
tests/core/Makefile.core_common
Normal file
@ -0,0 +1,2 @@
|
||||
RIOTBASE ?= $(CURDIR)/../../..
|
||||
include $(CURDIR)/../../Makefile.tests_common
|
@ -1,4 +1,4 @@
|
||||
include ../Makefile.tests_common
|
||||
include ../Makefile.core_common
|
||||
|
||||
USEMODULE += xtimer
|
||||
|
@ -1,4 +1,4 @@
|
||||
include ../Makefile.tests_common
|
||||
include ../Makefile.core_common
|
||||
|
||||
USEMODULE += test_utils_interactive_sync
|
||||
|
@ -1,4 +1,4 @@
|
||||
include ../Makefile.tests_common
|
||||
include ../Makefile.core_common
|
||||
|
||||
FEATURES_BLACKLIST += arch_avr8 arch_msp430 arch_riscv
|
||||
|
@ -1,4 +1,4 @@
|
||||
include ../Makefile.tests_common
|
||||
include ../Makefile.core_common
|
||||
|
||||
USEMODULE += xtimer
|
||||
|
@ -1,4 +1,4 @@
|
||||
include ../Makefile.tests_common
|
||||
include ../Makefile.core_common
|
||||
FEATURES_REQUIRED += cpp
|
||||
FEATURES_REQUIRED += libstdcpp
|
||||
USEPKG += fff
|
@ -1,4 +1,4 @@
|
||||
include ../Makefile.tests_common
|
||||
include ../Makefile.core_common
|
||||
|
||||
USEMODULE += fmt
|
||||
USEMODULE += xtimer
|
@ -1,4 +1,4 @@
|
||||
include ../Makefile.tests_common
|
||||
include ../Makefile.core_common
|
||||
|
||||
USEMODULE += xtimer
|
||||
|
@ -1,3 +1,3 @@
|
||||
include ../Makefile.tests_common
|
||||
include ../Makefile.core_common
|
||||
|
||||
include $(RIOTBASE)/Makefile.include
|
@ -1,4 +1,4 @@
|
||||
include ../Makefile.tests_common
|
||||
include ../Makefile.core_common
|
||||
|
||||
USEMODULE += embunit
|
||||
|
@ -1,3 +1,3 @@
|
||||
include ../Makefile.tests_common
|
||||
include ../Makefile.core_common
|
||||
|
||||
include $(RIOTBASE)/Makefile.include
|
@ -1,3 +1,3 @@
|
||||
include ../Makefile.tests_common
|
||||
include ../Makefile.core_common
|
||||
|
||||
include $(RIOTBASE)/Makefile.include
|
@ -1,3 +1,3 @@
|
||||
include ../Makefile.tests_common
|
||||
include ../Makefile.core_common
|
||||
|
||||
include $(RIOTBASE)/Makefile.include
|
@ -1,4 +1,4 @@
|
||||
include ../Makefile.tests_common
|
||||
include ../Makefile.core_common
|
||||
|
||||
USEMODULE += xtimer
|
||||
|
3
tests/core/mutex_order/Makefile
Normal file
3
tests/core/mutex_order/Makefile
Normal file
@ -0,0 +1,3 @@
|
||||
include ../Makefile.core_common
|
||||
|
||||
include $(RIOTBASE)/Makefile.include
|
@ -1,4 +1,4 @@
|
||||
include ../Makefile.tests_common
|
||||
include ../Makefile.core_common
|
||||
|
||||
# stm32f030f4-demo doesn't have enough RAM to run the test
|
||||
# so we reduce the stack size for every thread
|
3
tests/core/rmutex/Makefile
Normal file
3
tests/core/rmutex/Makefile
Normal file
@ -0,0 +1,3 @@
|
||||
include ../Makefile.core_common
|
||||
|
||||
include $(RIOTBASE)/Makefile.include
|
@ -1,4 +1,4 @@
|
||||
include ../Makefile.tests_common
|
||||
include ../Makefile.core_common
|
||||
|
||||
FEATURES_REQUIRED += cpp
|
||||
|
@ -1,4 +1,4 @@
|
||||
include ../Makefile.tests_common
|
||||
include ../Makefile.core_common
|
||||
|
||||
USEMODULE += nice
|
||||
USEMODULE += ps
|
3
tests/core/sched_testing/Makefile
Normal file
3
tests/core/sched_testing/Makefile
Normal file
@ -0,0 +1,3 @@
|
||||
include ../Makefile.core_common
|
||||
|
||||
include $(RIOTBASE)/Makefile.include
|
3
tests/core/thread_basic/Makefile
Normal file
3
tests/core/thread_basic/Makefile
Normal file
@ -0,0 +1,3 @@
|
||||
include ../Makefile.core_common
|
||||
|
||||
include $(RIOTBASE)/Makefile.include
|
@ -1,4 +1,4 @@
|
||||
include ../Makefile.tests_common
|
||||
include ../Makefile.core_common
|
||||
|
||||
ifneq (,$(filter nucleo-f042k6,$(BOARD)))
|
||||
PROBLEM ?= 3
|
3
tests/core/thread_exit/Makefile
Normal file
3
tests/core/thread_exit/Makefile
Normal file
@ -0,0 +1,3 @@
|
||||
include ../Makefile.core_common
|
||||
|
||||
include $(RIOTBASE)/Makefile.include
|
@ -1,4 +1,4 @@
|
||||
include ../Makefile.tests_common
|
||||
include ../Makefile.core_common
|
||||
|
||||
USEMODULE += core_thread_flags
|
||||
USEMODULE += xtimer
|
@ -1,4 +1,4 @@
|
||||
include ../Makefile.tests_common
|
||||
include ../Makefile.core_common
|
||||
|
||||
USEMODULE += core_thread_flags
|
||||
USEMODULE += xtimer
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user