aboutsummaryrefslogtreecommitdiffstats
path: root/os/hal/ports/STM32/STM32F1xx/stm32_rcc.h
diff options
context:
space:
mode:
Diffstat (limited to 'os/hal/ports/STM32/STM32F1xx/stm32_rcc.h')
-rw-r--r--os/hal/ports/STM32/STM32F1xx/stm32_rcc.h25
1 files changed, 25 insertions, 0 deletions
diff --git a/os/hal/ports/STM32/STM32F1xx/stm32_rcc.h b/os/hal/ports/STM32/STM32F1xx/stm32_rcc.h
index 8aea87e06..c381427a6 100644
--- a/os/hal/ports/STM32/STM32F1xx/stm32_rcc.h
+++ b/os/hal/ports/STM32/STM32F1xx/stm32_rcc.h
@@ -299,6 +299,31 @@
* @api
*/
#define rccResetCAN1() rccResetAPB1(RCC_APB1RSTR_CAN1RST)
+
+/**
+ * @brief Enables the CAN2 peripheral clock.
+ *
+ * @param[in] lp low power enable flag
+ *
+ * @api
+ */
+#define rccEnableCAN2(lp) rccEnableAPB1(RCC_APB1ENR_CAN2EN, lp)
+
+/**
+ * @brief Disables the CAN2 peripheral clock.
+ *
+ * @param[in] lp low power enable flag
+ *
+ * @api
+ */
+#define rccDisableCAN2(lp) rccDisableAPB1(RCC_APB1ENR_CAN2EN, lp)
+
+/**
+ * @brief Resets the CAN2 peripheral.
+ *
+ * @api
+ */
+#define rccResetCAN2() rccResetAPB1(RCC_APB1RSTR_CAN2RST)
/** @} */
/**