From 7f47b0a65cb949ec7ef6aad0d30545aef1f99587 Mon Sep 17 00:00:00 2001 From: Steve Cartmell Date: Tue, 30 Oct 2018 12:04:50 +0000 Subject: [PATCH] fix(hal-watchdog): Add feature guards to K64F watchdog implementation --- .../TARGET_MCUXpresso_MCUS/TARGET_MCU_K64F/reset_reason.c | 4 ++++ .../TARGET_MCUXpresso_MCUS/TARGET_MCU_K64F/watchdog_api.c | 5 +++++ 2 files changed, 9 insertions(+) diff --git a/targets/TARGET_Freescale/TARGET_MCUXpresso_MCUS/TARGET_MCU_K64F/reset_reason.c b/targets/TARGET_Freescale/TARGET_MCUXpresso_MCUS/TARGET_MCU_K64F/reset_reason.c index 1a5eb42909..6a646211d8 100644 --- a/targets/TARGET_Freescale/TARGET_MCUXpresso_MCUS/TARGET_MCU_K64F/reset_reason.c +++ b/targets/TARGET_Freescale/TARGET_MCUXpresso_MCUS/TARGET_MCU_K64F/reset_reason.c @@ -15,6 +15,8 @@ */ #include "reset_reason_api.h" +#if DEVICE_RESET_REASON + #include "fsl_rcm.h" reset_reason_t hal_reset_reason_get(void) @@ -102,3 +104,5 @@ void hal_reset_reason_clear(void) RCM_ClearStickyResetSources(RCM, kRCM_SourceAll); #endif } + +#endif // DEVICE_RESET_REASON diff --git a/targets/TARGET_Freescale/TARGET_MCUXpresso_MCUS/TARGET_MCU_K64F/watchdog_api.c b/targets/TARGET_Freescale/TARGET_MCUXpresso_MCUS/TARGET_MCU_K64F/watchdog_api.c index 22006d9177..1b2f72feb4 100644 --- a/targets/TARGET_Freescale/TARGET_MCUXpresso_MCUS/TARGET_MCU_K64F/watchdog_api.c +++ b/targets/TARGET_Freescale/TARGET_MCUXpresso_MCUS/TARGET_MCU_K64F/watchdog_api.c @@ -14,6 +14,9 @@ * limitations under the License. */ #include "watchdog_api.h" + +#if DEVICE_WATCHDOG + #include "reset_reason_api.h" #include "fsl_wdog.h" #include "fsl_clock.h" @@ -123,3 +126,5 @@ watchdog_features_t hal_watchdog_get_platform_features(void) return features; } + +#endif // DEVICE_WATCHDOG