diff options
author | barthess <barthess@35acf78f-673a-0410-8e92-d51de3d6d3f4> | 2011-11-27 19:55:59 +0000 |
---|---|---|
committer | barthess <barthess@35acf78f-673a-0410-8e92-d51de3d6d3f4> | 2011-11-27 19:55:59 +0000 |
commit | 47654dcc4c7b8b1cc6c1fc5ec160cd18a449c215 (patch) | |
tree | fb344c8f0a469e5eb68701f08e417d1037215081 /os/hal/platforms/STM32/icu_lld.h | |
parent | 076e7453bf812c59f38cda94dd0379b6f03af0d0 (diff) | |
parent | e5ce81050f699c61b43aa74384d011c861fb31f2 (diff) | |
download | ChibiOS-47654dcc4c7b8b1cc6c1fc5ec160cd18a449c215.tar.gz ChibiOS-47654dcc4c7b8b1cc6c1fc5ec160cd18a449c215.tar.bz2 ChibiOS-47654dcc4c7b8b1cc6c1fc5ec160cd18a449c215.zip |
I2C branch. Goals: DMA-based driver, stm32f4x port.
git-svn-id: svn://svn.code.sf.net/p/chibios/svn/branches/i2c_dev@3541 35acf78f-673a-0410-8e92-d51de3d6d3f4
Diffstat (limited to 'os/hal/platforms/STM32/icu_lld.h')
-rw-r--r-- | os/hal/platforms/STM32/icu_lld.h | 15 |
1 files changed, 12 insertions, 3 deletions
diff --git a/os/hal/platforms/STM32/icu_lld.h b/os/hal/platforms/STM32/icu_lld.h index e7321e794..f5b6bf695 100644 --- a/os/hal/platforms/STM32/icu_lld.h +++ b/os/hal/platforms/STM32/icu_lld.h @@ -40,6 +40,10 @@ /*===========================================================================*/
/**
+ * @name Configuration options
+ * @{
+ */
+/**
* @brief ICUD1 driver enable switch.
* @details If set to @p TRUE the support for ICUD1 is included.
* @note The default is @p TRUE.
@@ -134,6 +138,7 @@ #if !defined(STM32_ICU_TIM8_IRQ_PRIORITY) || defined(__DOXYGEN__)
#define STM32_ICU_TIM8_IRQ_PRIORITY 7
#endif
+/** @} */
/*===========================================================================*/
/* Derived constants and error checks. */
@@ -234,9 +239,13 @@ struct ICUDriver { #endif
/* End of the mandatory fields.*/
/**
+ * @brief Timer base clock.
+ */
+ uint32_t clock;
+ /**
* @brief Pointer to the TIMx registers block.
*/
- TIM_TypeDef *tim;
+ stm32_tim_t *tim;
};
/*===========================================================================*/
@@ -253,7 +262,7 @@ struct ICUDriver { *
* @notapi
*/
-#define icu_lld_get_width(icup) ((icup)->tim->CCR2 + 1)
+#define icu_lld_get_width(icup) ((icup)->tim->CCR[1] + 1)
/**
* @brief Returns the width of the latest cycle.
@@ -265,7 +274,7 @@ struct ICUDriver { *
* @notapi
*/
-#define icu_lld_get_period(icup) ((icup)->tim->CCR1 + 1)
+#define icu_lld_get_period(icup) ((icup)->tim->CCR[0] + 1)
/*===========================================================================*/
/* External declarations. */
|