diff options
author | gdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4> | 2014-10-17 07:31:40 +0000 |
---|---|---|
committer | gdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4> | 2014-10-17 07:31:40 +0000 |
commit | a708e083e1cf6f6181bcd02baf9cc580f38b5397 (patch) | |
tree | 17ee42a1d3ec12fff765ec5c8a94b4b03f47f0c9 /os/hal/ports/STM32/LLD/TIMv1/icu_lld.h | |
parent | b1586a7e3afed45889903b1096d8b03412768478 (diff) | |
download | ChibiOS-a708e083e1cf6f6181bcd02baf9cc580f38b5397.tar.gz ChibiOS-a708e083e1cf6f6181bcd02baf9cc580f38b5397.tar.bz2 ChibiOS-a708e083e1cf6f6181bcd02baf9cc580f38b5397.zip |
Improvements to the ICU driver.
git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@7409 35acf78f-673a-0410-8e92-d51de3d6d3f4
Diffstat (limited to 'os/hal/ports/STM32/LLD/TIMv1/icu_lld.h')
-rw-r--r-- | os/hal/ports/STM32/LLD/TIMv1/icu_lld.h | 17 |
1 files changed, 15 insertions, 2 deletions
diff --git a/os/hal/ports/STM32/LLD/TIMv1/icu_lld.h b/os/hal/ports/STM32/LLD/TIMv1/icu_lld.h index eb50e69d2..5b8b71d9f 100644 --- a/os/hal/ports/STM32/LLD/TIMv1/icu_lld.h +++ b/os/hal/ports/STM32/LLD/TIMv1/icu_lld.h @@ -361,6 +361,19 @@ struct ICUDriver { */
#define icu_lld_get_period(icup) (*((icup)->pccrp) + 1)
+/**
+ * @brief Check on notifications status.
+ *
+ * @param[in] icup pointer to the @p ICUDriver object
+ * @return The notifications status.
+ * @retval false if notifications are not enabled.
+ * @retval true if notifications are enabled.
+ *
+ * @notapi
+ */
+#define icu_lld_are_notifications_enabled(icup) \
+ (bool)(((icup)->tim->DIER & STM32_TIM_DIER_IRQ_MASK) != 0)
+
/*===========================================================================*/
/* External declarations. */
/*===========================================================================*/
@@ -402,8 +415,8 @@ extern "C" { void icu_lld_start_capture(ICUDriver *icup);
void icu_lld_wait_capture(ICUDriver *icup);
void icu_lld_stop_capture(ICUDriver *icup);
- void icu_enable_notifications(ICUDriver *icup);
- void icu_disable_notifications(ICUDriver *icup);
+ void icu_lld_enable_notifications(ICUDriver *icup);
+ void icu_lld_disable_notifications(ICUDriver *icup);
#ifdef __cplusplus
}
#endif
|