From 2fe9d9f75531c090808c0c093db251cb405ec738 Mon Sep 17 00:00:00 2001 From: Marian Buschsieweke Date: Sun, 9 Jul 2023 11:36:12 +0200 Subject: [PATCH 1/4] Revert "boards/sipeed-longan-nano: default to variant with TFT" This reverts commit 69fb00bdfa13c5e83409fd6b5bd5068cf00fc08b. --- boards/sipeed-longan-nano/Kconfig | 1 - 1 file changed, 1 deletion(-) diff --git a/boards/sipeed-longan-nano/Kconfig b/boards/sipeed-longan-nano/Kconfig index 0899330d7602..eb126d4ac7a7 100644 --- a/boards/sipeed-longan-nano/Kconfig +++ b/boards/sipeed-longan-nano/Kconfig @@ -38,7 +38,6 @@ menu "Sipeed Longan Nano Board Configuration" config SIPEED_LONGAN_NANO_WITH_TFT bool "Board with TFT display" - default y select HAVE_ST7735 help Indicates that a Sipeed Longan Nano board with TFT display is used. From eadb3741e3a64116d65ba3a62480daef9a4472e0 Mon Sep 17 00:00:00 2001 From: Benjamin Valentin Date: Thu, 6 Jul 2023 18:39:39 +0200 Subject: [PATCH 2/4] ztimer/periodic: remove timer on init if already running --- sys/ztimer/periodic.c | 1 + 1 file changed, 1 insertion(+) diff --git a/sys/ztimer/periodic.c b/sys/ztimer/periodic.c index 5d9d8e9ef91a..ddd82b8d771c 100644 --- a/sys/ztimer/periodic.c +++ b/sys/ztimer/periodic.c @@ -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, From 3f389d0b150ea3ab9295458975d922df46e801f5 Mon Sep 17 00:00:00 2001 From: Gunar Schorcht Date: Mon, 10 Jul 2023 22:50:34 +0200 Subject: [PATCH 3/4] boards/sipeed-longan-nano: fix Kconfig for disp_dev driver --- boards/sipeed-longan-nano/Kconfig | 1 + 1 file changed, 1 insertion(+) diff --git a/boards/sipeed-longan-nano/Kconfig b/boards/sipeed-longan-nano/Kconfig index eb126d4ac7a7..7f65aa90a6bf 100644 --- a/boards/sipeed-longan-nano/Kconfig +++ b/boards/sipeed-longan-nano/Kconfig @@ -38,6 +38,7 @@ menu "Sipeed Longan Nano Board Configuration" config SIPEED_LONGAN_NANO_WITH_TFT bool "Board with TFT display" + default y if MODULE_DISP_DEV select HAVE_ST7735 help Indicates that a Sipeed Longan Nano board with TFT display is used. From ce653b74cd2add4ac6e55905c98617e1438639b4 Mon Sep 17 00:00:00 2001 From: Gunar Schorcht Date: Wed, 12 Jul 2023 15:56:09 +0200 Subject: [PATCH 4/4] boards/sipeed-longan-nano: default to TFT version if st7735 is used --- boards/sipeed-longan-nano/Makefile.include | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/boards/sipeed-longan-nano/Makefile.include b/boards/sipeed-longan-nano/Makefile.include index 1ac941091bd9..08b8f4897b4a 100644 --- a/boards/sipeed-longan-nano/Makefile.include +++ b/boards/sipeed-longan-nano/Makefile.include @@ -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