From 9c63d91c1165b7bdc43b9226b95be8f0f87ee073 Mon Sep 17 00:00:00 2001 From: jeromecoutant Date: Thu, 11 Apr 2019 17:41:25 +0200 Subject: [PATCH] STM32: protect compilation when DEVICE_USTICKER is disabled --- targets/TARGET_STM/hal_tick_overrides.c | 5 +++++ targets/TARGET_STM/us_ticker.c | 4 ++++ 2 files changed, 9 insertions(+) diff --git a/targets/TARGET_STM/hal_tick_overrides.c b/targets/TARGET_STM/hal_tick_overrides.c index d7cb62eb8d..8334755112 100644 --- a/targets/TARGET_STM/hal_tick_overrides.c +++ b/targets/TARGET_STM/hal_tick_overrides.c @@ -13,6 +13,9 @@ * See the License for the specific language governing permissions and * limitations under the License. */ + +#if DEVICE_USTICKER + #include "hal/us_ticker_api.h" #include "us_ticker_data.h" @@ -75,3 +78,5 @@ void HAL_ResumeTick(void) { // Do nothing } + +#endif /* DEVICE_USTICKER */ diff --git a/targets/TARGET_STM/us_ticker.c b/targets/TARGET_STM/us_ticker.c index 18e0be8487..0c1a4302d1 100644 --- a/targets/TARGET_STM/us_ticker.c +++ b/targets/TARGET_STM/us_ticker.c @@ -13,6 +13,9 @@ * See the License for the specific language governing permissions and * limitations under the License. */ + +#if DEVICE_USTICKER + #include #include "us_ticker_api.h" #include "PeripheralNames.h" @@ -264,3 +267,4 @@ void us_ticker_free(void) us_ticker_disable_interrupt(); } +#endif /* DEVICE_USTICKER */