From 6071b1aa0d2196d7e4bba682fd08351d00c1fa7a Mon Sep 17 00:00:00 2001 From: Bertrand Songis Date: Sun, 28 Aug 2016 10:06:37 +0200 Subject: [PATCH] Compilation fix --- radio/src/opentx.h | 13 ++++++++----- .../targets/common/arm/stm32/usbd_storage_msd.cpp | 4 ++-- 2 files changed, 10 insertions(+), 7 deletions(-) diff --git a/radio/src/opentx.h b/radio/src/opentx.h index 78ff5444d..72c19abd2 100644 --- a/radio/src/opentx.h +++ b/radio/src/opentx.h @@ -545,17 +545,20 @@ extern uint8_t rotencSpeed; #define ROTENC_DELAY_HIGHSPEED 2 #endif -#define HEART_TIMER_10MS 1 -#define HEART_TIMER_PULSES 2 // when multiple modules this is the first one +#define HEART_TIMER_10MS 1 +#define HEART_TIMER_PULSES 2 // when multiple modules this is the first one #if defined(PCBTARANIS) || defined(PCBFLAMENCO) || defined(PCBHORUS) - #define HEART_WDT_CHECK (HEART_TIMER_10MS + (HEART_TIMER_PULSES << 0) + (HEART_TIMER_PULSES << 1)) +#define HEART_WDT_CHECK (HEART_TIMER_10MS + (HEART_TIMER_PULSES << 0) + (HEART_TIMER_PULSES << 1)) #else - #define HEART_WDT_CHECK (HEART_TIMER_10MS + HEART_TIMER_PULSES) +#define HEART_WDT_CHECK (HEART_TIMER_10MS + HEART_TIMER_PULSES) #endif extern uint8_t heartbeat; -#if defined(CPUARM) +#if defined(CPUARM) && !defined(BOOT) void watchdogSuspend(uint32_t timeout); +#define WATCHDOG_SUSPEND(x) watchdogSuspend(x) +#else +#define WATCHDOG_SUSPEND(...) #endif #define MAX_ALERT_TIME 60 diff --git a/radio/src/targets/common/arm/stm32/usbd_storage_msd.cpp b/radio/src/targets/common/arm/stm32/usbd_storage_msd.cpp index 7ba0e0a02..837de258a 100644 --- a/radio/src/targets/common/arm/stm32/usbd_storage_msd.cpp +++ b/radio/src/targets/common/arm/stm32/usbd_storage_msd.cpp @@ -223,7 +223,7 @@ int8_t STORAGE_Read (uint8_t lun, uint32_t blk_addr, uint16_t blk_len) { - watchdogSuspend(100/*1s*/); + WATCHDOG_SUSPEND(100/*1s*/); #if defined(EEPROM) if (lun == STORAGE_EEPROM_LUN) { @@ -248,7 +248,7 @@ int8_t STORAGE_Write (uint8_t lun, uint32_t blk_addr, uint16_t blk_len) { - watchdogSuspend(100/*1s*/); + WATCHDOG_SUSPEND(100/*1s*/); #if defined(EEPROM) if (lun == STORAGE_EEPROM_LUN) {