diff options
author | gdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4> | 2011-06-29 11:59:15 +0000 |
---|---|---|
committer | gdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4> | 2011-06-29 11:59:15 +0000 |
commit | 30dd0fdc1605baf4b81fce2b6fd9898de07f2ea1 (patch) | |
tree | 50a3be4a71e5dc4e0016065ac9d41755fe899f31 /os/hal/platforms/STM32/gpt_lld.h | |
parent | 00b07c78d15cfa2711eda49727503364f6ace4ab (diff) | |
download | ChibiOS-30dd0fdc1605baf4b81fce2b6fd9898de07f2ea1.tar.gz ChibiOS-30dd0fdc1605baf4b81fce2b6fd9898de07f2ea1.tar.bz2 ChibiOS-30dd0fdc1605baf4b81fce2b6fd9898de07f2ea1.zip |
TIM8 support for STM32.
git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@3098 35acf78f-673a-0410-8e92-d51de3d6d3f4
Diffstat (limited to 'os/hal/platforms/STM32/gpt_lld.h')
-rw-r--r-- | os/hal/platforms/STM32/gpt_lld.h | 26 |
1 files changed, 25 insertions, 1 deletions
diff --git a/os/hal/platforms/STM32/gpt_lld.h b/os/hal/platforms/STM32/gpt_lld.h index cf749077f..ef00c23a9 100644 --- a/os/hal/platforms/STM32/gpt_lld.h +++ b/os/hal/platforms/STM32/gpt_lld.h @@ -85,6 +85,15 @@ #endif
/**
+ * @brief GPTD8 driver enable switch.
+ * @details If set to @p TRUE the support for GPTD8 is included.
+ * @note The default is @p TRUE.
+ */
+#if !defined(STM32_GPT_USE_TIM8) || defined(__DOXYGEN__)
+#define STM32_GPT_USE_TIM8 TRUE
+#endif
+
+/**
* @brief GPTD1 interrupt priority level setting.
*/
#if !defined(STM32_GPT_TIM1_IRQ_PRIORITY) || defined(__DOXYGEN__)
@@ -119,6 +128,13 @@ #define STM32_GPT_TIM5_IRQ_PRIORITY 7
#endif
+/**
+ * @brief GPTD5 interrupt priority level setting.
+ */
+#if !defined(STM32_GPT_TIM8_IRQ_PRIORITY) || defined(__DOXYGEN__)
+#define STM32_GPT_TIM8_IRQ_PRIORITY 7
+#endif
+
/*===========================================================================*/
/* Derived constants and error checks. */
/*===========================================================================*/
@@ -143,9 +159,13 @@ #error "TIM5 not present in the selected device"
#endif
+#if STM32_GPT_USE_TIM8 && !STM32_HAS_TIM8
+#error "TIM8 not present in the selected device"
+#endif
+
#if !STM32_GPT_USE_TIM1 && !STM32_GPT_USE_TIM2 && \
!STM32_GPT_USE_TIM3 && !STM32_GPT_USE_TIM4 && \
- !STM32_GPT_USE_TIM5
+ !STM32_GPT_USE_TIM5 && !STM32_GPT_USE_TIM8
#error "GPT driver activated but no TIM peripheral assigned"
#endif
@@ -236,6 +256,10 @@ extern GPTDriver GPTD4; extern GPTDriver GPTD5;
#endif
+#if STM32_GPT_USE_TIM8 && !defined(__DOXYGEN__)
+extern GPTDriver GPTD8;
+#endif
+
#ifdef __cplusplus
extern "C" {
#endif
|