diff options
author | gdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4> | 2010-08-08 07:57:28 +0000 |
---|---|---|
committer | gdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4> | 2010-08-08 07:57:28 +0000 |
commit | a2cfd2054ad5da4dbf8b583a7eaf164d9dac6006 (patch) | |
tree | fcc2f570a92b65a714b7ca3b38ab700918aeb816 /os/hal/platforms/STM32/can_lld.h | |
parent | bb27a7d32a5b35a41f6e736540a689fd30d0854c (diff) | |
download | ChibiOS-a2cfd2054ad5da4dbf8b583a7eaf164d9dac6006.tar.gz ChibiOS-a2cfd2054ad5da4dbf8b583a7eaf164d9dac6006.tar.bz2 ChibiOS-a2cfd2054ad5da4dbf8b583a7eaf164d9dac6006.zip |
Fixed bug 3041414. Various improvements to the STM32 HAL.
git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@2119 35acf78f-673a-0410-8e92-d51de3d6d3f4
Diffstat (limited to 'os/hal/platforms/STM32/can_lld.h')
-rw-r--r-- | os/hal/platforms/STM32/can_lld.h | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/os/hal/platforms/STM32/can_lld.h b/os/hal/platforms/STM32/can_lld.h index fd4784fc7..3a314e424 100644 --- a/os/hal/platforms/STM32/can_lld.h +++ b/os/hal/platforms/STM32/can_lld.h @@ -78,15 +78,15 @@ * @details If set to @p TRUE the support for ADC1 is included.
* @note The default is @p TRUE.
*/
-#if !defined(USE_STM32_CAN1) || defined(__DOXYGEN__)
-#define USE_STM32_CAN1 TRUE
+#if !defined(STM32_CAN_USE_CAN1) || defined(__DOXYGEN__)
+#define STM32_CAN_USE_CAN1 TRUE
#endif
/**
* @brief CAN1 interrupt priority level setting.
*/
-#if !defined(STM32_CAN1_IRQ_PRIORITY) || defined(__DOXYGEN__)
-#define STM32_CAN1_IRQ_PRIORITY 11
+#if !defined(STM32_CAN_CAN1_IRQ_PRIORITY) || defined(__DOXYGEN__)
+#define STM32_CAN_CAN1_IRQ_PRIORITY 11
#endif
/*===========================================================================*/
@@ -97,6 +97,10 @@ #error "CAN sleep mode not supported in this architecture"
#endif
+#if !STM32_CAN_USE_CAN1
+#error "CAN driver activated but no CAN peripheral assigned"
+#endif
+
/*===========================================================================*/
/* Driver data structures and types. */
/*===========================================================================*/
@@ -292,7 +296,7 @@ typedef struct { /* External declarations. */
/*===========================================================================*/
-#if USE_STM32_CAN1 && !defined(__DOXYGEN__)
+#if STM32_CAN_USE_CAN1 && !defined(__DOXYGEN__)
extern CANDriver CAND1;
#endif
|