diff options
author | Giovanni Di Sirio <gdisirio@gmail.com> | 2015-06-18 09:43:47 +0000 |
---|---|---|
committer | Giovanni Di Sirio <gdisirio@gmail.com> | 2015-06-18 09:43:47 +0000 |
commit | 048acf5bdfa3bde321f12104e4bd24a50a95738f (patch) | |
tree | feb07373e7162da08cff66300ecbe5f4004b5355 /os/hal/ports/STM32/STM32F0xx/stm32_rcc.h | |
parent | ea36f8946c4db133ea7c9bc992a25906ad4a11b2 (diff) | |
download | ChibiOS-048acf5bdfa3bde321f12104e4bd24a50a95738f.tar.gz ChibiOS-048acf5bdfa3bde321f12104e4bd24a50a95738f.tar.bz2 ChibiOS-048acf5bdfa3bde321f12104e4bd24a50a95738f.zip |
Added CAN support for STM32F0xx.
git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@8046 35acf78f-673a-0410-8e92-d51de3d6d3f4
Diffstat (limited to 'os/hal/ports/STM32/STM32F0xx/stm32_rcc.h')
-rw-r--r-- | os/hal/ports/STM32/STM32F0xx/stm32_rcc.h | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/os/hal/ports/STM32/STM32F0xx/stm32_rcc.h b/os/hal/ports/STM32/STM32F0xx/stm32_rcc.h index 9d6be2b3d..f51687787 100644 --- a/os/hal/ports/STM32/STM32F0xx/stm32_rcc.h +++ b/os/hal/ports/STM32/STM32F0xx/stm32_rcc.h @@ -199,6 +199,38 @@ /** @} */
/**
+ * @name CAN peripherals specific RCC operations
+ * @{
+ */
+/**
+ * @brief Enables the CAN1 peripheral clock.
+ * @note The @p lp parameter is ignored in this family.
+ *
+ * @param[in] lp low power enable flag
+ *
+ * @api
+ */
+#define rccEnableCAN1(lp) rccEnableAPB1(RCC_APB1ENR_CANEN, lp)
+
+/**
+ * @brief Disables the CAN1 peripheral clock.
+ * @note The @p lp parameter is ignored in this family.
+ *
+ * @param[in] lp low power enable flag
+ *
+ * @api
+ */
+#define rccDisableCAN1(lp) rccDisableAPB1(RCC_APB1ENR_CANEN, lp)
+
+/**
+ * @brief Resets the CAN1 peripheral.
+ *
+ * @api
+ */
+#define rccResetCAN1() rccResetAPB1(RCC_APB1RSTR_CANRST)
+/** @} */
+
+/**
* @name DAC peripheral specific RCC operations
* @{
*/
|