From fa95a39471d4cfff9c0939159cf5058917fa2e70 Mon Sep 17 00:00:00 2001 From: Koen Zandberg Date: Mon, 25 Oct 2021 22:25:25 +0200 Subject: [PATCH] bootloaders/riotboot_dfu: Use ztimer instead of ztimer --- bootloaders/riotboot_dfu/Makefile | 3 ++- bootloaders/riotboot_dfu/main.c | 4 ++++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/bootloaders/riotboot_dfu/Makefile b/bootloaders/riotboot_dfu/Makefile index 86995d3119..4a943449c9 100644 --- a/bootloaders/riotboot_dfu/Makefile +++ b/bootloaders/riotboot_dfu/Makefile @@ -5,7 +5,8 @@ APPLICATION = riotboot_dfu USEMODULE += riotboot_usb_dfu # Use xtimer for scheduled reboot -USEMODULE += xtimer +USEMODULE += ztimer +USEMODULE += ztimer_auto_init # USB device vendor and product ID # pid.codes test VID/PID, not globally unique diff --git a/bootloaders/riotboot_dfu/main.c b/bootloaders/riotboot_dfu/main.c index ebf876042b..91606817b5 100644 --- a/bootloaders/riotboot_dfu/main.c +++ b/bootloaders/riotboot_dfu/main.c @@ -26,6 +26,7 @@ #include "panic.h" #include "riotboot/slot.h" #include "riotboot/usb_dfu.h" +#include "ztimer.h" #include "bootloader_selection.h" @@ -70,6 +71,9 @@ void kernel_init(void) riotboot_slot_jump(slot); } + /* Init ztimer before starting DFU mode */ + ztimer_init(); + /* Nothing to boot, stay in DFU mode to flash a slot */ riotboot_usb_dfu_init(1); }