From 41641dc844bcfb3b6bec122b0bce552be1c26b46 Mon Sep 17 00:00:00 2001 From: Theodore Ateba Date: Fri, 13 Oct 2017 19:32:49 +0000 Subject: AVR: Update the ICU header file. git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@10820 35acf78f-673a-0410-8e92-d51de3d6d3f4 --- os/hal/ports/AVR/MEGA/LLD/TIMv1/hal_icu_lld.h | 47 +++++++++++++++++++++++++-- 1 file changed, 45 insertions(+), 2 deletions(-) (limited to 'os/hal') 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 -- cgit v1.2.3