mirror of
https://github.com/RIOT-OS/RIOT.git
synced 2024-12-29 04:50:03 +01:00
tests/periph/selftest_shield: timer allocation conflict
- Detect when the same timer is used by `ztimer` (pulled in as dependency for a peripheral driver, e.g. `periph_adc` on STM32F3) and the test application - Try to provide a better default (e.g. `TIMER_DEV(1)` when `ztimer_periph_timer` is in use, `TIMER_DEV(0)` otherwise)
This commit is contained in:
parent
e51dc0937d
commit
57488a57ab
@ -126,7 +126,17 @@
|
||||
# define UART_TEST_DEV UART_DEV(0)
|
||||
#endif
|
||||
#ifndef TIMER
|
||||
# define TIMER TIMER_DEV(0)
|
||||
# if IS_USED(MODULE_ZTIMER_PERIPH_TIMER) && CONFIG_ZTIMER_USEC_DEV == TIMER_DEV(0)
|
||||
# define TIMER TIMER_DEV(1)
|
||||
# else
|
||||
# define TIMER TIMER_DEV(0)
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#if IS_USED(MODULE_ZTIMER_PERIPH_TIMER)
|
||||
# if CONFIG_ZTIMER_USEC_DEV == TIMER
|
||||
# error "Same timer used for ztimer and test"
|
||||
# endif
|
||||
#endif
|
||||
|
||||
/* A higher clock frequency is beneficial in being able to actually measure the
|
||||
|
Loading…
Reference in New Issue
Block a user