From 6ecd7c2bf023df721108ea64779895a1b9e6e0c8 Mon Sep 17 00:00:00 2001 From: Giovanni Di Sirio Date: Sun, 6 Jan 2019 08:56:22 +0000 Subject: RCC CRC macros for L4 and L4+. git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@12531 110e8d01-0319-4d1e-a829-52ad28d1bb01 --- os/hal/ports/STM32/STM32L4xx+/stm32_rcc.h | 28 ++++++++++++++++++++++++++++ os/hal/ports/STM32/STM32L4xx/stm32_rcc.h | 28 ++++++++++++++++++++++++++++ 2 files changed, 56 insertions(+) diff --git a/os/hal/ports/STM32/STM32L4xx+/stm32_rcc.h b/os/hal/ports/STM32/STM32L4xx+/stm32_rcc.h index 76f842ccc..d88c378f4 100644 --- a/os/hal/ports/STM32/STM32L4xx+/stm32_rcc.h +++ b/os/hal/ports/STM32/STM32L4xx+/stm32_rcc.h @@ -1235,6 +1235,34 @@ #define rccResetUSB() rccResetAPB1R1(RCC_APB1RSTR1_USBFSRST) /** @} */ +/** + * @name CRC peripheral specific RCC operations + * @{ + */ +/** + * @brief Enables the CRC peripheral clock. + * + * @param[in] lp low power enable flag + * + * @api + */ +#define rccEnableCRC(lp) rccEnableAHB1(RCC_AHB1ENR_CRCEN, lp) + +/** + * @brief Disables the CRC peripheral clock. + * + * @api + */ +#define rccDisableCRC() rccDisableAHB1(RCC_AHB1ENR_CRCEN) + +/** + * @brief Resets the CRC peripheral. + * + * @api + */ +#define rccResetCRC() rccResetAHB1(RCC_AHB1RSTR_CRCRST) +/** @} */ + /** * @name FSMC peripherals specific RCC operations * @{ diff --git a/os/hal/ports/STM32/STM32L4xx/stm32_rcc.h b/os/hal/ports/STM32/STM32L4xx/stm32_rcc.h index 91cc696f2..a48e305f8 100644 --- a/os/hal/ports/STM32/STM32L4xx/stm32_rcc.h +++ b/os/hal/ports/STM32/STM32L4xx/stm32_rcc.h @@ -1184,6 +1184,34 @@ #define rccResetUSB() rccResetAPB1R1(RCC_APB1RSTR1_USBFSRST) /** @} */ +/** + * @name CRC peripheral specific RCC operations + * @{ + */ +/** + * @brief Enables the CRC peripheral clock. + * + * @param[in] lp low power enable flag + * + * @api + */ +#define rccEnableCRC(lp) rccEnableAHB1(RCC_AHB1ENR_CRCEN, lp) + +/** + * @brief Disables the CRC peripheral clock. + * + * @api + */ +#define rccDisableCRC() rccDisableAHB1(RCC_AHB1ENR_CRCEN) + +/** + * @brief Resets the CRC peripheral. + * + * @api + */ +#define rccResetCRC() rccResetAHB1(RCC_AHB1RSTR_CRCRST) +/** @} */ + /** * @name FSMC peripherals specific RCC operations * @{ -- cgit v1.2.3