mirror of
https://github.com/RIOT-OS/RIOT.git
synced 2025-12-30 17:01:19 +01:00
Merge pull request #17357 from kfessel/p-evtimer32
sys/evtimer,ztimer: do not depend on ztimer_now64
This commit is contained in:
commit
fe850e8919
@ -19,6 +19,8 @@ USEMODULE += gnrc_icmpv6_echo
|
||||
|
||||
USEMODULE += nanocoap_sock
|
||||
|
||||
USEMODULE += xtimer
|
||||
|
||||
# include this for nicely formatting the returned internal value
|
||||
USEMODULE += fmt
|
||||
|
||||
|
||||
@ -23,7 +23,6 @@
|
||||
#include "thread.h"
|
||||
#include "irq.h"
|
||||
#include "net/nanocoap_sock.h"
|
||||
#include "xtimer.h"
|
||||
|
||||
#include "shell.h"
|
||||
|
||||
|
||||
@ -5,6 +5,7 @@ USEMODULE += hashes
|
||||
USEMODULE += random
|
||||
USEMODULE += tinydtls_aes
|
||||
USEMODULE += tinydtls_ecc
|
||||
USEMODULE += xtimer
|
||||
|
||||
# TinyDTLS only has support for 32-bit architectures ATM
|
||||
FEATURES_REQUIRED += arch_32bit
|
||||
|
||||
@ -22,6 +22,7 @@
|
||||
#include "log.h"
|
||||
#include "net/sock/dtls.h"
|
||||
#include "net/credman.h"
|
||||
#include "xtimer.h"
|
||||
|
||||
#if SOCK_HAS_ASYNC
|
||||
#include "net/sock/async.h"
|
||||
|
||||
@ -154,6 +154,7 @@ endif
|
||||
|
||||
ifneq (,$(filter uhcpc,$(USEMODULE)))
|
||||
USEMODULE += posix_inet
|
||||
USEMODULE += xtimer
|
||||
endif
|
||||
|
||||
ifneq (,$(filter netdev_tap,$(USEMODULE)))
|
||||
@ -744,6 +745,7 @@ endif
|
||||
|
||||
ifneq (,$(filter suit_transport_coap, $(USEMODULE)))
|
||||
USEMODULE += nanocoap_sock
|
||||
USEMODULE += xtimer
|
||||
USEMODULE += sock_util
|
||||
endif
|
||||
|
||||
|
||||
@ -137,6 +137,9 @@ static inline uint32_t evtimer_now_msec(void)
|
||||
|
||||
/**
|
||||
* @brief Return the current system time in minutes
|
||||
*
|
||||
* @deprecated wrongly placed convenience function, that
|
||||
* may not work as expected with ztimer (32 bit)
|
||||
*/
|
||||
static inline uint32_t evtimer_now_min(void)
|
||||
{
|
||||
|
||||
@ -124,7 +124,7 @@ ifneq (,$(filter gnrc_ipv6_auto_subnets,$(USEMODULE)))
|
||||
USEMODULE += gnrc_ipv6_nib_rtr_adv_pio_cb
|
||||
CFLAGS += -DCONFIG_GNRC_IPV6_NIB_ADV_ROUTER=0
|
||||
CFLAGS += -DCONFIG_GNRC_IPV6_NIB_ADD_RIO_IN_LAST_RA=1
|
||||
|
||||
USEMODULE += xtimer
|
||||
ifeq (,$(filter gnrc_ipv6_auto_subnets_simple,$(USEMODULE)))
|
||||
DEFAULT_MODULE += gnrc_ipv6_auto_subnets_auto_init
|
||||
USEMODULE += gnrc_udp
|
||||
|
||||
@ -26,7 +26,9 @@
|
||||
#include "net/gnrc/tx_sync.h"
|
||||
#include "net/udp.h"
|
||||
#include "utlist.h"
|
||||
#ifdef MODULE_XTIMER
|
||||
#include "xtimer.h"
|
||||
#endif
|
||||
|
||||
#include "sock_types.h"
|
||||
#include "gnrc_sock_internal.h"
|
||||
|
||||
@ -8,4 +8,5 @@ ifneq (,$(filter benchmark_udp,$(USEMODULE)))
|
||||
USEMODULE += netutils
|
||||
USEMODULE += sema_inv
|
||||
USEMODULE += sock_udp
|
||||
USEMODULE += xtimer
|
||||
endif
|
||||
|
||||
@ -34,7 +34,6 @@ endif
|
||||
# make evtimer use ztimer_msec as low level timer
|
||||
ifneq (,$(filter evtimer_on_ztimer,$(USEMODULE)))
|
||||
USEMODULE += ztimer_msec
|
||||
USEMODULE += ztimer_now64
|
||||
endif
|
||||
|
||||
# "ztimer_xtimer_compat" is a wrapper of the xtimer API on ztimer_used
|
||||
|
||||
@ -6,6 +6,7 @@ BOARD_INSUFFICIENT_MEMORY := \
|
||||
arduino-uno \
|
||||
atmega328p \
|
||||
atmega328p-xplained-mini \
|
||||
bluepill-stm32f030c8 \
|
||||
i-nucleo-lrwan1 \
|
||||
msb-430 \
|
||||
msb-430h \
|
||||
@ -15,6 +16,7 @@ BOARD_INSUFFICIENT_MEMORY := \
|
||||
nucleo-l031k6 \
|
||||
nucleo-l053r8 \
|
||||
samd10-xmini \
|
||||
slstk3400a \
|
||||
stk3200 \
|
||||
stm32f030f4-demo \
|
||||
stm32f0discovery \
|
||||
|
||||
@ -1,5 +1,6 @@
|
||||
include ../Makefile.tests_common
|
||||
|
||||
USEMODULE += evtimer
|
||||
USEMODULE += xtimer
|
||||
|
||||
include $(RIOTBASE)/Makefile.include
|
||||
|
||||
@ -23,6 +23,7 @@
|
||||
#include "evtimer_msg.h"
|
||||
#include "thread.h"
|
||||
#include "msg.h"
|
||||
#include "xtimer.h"
|
||||
|
||||
#define WORKER_MSG_QUEUE_SIZE (8)
|
||||
|
||||
@ -45,7 +46,7 @@ static evtimer_msg_event_t events[] = {
|
||||
/* This thread will print the drift to stdout once per second */
|
||||
void *worker_thread(void *arg)
|
||||
{
|
||||
(void) arg;
|
||||
(void)arg;
|
||||
|
||||
msg_init_queue(worker_msg_queue, WORKER_MSG_QUEUE_SIZE);
|
||||
while (1) {
|
||||
@ -58,6 +59,11 @@ void *worker_thread(void *arg)
|
||||
}
|
||||
}
|
||||
|
||||
void sleep_msec(uint16_t t)
|
||||
{
|
||||
xtimer_msleep(t);
|
||||
}
|
||||
|
||||
int main(void)
|
||||
{
|
||||
evtimer_init_msg(&evtimer);
|
||||
@ -67,9 +73,11 @@ int main(void)
|
||||
THREAD_PRIORITY_MAIN - 1,
|
||||
THREAD_CREATE_STACKTEST,
|
||||
worker_thread, NULL, "worker");
|
||||
|
||||
while (1) {
|
||||
for (unsigned i = 0; i < NEVENTS; i++) {
|
||||
evtimer_add_msg(&evtimer, &events[i], pid);
|
||||
sleep_msec(10);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -10,7 +10,10 @@ BOARD_INSUFFICIENT_MEMORY := \
|
||||
atxmega-a3bu-xplained \
|
||||
bluepill-stm32f030c8 \
|
||||
derfmega128 \
|
||||
hifive1 \
|
||||
hifive1b \
|
||||
i-nucleo-lrwan1 \
|
||||
im880b \
|
||||
mega-xplained \
|
||||
microduino-corerf \
|
||||
msb-430 \
|
||||
|
||||
@ -20,6 +20,8 @@ USEMODULE += sock_ip
|
||||
USEMODULE += gnrc_ipv6
|
||||
USEMODULE += ps
|
||||
|
||||
USEMODULE += xtimer
|
||||
|
||||
CFLAGS += -DTEST_SUITES
|
||||
|
||||
include $(RIOTBASE)/Makefile.include
|
||||
|
||||
@ -8,7 +8,9 @@ BOARD_INSUFFICIENT_MEMORY := \
|
||||
nucleo-f031k6 \
|
||||
nucleo-f042k6 \
|
||||
nucleo-l011k4 \
|
||||
nucleo-l031k6\
|
||||
samd10-xmini \
|
||||
stk3200 \
|
||||
stm32f030f4-demo \
|
||||
stm32g0316-disco \
|
||||
#
|
||||
|
||||
@ -20,6 +20,8 @@ USEMODULE += gnrc_sock_check_reuse
|
||||
USEMODULE += sock_udp
|
||||
USEMODULE += gnrc_ipv6
|
||||
USEMODULE += ps
|
||||
USEMODULE += xtimer
|
||||
|
||||
|
||||
CFLAGS += -DTEST_SUITES
|
||||
|
||||
|
||||
@ -11,6 +11,8 @@ USEMODULE += gnrc_icmpv6_echo
|
||||
|
||||
USEMODULE += sock_udp
|
||||
|
||||
USEMODULE += xtimer
|
||||
|
||||
USEPKG += microcoap
|
||||
|
||||
# include this for printing IP addresses
|
||||
|
||||
@ -16,8 +16,10 @@ BOARD_INSUFFICIENT_MEMORY := \
|
||||
nucleo-f334r8 \
|
||||
nucleo-g070rb \
|
||||
nucleo-g071rb \
|
||||
nucleo-g431rb \
|
||||
nucleo-l031k6 \
|
||||
nucleo-l053r8 \
|
||||
nucleo-l412kb \
|
||||
saml10-xpro \
|
||||
saml11-xpro \
|
||||
slstk3400a \
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user