Merge pull request #15794 from fjmolinas/pr_fix_posix_sleep

tests/posix_sleep: fix for invalid RTT configurations
This commit is contained in:
Alexandre Abadie 2021-01-20 14:07:23 +01:00 committed by GitHub
commit 5bc7555ae7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 10 additions and 5 deletions

View File

@ -274,6 +274,7 @@ static const i2c_conf_t i2c_config[] = {
#ifndef RTT_FREQUENCY
#define RTT_FREQUENCY (32768U) /* in Hz. For changes see `rtt.c` */
#endif
#define RTT_MIN_OFFSET (10U)
/** @} */
/**

View File

@ -135,7 +135,7 @@ static const uart_conf_t uart_config[] = {
* @{
*/
#ifndef RTT_FREQUENCY
#define RTT_FREQUENCY (1) /* in Hz */
#define RTT_FREQUENCY (RTT_MAX_FREQUENCY) /* in Hz */
#endif
/** @} */

View File

@ -117,7 +117,7 @@ static const spi_conf_t spi_config[] = {
* @{
*/
#ifndef RTT_FREQUENCY
#define RTT_FREQUENCY (1) /* in Hz */
#define RTT_FREQUENCY (RTT_MAX_FREQUENCY) /* in Hz */
#endif
/** @} */

View File

@ -2,8 +2,12 @@ include ../Makefile.tests_common
USEMODULE += posix_sleep
# Pull-in periph-rtt on board that provides this feature to switch to the RTT
# backend of ztimer
FEATURES_OPTIONAL += periph_rtt
# These CPU families have a non configurable RTT of 1Hz, not enough for
# ztimer_msec to run on periph_rtt
ifeq (,$(filter efm32 kinetis,$(CPU)))
# Pull-in periph-rtt on boards that provide this feature to switch to
# the RTT backend of ztimer
FEATURES_OPTIONAL += periph_rtt
endif
include $(RIOTBASE)/Makefile.include