aboutsummaryrefslogtreecommitdiffstats
path: root/os
diff options
context:
space:
mode:
authorTheodore Ateba <tf.ateba@gmail.com>2017-10-13 19:32:49 +0000
committerTheodore Ateba <tf.ateba@gmail.com>2017-10-13 19:32:49 +0000
commit41641dc844bcfb3b6bec122b0bce552be1c26b46 (patch)
tree2d67a28890a9e04b2cd1ac191c2341c3f3b5d755 /os
parent1f865bb94655f117f0a8e6f3827072bc319948d4 (diff)
downloadChibiOS-41641dc844bcfb3b6bec122b0bce552be1c26b46.tar.gz
ChibiOS-41641dc844bcfb3b6bec122b0bce552be1c26b46.tar.bz2
ChibiOS-41641dc844bcfb3b6bec122b0bce552be1c26b46.zip
AVR: Update the ICU header file.
git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@10820 35acf78f-673a-0410-8e92-d51de3d6d3f4
Diffstat (limited to 'os')
-rw-r--r--os/hal/ports/AVR/MEGA/LLD/TIMv1/hal_icu_lld.h47
1 files changed, 45 insertions, 2 deletions
diff --git a/os/hal/ports/AVR/MEGA/LLD/TIMv1/hal_icu_lld.h b/os/hal/ports/AVR/MEGA/LLD/TIMv1/hal_icu_lld.h
index 078fbb86d..589df04b1 100644
--- a/os/hal/ports/AVR/MEGA/LLD/TIMv1/hal_icu_lld.h
+++ b/os/hal/ports/AVR/MEGA/LLD/TIMv1/hal_icu_lld.h
@@ -157,6 +157,45 @@ struct ICUDriver {
/* Driver macros. */
/*===========================================================================*/
+
+/**
+ * @brief Returns the width of the latest pulse.
+ * @details The pulse width is defined as number of ticks between the start
+ * edge and the stop edge.
+ *
+ * @param[in] icup pointer to the @p ICUDriver object
+ * @return The number of ticks.
+ *
+ * @notapi
+ */
+/* #define icu_lld_get_width(icup) 1 */
+
+/**
+ * @brief Returns the width of the latest cycle.
+ * @details The cycle width is defined as number of ticks between a start
+ * edge and the next start edge.
+ *
+ * @param[in] icup pointer to the @p ICUDriver object
+ * @return The number of ticks.
+ *
+ * @notapi
+ */
+/* #define icu_lld_get_period(icup) 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
+ */
+/* TODO: The following macros must be implement. */
+#define icu_lld_are_notifications_enabled(icup) \
+ (bool)(FALSE)
+
/*===========================================================================*/
/* External declarations. */
/*===========================================================================*/
@@ -177,11 +216,15 @@ extern ICUDriver ICUD5;
#ifdef __cplusplus
extern "C" {
#endif
+
void icu_lld_init(void);
void icu_lld_start(ICUDriver *icup);
void icu_lld_stop(ICUDriver *icup);
- void icu_lld_enable(ICUDriver *icup);
- void icu_lld_disable(ICUDriver *icup);
+ void icu_lld_start_capture(ICUDriver *icup);
+ void icu_lld_stop_capture(ICUDriver *icup);
+ bool icu_lld_wait_capture(ICUDriver *icup); /* TODO: Implement. */
+ void icu_lld_enable_notifications(ICUDriver *icup); /* TODO: Implement. */
+ void icu_lld_disable_notifications(ICUDriver *icup); /* TODO: Implement. */
icucnt_t icu_lld_get_width(ICUDriver *icup);
icucnt_t icu_lld_get_period(ICUDriver *icup);
#ifdef __cplusplus