From f3ed688f1aefff96eae8f8545d985f4fd46742f7 Mon Sep 17 00:00:00 2001 From: Giovanni Di Sirio Date: Tue, 19 Oct 2021 14:20:13 +0000 Subject: [PATCH] Missing DMA2 macros git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@14920 27425a3e-05d8-49a3-a47f-9c15f0e5edd8 --- os/hal/ports/STM32/STM32G0xx/stm32_rcc.h | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/os/hal/ports/STM32/STM32G0xx/stm32_rcc.h b/os/hal/ports/STM32/STM32G0xx/stm32_rcc.h index 7aa72ac5a..afb91103b 100644 --- a/os/hal/ports/STM32/STM32G0xx/stm32_rcc.h +++ b/os/hal/ports/STM32/STM32G0xx/stm32_rcc.h @@ -305,6 +305,29 @@ * @api */ #define rccResetDMA1() rccResetAHB(RCC_AHBRSTR_DMA1RST) + +/** + * @brief Enables the DMA2 peripheral clock. + * + * @param[in] lp low power enable flag + * + * @api + */ +#define rccEnableDMA2(lp) rccEnableAHB(RCC_AHBENR_DMA2EN, lp) + +/** + * @brief Disables the DMA2 peripheral clock. + * + * @api + */ +#define rccDisableDMA2() rccDisableAHB(RCC_AHBENR_DMA2EN) + +/** + * @brief Resets the DMA2 peripheral. + * + * @api + */ +#define rccResetDMA2() rccResetAHB(RCC_AHBRSTR_DMA2RST) /** @} */ /**