From 7eb3414cff6ce4b91a84232abc9d0b97c0c93aec Mon Sep 17 00:00:00 2001 From: Bas Stottelaar Date: Fri, 23 Oct 2020 00:47:19 +0200 Subject: [PATCH] cpu/*: remove unneeded ENABLE_DEBUG --- cpu/stm32/periph/wdt.c | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/cpu/stm32/periph/wdt.c b/cpu/stm32/periph/wdt.c index f50fe2e7ea..767bd6959c 100644 --- a/cpu/stm32/periph/wdt.c +++ b/cpu/stm32/periph/wdt.c @@ -22,6 +22,7 @@ #include #include +#include #include "cpu.h" #include "timex.h" @@ -46,13 +47,11 @@ extern "C" { #define IWDG_UNLOCK ((uint16_t)0x5555) #define IWDG_LOCK ((uint16_t)0x0000) -#if ENABLE_DEBUG -/* wdt_time (us) = LSI(us) x 4 x 2^PRE x RELOAD */ static inline uint32_t _wdt_time(uint8_t pre, uint16_t rel) { + /* wdt_time (us) = LSI(us) x 4 x 2^PRE x RELOAD */ return (uint32_t)(((uint64_t) US_PER_SEC * 4 * (1 << pre) * rel ) / CLOCK_LSI); } -#endif static inline void _iwdt_unlock(void) { @@ -133,9 +132,7 @@ void wdt_setup_reboot(uint32_t min_time, uint32_t max_time) _set_prescaler(pre); _set_reload(rel); -#if ENABLE_DEBUG - DEBUG("[wdt]: reset time %lu [us]\n", _wdt_time(pre, rel)); -#endif + DEBUG("[wdt]: reset time %" PRIu32 " [us]\n", _wdt_time(pre, rel)); /* Refresh wdt counter */ wdt_kick();