aboutsummaryrefslogtreecommitdiffstats
path: root/os/hal/ports
diff options
context:
space:
mode:
authorGiovanni Di Sirio <gdisirio@gmail.com>2019-01-22 16:11:17 +0000
committerGiovanni Di Sirio <gdisirio@gmail.com>2019-01-22 16:11:17 +0000
commitfa4403e27268906ecbead89163af5734e94aa1de (patch)
tree47c79649771ad20d834ecfe7a388d44249c221a0 /os/hal/ports
parent4843579571cdbead612a27b7188c7020cd01b231 (diff)
downloadChibiOS-fa4403e27268906ecbead89163af5734e94aa1de.tar.gz
ChibiOS-fa4403e27268906ecbead89163af5734e94aa1de.tar.bz2
ChibiOS-fa4403e27268906ecbead89163af5734e94aa1de.zip
Fixed bug #1003.
git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@12577 110e8d01-0319-4d1e-a829-52ad28d1bb01
Diffstat (limited to 'os/hal/ports')
-rw-r--r--os/hal/ports/STM32/LLD/TIMv1/hal_st_lld.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/os/hal/ports/STM32/LLD/TIMv1/hal_st_lld.h b/os/hal/ports/STM32/LLD/TIMv1/hal_st_lld.h
index f1564c47d..156cd8902 100644
--- a/os/hal/ports/STM32/LLD/TIMv1/hal_st_lld.h
+++ b/os/hal/ports/STM32/LLD/TIMv1/hal_st_lld.h
@@ -89,6 +89,7 @@
#define STM32_HAS_TIM22 FALSE
#endif
+#if OSAL_ST_MODE == OSAL_ST_MODE_FREERUNNING
#if STM32_ST_USE_TIMER == 2
#if !STM32_HAS_TIM2
#error "TIM2 not present in the selected device"
@@ -158,6 +159,7 @@
#else
#error "STM32_ST_USE_TIMER specifies an unsupported timer"
#endif
+#endif /* OSAL_ST_MODE == OSAL_ST_MODE_FREERUNNING */
/*===========================================================================*/
/* Driver data structures and types. */
@@ -183,6 +185,7 @@ extern "C" {
/* Driver inline functions. */
/*===========================================================================*/
+#if (OSAL_ST_MODE == OSAL_ST_MODE_FREERUNNING) || defined(__DOXYGEN__)
/**
* @brief Returns the time counter value.
*
@@ -258,6 +261,7 @@ static inline bool st_lld_is_alarm_active(void) {
return (bool)((STM32_ST_TIM->DIER & STM32_TIM_DIER_CC1IE) != 0);
}
+#endif /* OSAL_ST_MODE == OSAL_ST_MODE_FREERUNNING */
#endif /* HAL_ST_LLD_H */