Skip to content

Commit

Permalink
Merge #19806 #19814
Browse files Browse the repository at this point in the history
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]>
  • Loading branch information
4 people committed Jul 12, 2023
3 parents ae2118c + eadb374 + ce653b7 commit 7dd7d1e
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 1 deletion.
2 changes: 1 addition & 1 deletion boards/sipeed-longan-nano/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ menu "Sipeed Longan Nano Board Configuration"

config SIPEED_LONGAN_NANO_WITH_TFT
bool "Board with TFT display"
default y
default y if MODULE_DISP_DEV
select HAVE_ST7735
help
Indicates that a Sipeed Longan Nano board with TFT display is used.
Expand Down
5 changes: 5 additions & 0 deletions boards/sipeed-longan-nano/Makefile.include
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
PORT_LINUX ?= /dev/ttyACM0
PROGRAMMER ?= dfu-util

ifneq (,$(filter st7735,$(USEMODULE)))
CFLAGS += '-DCONFIG_SIPEED_LONGAN_NANO_WITH_TFT=1'
endif

include $(RIOTBOARD)/common/gd32v/Makefile.include
1 change: 1 addition & 0 deletions sys/ztimer/periodic.c
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@ void ztimer_periodic_init(ztimer_clock_t *clock, ztimer_periodic_t *timer,
bool (*callback)(
void *), void *arg, uint32_t interval)
{
ztimer_remove(clock, &timer->timer);
*timer =
(ztimer_periodic_t){ .clock = clock, .interval = interval,
.callback = callback, .arg = arg,
Expand Down

0 comments on commit 7dd7d1e

Please sign in to comment.