1
0
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:
bors[bot] 2023-05-11 10:11:37 +00:00 committed by GitHub
commit d362a8d697
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
194 changed files with 70 additions and 66 deletions

View File

@ -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)

View File

@ -15,6 +15,7 @@ APPLICATION_DIRS := \
examples \
tests \
tests/bench \
tests/core \
tests/drivers \
tests/periph \
tests/pkg \

View File

@ -0,0 +1,2 @@
RIOTBASE ?= $(CURDIR)/../../..
include $(CURDIR)/../../Makefile.tests_common

View File

@ -1,4 +1,4 @@
include ../Makefile.tests_common
include ../Makefile.core_common
USEMODULE += xtimer

View File

@ -1,4 +1,4 @@
include ../Makefile.tests_common
include ../Makefile.core_common
USEMODULE += test_utils_interactive_sync

View File

@ -1,4 +1,4 @@
include ../Makefile.tests_common
include ../Makefile.core_common
FEATURES_BLACKLIST += arch_avr8 arch_msp430 arch_riscv

View File

@ -1,4 +1,4 @@
include ../Makefile.tests_common
include ../Makefile.core_common
USEMODULE += xtimer

View File

@ -1,4 +1,4 @@
include ../Makefile.tests_common
include ../Makefile.core_common
FEATURES_REQUIRED += cpp
FEATURES_REQUIRED += libstdcpp
USEPKG += fff

View File

@ -1,4 +1,4 @@
include ../Makefile.tests_common
include ../Makefile.core_common
USEMODULE += fmt
USEMODULE += xtimer

View File

@ -1,4 +1,4 @@
include ../Makefile.tests_common
include ../Makefile.core_common
USEMODULE += xtimer

View File

@ -1,3 +1,3 @@
include ../Makefile.tests_common
include ../Makefile.core_common
include $(RIOTBASE)/Makefile.include

View File

@ -1,4 +1,4 @@
include ../Makefile.tests_common
include ../Makefile.core_common
USEMODULE += embunit

View File

@ -1,3 +1,3 @@
include ../Makefile.tests_common
include ../Makefile.core_common
include $(RIOTBASE)/Makefile.include

View File

@ -1,3 +1,3 @@
include ../Makefile.tests_common
include ../Makefile.core_common
include $(RIOTBASE)/Makefile.include

View File

@ -1,3 +1,3 @@
include ../Makefile.tests_common
include ../Makefile.core_common
include $(RIOTBASE)/Makefile.include

View File

@ -1,4 +1,4 @@
include ../Makefile.tests_common
include ../Makefile.core_common
USEMODULE += xtimer

View File

@ -0,0 +1,3 @@
include ../Makefile.core_common
include $(RIOTBASE)/Makefile.include

View File

@ -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

View File

@ -0,0 +1,3 @@
include ../Makefile.core_common
include $(RIOTBASE)/Makefile.include

View File

@ -1,4 +1,4 @@
include ../Makefile.tests_common
include ../Makefile.core_common
FEATURES_REQUIRED += cpp

View File

@ -1,4 +1,4 @@
include ../Makefile.tests_common
include ../Makefile.core_common
USEMODULE += nice
USEMODULE += ps

View File

@ -0,0 +1,3 @@
include ../Makefile.core_common
include $(RIOTBASE)/Makefile.include

View File

@ -0,0 +1,3 @@
include ../Makefile.core_common
include $(RIOTBASE)/Makefile.include

View File

@ -1,4 +1,4 @@
include ../Makefile.tests_common
include ../Makefile.core_common
ifneq (,$(filter nucleo-f042k6,$(BOARD)))
PROBLEM ?= 3

View File

@ -0,0 +1,3 @@
include ../Makefile.core_common
include $(RIOTBASE)/Makefile.include

View File

@ -1,4 +1,4 @@
include ../Makefile.tests_common
include ../Makefile.core_common
USEMODULE += core_thread_flags
USEMODULE += xtimer

View File

@ -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