Skip to content

Commit 7dd7d1e

Browse files
bors[bot]benpiccomaribugschorcht
authored
Merge #19806 #19814
19806: ztimer/periodic: remove timer on init if already running r=kaspar030 a=benpicco 19814: boards/sipeed-longan-nano: revert default to variant with TFT r=benpicco a=gschorcht ### Contribution description This PR reverts commit 69fb00b to fix CI compilation. ### Testing procedure Green CI with full build. ### Issues/PRs references Co-authored-by: Benjamin Valentin <[email protected]> Co-authored-by: Marian Buschsieweke <[email protected]> Co-authored-by: Gunar Schorcht <[email protected]>
3 parents ae2118c + eadb374 + ce653b7 commit 7dd7d1e

File tree

3 files changed

+7
-1
lines changed

3 files changed

+7
-1
lines changed

boards/sipeed-longan-nano/Kconfig

+1-1
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ menu "Sipeed Longan Nano Board Configuration"
3838

3939
config SIPEED_LONGAN_NANO_WITH_TFT
4040
bool "Board with TFT display"
41-
default y
41+
default y if MODULE_DISP_DEV
4242
select HAVE_ST7735
4343
help
4444
Indicates that a Sipeed Longan Nano board with TFT display is used.
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
11
PORT_LINUX ?= /dev/ttyACM0
22
PROGRAMMER ?= dfu-util
3+
4+
ifneq (,$(filter st7735,$(USEMODULE)))
5+
CFLAGS += '-DCONFIG_SIPEED_LONGAN_NANO_WITH_TFT=1'
6+
endif
7+
38
include $(RIOTBOARD)/common/gd32v/Makefile.include

sys/ztimer/periodic.c

+1
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,7 @@ void ztimer_periodic_init(ztimer_clock_t *clock, ztimer_periodic_t *timer,
5757
bool (*callback)(
5858
void *), void *arg, uint32_t interval)
5959
{
60+
ztimer_remove(clock, &timer->timer);
6061
*timer =
6162
(ztimer_periodic_t){ .clock = clock, .interval = interval,
6263
.callback = callback, .arg = arg,

0 commit comments

Comments
 (0)