| 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168 |
- /**
- ******************************************************************************
- * @file stm32l0xx_ll_bus.h
- * @author MCD Application Team
- * @brief Header file of BUS LL module.
- @verbatim
- ##### RCC Limitations #####
- ==============================================================================
- [..]
- A delay between an RCC peripheral clock enable and the effective peripheral
- enabling should be taken into account in order to manage the peripheral read/write
- from/to registers.
- (+) This delay depends on the peripheral mapping.
- (++) AHB & APB peripherals, 1 dummy read is necessary
- [..]
- Workarounds:
- (#) For AHB & APB peripherals, a dummy read to the peripheral register has been
- inserted in each LL_{BUS}_GRP{x}_EnableClock() function.
- @endverbatim
- ******************************************************************************
- * @attention
- *
- * Copyright (c) 2016 STMicroelectronics.
- * All rights reserved.
- *
- * This software is licensed under terms that can be found in the LICENSE file in
- * the root directory of this software component.
- * If no LICENSE file comes with this software, it is provided AS-IS.
- ******************************************************************************
- */
- /* Define to prevent recursive inclusion -------------------------------------*/
- #ifndef __STM32L0xx_LL_BUS_H
- #define __STM32L0xx_LL_BUS_H
- #ifdef __cplusplus
- extern "C" {
- #endif
- /* Includes ------------------------------------------------------------------*/
- #include "stm32l0xx.h"
- /** @addtogroup STM32L0xx_LL_Driver
- * @{
- */
- #if defined(RCC)
- /** @defgroup BUS_LL BUS
- * @{
- */
- /* Private types -------------------------------------------------------------*/
- /* Private variables ---------------------------------------------------------*/
- /* Private constants ---------------------------------------------------------*/
- /* Private macros ------------------------------------------------------------*/
- /* Exported types ------------------------------------------------------------*/
- /* Exported constants --------------------------------------------------------*/
- /** @defgroup BUS_LL_Exported_Constants BUS Exported Constants
- * @{
- */
- /** @defgroup BUS_LL_EC_AHB1_GRP1_PERIPH AHB1 GRP1 PERIPH
- * @{
- */
- #define LL_AHB1_GRP1_PERIPH_ALL 0xFFFFFFFFU
- #define LL_AHB1_GRP1_PERIPH_DMA1 RCC_AHBENR_DMA1EN /*!< DMA1 clock enable */
- #define LL_AHB1_GRP1_PERIPH_MIF RCC_AHBENR_MIFEN /*!< MIF clock enable */
- #define LL_AHB1_GRP1_PERIPH_SRAM RCC_AHBSMENR_SRAMSMEN /*!< Sleep Mode SRAM clock enable */
- #define LL_AHB1_GRP1_PERIPH_CRC RCC_AHBENR_CRCEN /*!< CRC clock enable */
- #if defined(TSC)
- #define LL_AHB1_GRP1_PERIPH_TSC RCC_AHBENR_TSCEN /*!< TSC clock enable */
- #endif /*TSC*/
- #if defined(RNG)
- #define LL_AHB1_GRP1_PERIPH_RNG RCC_AHBENR_RNGEN /*!< RNG clock enable */
- #endif /*RNG*/
- #if defined(AES)
- #define LL_AHB1_GRP1_PERIPH_CRYP RCC_AHBENR_CRYPEN /*!< CRYP clock enable */
- #endif /*AES*/
- /**
- * @}
- */
- /** @defgroup BUS_LL_EC_APB1_GRP1_PERIPH APB1 GRP1 PERIPH
- * @{
- */
- #define LL_APB1_GRP1_PERIPH_ALL 0xFFFFFFFFU
- #define LL_APB1_GRP1_PERIPH_TIM2 RCC_APB1ENR_TIM2EN /*!< TIM2 clock enable */
- #if defined(TIM3)
- #define LL_APB1_GRP1_PERIPH_TIM3 RCC_APB1ENR_TIM3EN /*!< TIM3 clock enable */
- #endif
- #if defined(TIM6)
- #define LL_APB1_GRP1_PERIPH_TIM6 RCC_APB1ENR_TIM6EN /*!< TIM6 clock enable */
- #endif
- #if defined(TIM7)
- #define LL_APB1_GRP1_PERIPH_TIM7 RCC_APB1ENR_TIM7EN /*!< TIM7 clock enable */
- #endif
- #if defined(LCD)
- #define LL_APB1_GRP1_PERIPH_LCD RCC_APB1ENR_LCDEN /*!< LCD clock enable */
- #endif /*LCD*/
- #define LL_APB1_GRP1_PERIPH_WWDG RCC_APB1ENR_WWDGEN /*!< WWDG clock enable */
- #if defined(SPI2)
- #define LL_APB1_GRP1_PERIPH_SPI2 RCC_APB1ENR_SPI2EN /*!< SPI2 clock enable */
- #endif
- #define LL_APB1_GRP1_PERIPH_USART2 RCC_APB1ENR_USART2EN /*!< USART2 clock enable */
- #define LL_APB1_GRP1_PERIPH_LPUART1 RCC_APB1ENR_LPUART1EN /*!< LPUART1 clock enable */
- #if defined(USART4)
- #define LL_APB1_GRP1_PERIPH_USART4 RCC_APB1ENR_USART4EN /*!< USART4 clock enable */
- #endif
- #if defined(USART5)
- #define LL_APB1_GRP1_PERIPH_USART5 RCC_APB1ENR_USART5EN /*!< USART5 clock enable */
- #endif
- #define LL_APB1_GRP1_PERIPH_I2C1 RCC_APB1ENR_I2C1EN /*!< I2C1 clock enable */
- #if defined(I2C2)
- #define LL_APB1_GRP1_PERIPH_I2C2 RCC_APB1ENR_I2C2EN /*!< I2C2 clock enable */
- #endif
- #if defined(USB)
- #define LL_APB1_GRP1_PERIPH_USB RCC_APB1ENR_USBEN /*!< USB clock enable */
- #endif /*USB*/
- #if defined(CRS)
- #define LL_APB1_GRP1_PERIPH_CRS RCC_APB1ENR_CRSEN /*!< CRS clock enable */
- #endif /*CRS*/
- #define LL_APB1_GRP1_PERIPH_PWR RCC_APB1ENR_PWREN /*!< PWR clock enable */
- #if defined(DAC)
- #define LL_APB1_GRP1_PERIPH_DAC1 RCC_APB1ENR_DACEN /*!< DAC clock enable */
- #endif
- #if defined(I2C3)
- #define LL_APB1_GRP1_PERIPH_I2C3 RCC_APB1ENR_I2C3EN /*!< I2C3 clock enable */
- #endif
- #define LL_APB1_GRP1_PERIPH_LPTIM1 RCC_APB1ENR_LPTIM1EN /*!< LPTIM1 clock enable */
- /**
- * @}
- */
- /** @defgroup BUS_LL_EC_APB2_GRP1_PERIPH APB2 GRP1 PERIPH
- * @{
- */
- #define LL_APB2_GRP1_PERIPH_ALL 0xFFFFFFFFU
- #define LL_APB2_GRP1_PERIPH_SYSCFG RCC_APB2ENR_SYSCFGEN /*!< SYSCFG clock enable */
- #define LL_APB2_GRP1_PERIPH_TIM21 RCC_APB2ENR_TIM21EN /*!< TIM21 clock enable */
- #if defined(TIM22)
- #define LL_APB2_GRP1_PERIPH_TIM22 RCC_APB2ENR_TIM22EN /*!< TIM22 clock enable */
- #endif
- #define LL_APB2_GRP1_PERIPH_FW RCC_APB2ENR_FWEN /*!< FireWall clock enable */
- #define LL_APB2_GRP1_PERIPH_ADC1 RCC_APB2ENR_ADC1EN /*!< ADC1 clock enable */
- #define LL_APB2_GRP1_PERIPH_SPI1 RCC_APB2ENR_SPI1EN /*!< SPI1 clock enable */
- #if defined(USART1)
- #define LL_APB2_GRP1_PERIPH_USART1 RCC_APB2ENR_USART1EN /*!< USART1 clock enable */
- #endif
- #define LL_APB2_GRP1_PERIPH_DBGMCU RCC_APB2ENR_DBGMCUEN /*!< DBGMCU clock enable */
- /**
- * @}
- */
- /** @defgroup BUS_LL_EC_IOP_GRP1_PERIPH IOP GRP1 PERIPH
- * @{
- */
- #define LL_IOP_GRP1_PERIPH_ALL 0xFFFFFFFFU
- #define LL_IOP_GRP1_PERIPH_GPIOA RCC_IOPENR_GPIOAEN /*!< GPIO port A control */
- #define LL_IOP_GRP1_PERIPH_GPIOB RCC_IOPENR_GPIOBEN /*!< GPIO port B control */
- #define LL_IOP_GRP1_PERIPH_GPIOC RCC_IOPENR_GPIOCEN /*!< GPIO port C control */
- #if defined(GPIOD)
- #define LL_IOP_GRP1_PERIPH_GPIOD RCC_IOPENR_GPIODEN /*!< GPIO port D control */
- #endif /*GPIOD*/
- #if defined(GPIOE)
- #define LL_IOP_GRP1_PERIPH_GPIOE RCC_IOPENR_GPIOEEN /*!< GPIO port H control */
- #endif /*GPIOE*/
- #if defined(GPIOH)
- #define LL_IOP_GRP1_PERIPH_GPIOH RCC_IOPENR_GPIOHEN /*!< GPIO port H control */
- #endif /*GPIOH*/
- /**
- * @}
- */
- /**
- * @}
- */
- /* Exported macro ------------------------------------------------------------*/
- /* Exported functions --------------------------------------------------------*/
- /** @defgroup BUS_LL_Exported_Functions BUS Exported Functions
- * @{
- */
- /** @defgroup BUS_LL_EF_AHB1 AHB1
- * @{
- */
- /**
- * @brief Enable AHB1 peripherals clock.
- * @rmtoll AHBENR DMAEN LL_AHB1_GRP1_EnableClock\n
- * AHBENR MIFEN LL_AHB1_GRP1_EnableClock\n
- * AHBENR CRCEN LL_AHB1_GRP1_EnableClock\n
- * AHBENR TSCEN LL_AHB1_GRP1_EnableClock\n
- * AHBENR RNGEN LL_AHB1_GRP1_EnableClock\n
- * AHBENR CRYPEN LL_AHB1_GRP1_EnableClock
- * @param Periphs This parameter can be a combination of the following values:
- * @arg @ref LL_AHB1_GRP1_PERIPH_DMA1
- * @arg @ref LL_AHB1_GRP1_PERIPH_MIF
- * @arg @ref LL_AHB1_GRP1_PERIPH_CRC
- * @arg @ref LL_AHB1_GRP1_PERIPH_TSC (*)
- * @arg @ref LL_AHB1_GRP1_PERIPH_RNG (*)
- * @arg @ref LL_AHB1_GRP1_PERIPH_CRYP (*)
- *
- * (*) value not defined in all devices.
- * @retval None
- */
- __STATIC_INLINE void LL_AHB1_GRP1_EnableClock(uint32_t Periphs)
- {
- __IO uint32_t tmpreg;
- SET_BIT(RCC->AHBENR, Periphs);
- /* Delay after an RCC peripheral clock enabling */
- tmpreg = READ_BIT(RCC->AHBENR, Periphs);
- (void)tmpreg;
- }
- /**
- * @brief Check if AHB1 peripheral clock is enabled or not
- * @rmtoll AHBENR DMAEN LL_AHB1_GRP1_IsEnabledClock\n
- * AHBENR MIFEN LL_AHB1_GRP1_IsEnabledClock\n
- * AHBENR CRCEN LL_AHB1_GRP1_IsEnabledClock\n
- * AHBENR TSCEN LL_AHB1_GRP1_IsEnabledClock\n
- * AHBENR RNGEN LL_AHB1_GRP1_IsEnabledClock\n
- * AHBENR CRYPEN LL_AHB1_GRP1_IsEnabledClock
- * @param Periphs This parameter can be a combination of the following values:
- * @arg @ref LL_AHB1_GRP1_PERIPH_DMA1
- * @arg @ref LL_AHB1_GRP1_PERIPH_MIF
- * @arg @ref LL_AHB1_GRP1_PERIPH_CRC
- * @arg @ref LL_AHB1_GRP1_PERIPH_TSC (*)
- * @arg @ref LL_AHB1_GRP1_PERIPH_RNG (*)
- * @arg @ref LL_AHB1_GRP1_PERIPH_CRYP (*)
- *
- * (*) value not defined in all devices.
- * @retval State of Periphs (1 or 0).
- */
- __STATIC_INLINE uint32_t LL_AHB1_GRP1_IsEnabledClock(uint32_t Periphs)
- {
- return ((READ_BIT(RCC->AHBENR, Periphs) == (Periphs)) ? 1UL : 0UL);
- }
- /**
- * @brief Disable AHB1 peripherals clock.
- * @rmtoll AHBENR DMAEN LL_AHB1_GRP1_DisableClock\n
- * AHBENR MIFEN LL_AHB1_GRP1_DisableClock\n
- * AHBENR CRCEN LL_AHB1_GRP1_DisableClock\n
- * AHBENR TSCEN LL_AHB1_GRP1_DisableClock\n
- * AHBENR RNGEN LL_AHB1_GRP1_DisableClock\n
- * AHBENR CRYPEN LL_AHB1_GRP1_DisableClock
- * @param Periphs This parameter can be a combination of the following values:
- * @arg @ref LL_AHB1_GRP1_PERIPH_DMA1
- * @arg @ref LL_AHB1_GRP1_PERIPH_MIF
- * @arg @ref LL_AHB1_GRP1_PERIPH_CRC
- * @arg @ref LL_AHB1_GRP1_PERIPH_TSC (*)
- * @arg @ref LL_AHB1_GRP1_PERIPH_RNG (*)
- * @arg @ref LL_AHB1_GRP1_PERIPH_CRYP (*)
- *
- * (*) value not defined in all devices.
- * @retval None
- */
- __STATIC_INLINE void LL_AHB1_GRP1_DisableClock(uint32_t Periphs)
- {
- CLEAR_BIT(RCC->AHBENR, Periphs);
- }
- /**
- * @brief Force AHB1 peripherals reset.
- * @rmtoll AHBRSTR DMARST LL_AHB1_GRP1_ForceReset\n
- * AHBRSTR MIFRST LL_AHB1_GRP1_ForceReset\n
- * AHBRSTR CRCRST LL_AHB1_GRP1_ForceReset\n
- * AHBRSTR TSCRST LL_AHB1_GRP1_ForceReset\n
- * AHBRSTR RNGRST LL_AHB1_GRP1_ForceReset\n
- * AHBRSTR CRYPRST LL_AHB1_GRP1_ForceReset
- * @param Periphs This parameter can be a combination of the following values:
- * @arg @ref LL_AHB1_GRP1_PERIPH_ALL
- * @arg @ref LL_AHB1_GRP1_PERIPH_DMA1
- * @arg @ref LL_AHB1_GRP1_PERIPH_MIF
- * @arg @ref LL_AHB1_GRP1_PERIPH_CRC
- * @arg @ref LL_AHB1_GRP1_PERIPH_TSC (*)
- * @arg @ref LL_AHB1_GRP1_PERIPH_RNG (*)
- * @arg @ref LL_AHB1_GRP1_PERIPH_CRYP (*)
- *
- * (*) value not defined in all devices.
- * @retval None
- */
- __STATIC_INLINE void LL_AHB1_GRP1_ForceReset(uint32_t Periphs)
- {
- SET_BIT(RCC->AHBRSTR, Periphs);
- }
- /**
- * @brief Release AHB1 peripherals reset.
- * @rmtoll AHBRSTR DMARST LL_AHB1_GRP1_ReleaseReset\n
- * AHBRSTR MIFRST LL_AHB1_GRP1_ReleaseReset\n
- * AHBRSTR CRCRST LL_AHB1_GRP1_ReleaseReset\n
- * AHBRSTR TSCRST LL_AHB1_GRP1_ReleaseReset\n
- * AHBRSTR RNGRST LL_AHB1_GRP1_ReleaseReset\n
- * AHBRSTR CRYPRST LL_AHB1_GRP1_ReleaseReset
- * @param Periphs This parameter can be a combination of the following values:
- * @arg @ref LL_AHB1_GRP1_PERIPH_ALL
- * @arg @ref LL_AHB1_GRP1_PERIPH_DMA1
- * @arg @ref LL_AHB1_GRP1_PERIPH_MIF
- * @arg @ref LL_AHB1_GRP1_PERIPH_CRC
- * @arg @ref LL_AHB1_GRP1_PERIPH_TSC (*)
- * @arg @ref LL_AHB1_GRP1_PERIPH_RNG (*)
- * @arg @ref LL_AHB1_GRP1_PERIPH_CRYP (*)
- *
- * (*) value not defined in all devices.
- * @retval None
- */
- __STATIC_INLINE void LL_AHB1_GRP1_ReleaseReset(uint32_t Periphs)
- {
- CLEAR_BIT(RCC->AHBRSTR, Periphs);
- }
- /**
- * @brief Enable AHB1 peripherals clock during Low Power (Sleep) mode.
- * @rmtoll AHBSMENR DMASMEN LL_AHB1_GRP1_EnableClockSleep\n
- * AHBSMENR MIFSMEN LL_AHB1_GRP1_EnableClockSleep\n
- * AHBSMENR SRAMSMEN LL_AHB1_GRP1_EnableClockSleep\n
- * AHBSMENR CRCSMEN LL_AHB1_GRP1_EnableClockSleep\n
- * AHBSMENR TSCSMEN LL_AHB1_GRP1_EnableClockSleep\n
- * AHBSMENR RNGSMEN LL_AHB1_GRP1_EnableClockSleep\n
- * AHBSMENR CRYPSMEN LL_AHB1_GRP1_EnableClockSleep
- * @param Periphs This parameter can be a combination of the following values:
- * @arg @ref LL_AHB1_GRP1_PERIPH_DMA1
- * @arg @ref LL_AHB1_GRP1_PERIPH_MIF
- * @arg @ref LL_AHB1_GRP1_PERIPH_SRAM
- * @arg @ref LL_AHB1_GRP1_PERIPH_CRC
- * @arg @ref LL_AHB1_GRP1_PERIPH_TSC (*)
- * @arg @ref LL_AHB1_GRP1_PERIPH_RNG (*)
- * @arg @ref LL_AHB1_GRP1_PERIPH_CRYP (*)
- *
- * (*) value not defined in all devices.
- * @retval None
- */
- __STATIC_INLINE void LL_AHB1_GRP1_EnableClockSleep(uint32_t Periphs)
- {
- __IO uint32_t tmpreg;
- SET_BIT(RCC->AHBSMENR, Periphs);
- /* Delay after an RCC peripheral clock enabling */
- tmpreg = READ_BIT(RCC->AHBSMENR, Periphs);
- (void)tmpreg;
- }
- /**
- * @brief Disable AHB1 peripherals clock during Low Power (Sleep) mode.
- * @rmtoll AHBSMENR DMASMEN LL_AHB1_GRP1_DisableClockSleep\n
- * AHBSMENR MIFSMEN LL_AHB1_GRP1_DisableClockSleep\n
- * AHBSMENR SRAMSMEN LL_AHB1_GRP1_DisableClockSleep\n
- * AHBSMENR CRCSMEN LL_AHB1_GRP1_DisableClockSleep\n
- * AHBSMENR TSCSMEN LL_AHB1_GRP1_DisableClockSleep\n
- * AHBSMENR RNGSMEN LL_AHB1_GRP1_DisableClockSleep\n
- * AHBSMENR CRYPSMEN LL_AHB1_GRP1_DisableClockSleep
- * @param Periphs This parameter can be a combination of the following values:
- * @arg @ref LL_AHB1_GRP1_PERIPH_DMA1
- * @arg @ref LL_AHB1_GRP1_PERIPH_MIF
- * @arg @ref LL_AHB1_GRP1_PERIPH_SRAM
- * @arg @ref LL_AHB1_GRP1_PERIPH_CRC
- * @arg @ref LL_AHB1_GRP1_PERIPH_TSC (*)
- * @arg @ref LL_AHB1_GRP1_PERIPH_RNG (*)
- * @arg @ref LL_AHB1_GRP1_PERIPH_CRYP (*)
- *
- * (*) value not defined in all devices.
- * @retval None
- */
- __STATIC_INLINE void LL_AHB1_GRP1_DisableClockSleep(uint32_t Periphs)
- {
- CLEAR_BIT(RCC->AHBSMENR, Periphs);
- }
- /**
- * @}
- */
- /** @defgroup BUS_LL_EF_APB1 APB1
- * @{
- */
- /**
- * @brief Enable APB1 peripherals clock.
- * @rmtoll APB1ENR TIM2EN LL_APB1_GRP1_EnableClock\n
- * APB1ENR TIM3EN LL_APB1_GRP1_EnableClock\n
- * APB1ENR TIM6EN LL_APB1_GRP1_EnableClock\n
- * APB1ENR TIM7EN LL_APB1_GRP1_EnableClock\n
- * APB1ENR LCDEN LL_APB1_GRP1_EnableClock\n
- * APB1ENR WWDGEN LL_APB1_GRP1_EnableClock\n
- * APB1ENR SPI2EN LL_APB1_GRP1_EnableClock\n
- * APB1ENR USART2EN LL_APB1_GRP1_EnableClock\n
- * APB1ENR LPUART1EN LL_APB1_GRP1_EnableClock\n
- * APB1ENR USART4EN LL_APB1_GRP1_EnableClock\n
- * APB1ENR USART5EN LL_APB1_GRP1_EnableClock\n
- * APB1ENR I2C1EN LL_APB1_GRP1_EnableClock\n
- * APB1ENR I2C2EN LL_APB1_GRP1_EnableClock\n
- * APB1ENR USBEN LL_APB1_GRP1_EnableClock\n
- * APB1ENR CRSEN LL_APB1_GRP1_EnableClock\n
- * APB1ENR PWREN LL_APB1_GRP1_EnableClock\n
- * APB1ENR DACEN LL_APB1_GRP1_EnableClock\n
- * APB1ENR I2C3EN LL_APB1_GRP1_EnableClock\n
- * APB1ENR LPTIM1EN LL_APB1_GRP1_EnableClock
- * @param Periphs This parameter can be a combination of the following values:
- * @arg @ref LL_APB1_GRP1_PERIPH_TIM2
- * @arg @ref LL_APB1_GRP1_PERIPH_TIM3 (*)
- * @arg @ref LL_APB1_GRP1_PERIPH_TIM6 (*)
- * @arg @ref LL_APB1_GRP1_PERIPH_TIM7 (*)
- * @arg @ref LL_APB1_GRP1_PERIPH_LCD (*)
- * @arg @ref LL_APB1_GRP1_PERIPH_WWDG
- * @arg @ref LL_APB1_GRP1_PERIPH_SPI2 (*)
- * @arg @ref LL_APB1_GRP1_PERIPH_USART2
- * @arg @ref LL_APB1_GRP1_PERIPH_LPUART1
- * @arg @ref LL_APB1_GRP1_PERIPH_USART4 (*)
- * @arg @ref LL_APB1_GRP1_PERIPH_USART5 (*)
- * @arg @ref LL_APB1_GRP1_PERIPH_I2C1
- * @arg @ref LL_APB1_GRP1_PERIPH_I2C2 (*)
- * @arg @ref LL_APB1_GRP1_PERIPH_USB (*)
- * @arg @ref LL_APB1_GRP1_PERIPH_CRS (*)
- * @arg @ref LL_APB1_GRP1_PERIPH_PWR
- * @arg @ref LL_APB1_GRP1_PERIPH_DAC1 (*)
- * @arg @ref LL_APB1_GRP1_PERIPH_I2C3 (*)
- * @arg @ref LL_APB1_GRP1_PERIPH_LPTIM1
- *
- * (*) value not defined in all devices.
- * @retval None
- */
- __STATIC_INLINE void LL_APB1_GRP1_EnableClock(uint32_t Periphs)
- {
- __IO uint32_t tmpreg;
- SET_BIT(RCC->APB1ENR, Periphs);
- /* Delay after an RCC peripheral clock enabling */
- tmpreg = READ_BIT(RCC->APB1ENR, Periphs);
- (void)tmpreg;
- }
- /**
- * @brief Check if APB1 peripheral clock is enabled or not
- * @rmtoll APB1ENR TIM2EN LL_APB1_GRP1_IsEnabledClock\n
- * APB1ENR TIM3EN LL_APB1_GRP1_IsEnabledClock\n
- * APB1ENR TIM6EN LL_APB1_GRP1_IsEnabledClock\n
- * APB1ENR TIM7EN LL_APB1_GRP1_IsEnabledClock\n
- * APB1ENR LCDEN LL_APB1_GRP1_IsEnabledClock\n
- * APB1ENR WWDGEN LL_APB1_GRP1_IsEnabledClock\n
- * APB1ENR SPI2EN LL_APB1_GRP1_IsEnabledClock\n
- * APB1ENR USART2EN LL_APB1_GRP1_IsEnabledClock\n
- * APB1ENR LPUART1EN LL_APB1_GRP1_IsEnabledClock\n
- * APB1ENR USART4EN LL_APB1_GRP1_IsEnabledClock\n
- * APB1ENR USART5EN LL_APB1_GRP1_IsEnabledClock\n
- * APB1ENR I2C1EN LL_APB1_GRP1_IsEnabledClock\n
- * APB1ENR I2C2EN LL_APB1_GRP1_IsEnabledClock\n
- * APB1ENR USBEN LL_APB1_GRP1_IsEnabledClock\n
- * APB1ENR CRSEN LL_APB1_GRP1_IsEnabledClock\n
- * APB1ENR PWREN LL_APB1_GRP1_IsEnabledClock\n
- * APB1ENR DACEN LL_APB1_GRP1_IsEnabledClock\n
- * APB1ENR I2C3EN LL_APB1_GRP1_IsEnabledClock\n
- * APB1ENR LPTIM1EN LL_APB1_GRP1_IsEnabledClock
- * @param Periphs This parameter can be a combination of the following values:
- * @arg @ref LL_APB1_GRP1_PERIPH_TIM2
- * @arg @ref LL_APB1_GRP1_PERIPH_TIM3 (*)
- * @arg @ref LL_APB1_GRP1_PERIPH_TIM6 (*)
- * @arg @ref LL_APB1_GRP1_PERIPH_TIM7 (*)
- * @arg @ref LL_APB1_GRP1_PERIPH_LCD (*)
- * @arg @ref LL_APB1_GRP1_PERIPH_WWDG
- * @arg @ref LL_APB1_GRP1_PERIPH_SPI2 (*)
- * @arg @ref LL_APB1_GRP1_PERIPH_USART2
- * @arg @ref LL_APB1_GRP1_PERIPH_LPUART1
- * @arg @ref LL_APB1_GRP1_PERIPH_USART4 (*)
- * @arg @ref LL_APB1_GRP1_PERIPH_USART5 (*)
- * @arg @ref LL_APB1_GRP1_PERIPH_I2C1
- * @arg @ref LL_APB1_GRP1_PERIPH_I2C2 (*)
- * @arg @ref LL_APB1_GRP1_PERIPH_USB (*)
- * @arg @ref LL_APB1_GRP1_PERIPH_CRS (*)
- * @arg @ref LL_APB1_GRP1_PERIPH_PWR
- * @arg @ref LL_APB1_GRP1_PERIPH_DAC1 (*)
- * @arg @ref LL_APB1_GRP1_PERIPH_I2C3 (*)
- * @arg @ref LL_APB1_GRP1_PERIPH_LPTIM1
- *
- * (*) value not defined in all devices.
- * @retval State of Periphs (1 or 0).
- */
- __STATIC_INLINE uint32_t LL_APB1_GRP1_IsEnabledClock(uint32_t Periphs)
- {
- return ((READ_BIT(RCC->APB1ENR, Periphs) == (Periphs)) ? 1UL : 0UL);
- }
- /**
- * @brief Disable APB1 peripherals clock.
- * @rmtoll APB1ENR TIM2EN LL_APB1_GRP1_DisableClock\n
- * APB1ENR TIM3EN LL_APB1_GRP1_DisableClock\n
- * APB1ENR TIM6EN LL_APB1_GRP1_DisableClock\n
- * APB1ENR TIM7EN LL_APB1_GRP1_DisableClock\n
- * APB1ENR LCDEN LL_APB1_GRP1_DisableClock\n
- * APB1ENR WWDGEN LL_APB1_GRP1_DisableClock\n
- * APB1ENR SPI2EN LL_APB1_GRP1_DisableClock\n
- * APB1ENR USART2EN LL_APB1_GRP1_DisableClock\n
- * APB1ENR LPUART1EN LL_APB1_GRP1_DisableClock\n
- * APB1ENR USART4EN LL_APB1_GRP1_DisableClock\n
- * APB1ENR USART5EN LL_APB1_GRP1_DisableClock\n
- * APB1ENR I2C1EN LL_APB1_GRP1_DisableClock\n
- * APB1ENR I2C2EN LL_APB1_GRP1_DisableClock\n
- * APB1ENR USBEN LL_APB1_GRP1_DisableClock\n
- * APB1ENR CRSEN LL_APB1_GRP1_DisableClock\n
- * APB1ENR PWREN LL_APB1_GRP1_DisableClock\n
- * APB1ENR DACEN LL_APB1_GRP1_DisableClock\n
- * APB1ENR I2C3EN LL_APB1_GRP1_DisableClock\n
- * APB1ENR LPTIM1EN LL_APB1_GRP1_DisableClock
- * @param Periphs This parameter can be a combination of the following values:
- * @arg @ref LL_APB1_GRP1_PERIPH_TIM2
- * @arg @ref LL_APB1_GRP1_PERIPH_TIM3 (*)
- * @arg @ref LL_APB1_GRP1_PERIPH_TIM6 (*)
- * @arg @ref LL_APB1_GRP1_PERIPH_TIM7 (*)
- * @arg @ref LL_APB1_GRP1_PERIPH_LCD (*)
- * @arg @ref LL_APB1_GRP1_PERIPH_WWDG
- * @arg @ref LL_APB1_GRP1_PERIPH_SPI2 (*)
- * @arg @ref LL_APB1_GRP1_PERIPH_USART2
- * @arg @ref LL_APB1_GRP1_PERIPH_LPUART1
- * @arg @ref LL_APB1_GRP1_PERIPH_USART4 (*)
- * @arg @ref LL_APB1_GRP1_PERIPH_USART5 (*)
- * @arg @ref LL_APB1_GRP1_PERIPH_I2C1
- * @arg @ref LL_APB1_GRP1_PERIPH_I2C2 (*)
- * @arg @ref LL_APB1_GRP1_PERIPH_USB (*)
- * @arg @ref LL_APB1_GRP1_PERIPH_CRS (*)
- * @arg @ref LL_APB1_GRP1_PERIPH_PWR
- * @arg @ref LL_APB1_GRP1_PERIPH_DAC1 (*)
- * @arg @ref LL_APB1_GRP1_PERIPH_I2C3 (*)
- * @arg @ref LL_APB1_GRP1_PERIPH_LPTIM1
- *
- * (*) value not defined in all devices.
- * @retval None
- */
- __STATIC_INLINE void LL_APB1_GRP1_DisableClock(uint32_t Periphs)
- {
- CLEAR_BIT(RCC->APB1ENR, Periphs);
- }
- /**
- * @brief Force APB1 peripherals reset.
- * @rmtoll APB1RSTR TIM2RST LL_APB1_GRP1_ForceReset\n
- * APB1RSTR TIM3RST LL_APB1_GRP1_ForceReset\n
- * APB1RSTR TIM6RST LL_APB1_GRP1_ForceReset\n
- * APB1RSTR TIM7RST LL_APB1_GRP1_ForceReset\n
- * APB1RSTR LCDRST LL_APB1_GRP1_ForceReset\n
- * APB1RSTR WWDGRST LL_APB1_GRP1_ForceReset\n
- * APB1RSTR SPI2RST LL_APB1_GRP1_ForceReset\n
- * APB1RSTR USART2RST LL_APB1_GRP1_ForceReset\n
- * APB1RSTR LPUART1RST LL_APB1_GRP1_ForceReset\n
- * APB1RSTR USART4RST LL_APB1_GRP1_ForceReset\n
- * APB1RSTR USART5RST LL_APB1_GRP1_ForceReset\n
- * APB1RSTR I2C1RST LL_APB1_GRP1_ForceReset\n
- * APB1RSTR I2C2RST LL_APB1_GRP1_ForceReset\n
- * APB1RSTR USBRST LL_APB1_GRP1_ForceReset\n
- * APB1RSTR CRSRST LL_APB1_GRP1_ForceReset\n
- * APB1RSTR PWRRST LL_APB1_GRP1_ForceReset\n
- * APB1RSTR DACRST LL_APB1_GRP1_ForceReset\n
- * APB1RSTR I2C3RST LL_APB1_GRP1_ForceReset\n
- * APB1RSTR LPTIM1RST LL_APB1_GRP1_ForceReset
- * @param Periphs This parameter can be a combination of the following values:
- * @arg @ref LL_APB1_GRP1_PERIPH_ALL
- * @arg @ref LL_APB1_GRP1_PERIPH_TIM2
- * @arg @ref LL_APB1_GRP1_PERIPH_TIM3 (*)
- * @arg @ref LL_APB1_GRP1_PERIPH_TIM6 (*)
- * @arg @ref LL_APB1_GRP1_PERIPH_TIM7 (*)
- * @arg @ref LL_APB1_GRP1_PERIPH_LCD (*)
- * @arg @ref LL_APB1_GRP1_PERIPH_WWDG
- * @arg @ref LL_APB1_GRP1_PERIPH_SPI2 (*)
- * @arg @ref LL_APB1_GRP1_PERIPH_USART2
- * @arg @ref LL_APB1_GRP1_PERIPH_LPUART1
- * @arg @ref LL_APB1_GRP1_PERIPH_USART4 (*)
- * @arg @ref LL_APB1_GRP1_PERIPH_USART5 (*)
- * @arg @ref LL_APB1_GRP1_PERIPH_I2C1
- * @arg @ref LL_APB1_GRP1_PERIPH_I2C2 (*)
- * @arg @ref LL_APB1_GRP1_PERIPH_USB (*)
- * @arg @ref LL_APB1_GRP1_PERIPH_CRS (*)
- * @arg @ref LL_APB1_GRP1_PERIPH_PWR
- * @arg @ref LL_APB1_GRP1_PERIPH_DAC1 (*)
- * @arg @ref LL_APB1_GRP1_PERIPH_I2C3 (*)
- * @arg @ref LL_APB1_GRP1_PERIPH_LPTIM1
- *
- * (*) value not defined in all devices.
- * @retval None
- */
- __STATIC_INLINE void LL_APB1_GRP1_ForceReset(uint32_t Periphs)
- {
- SET_BIT(RCC->APB1RSTR, Periphs);
- }
- /**
- * @brief Release APB1 peripherals reset.
- * @rmtoll APB1RSTR TIM2RST LL_APB1_GRP1_ReleaseReset\n
- * APB1RSTR TIM3RST LL_APB1_GRP1_ReleaseReset\n
- * APB1RSTR TIM6RST LL_APB1_GRP1_ReleaseReset\n
- * APB1RSTR TIM7RST LL_APB1_GRP1_ReleaseReset\n
- * APB1RSTR LCDRST LL_APB1_GRP1_ReleaseReset\n
- * APB1RSTR WWDGRST LL_APB1_GRP1_ReleaseReset\n
- * APB1RSTR SPI2RST LL_APB1_GRP1_ReleaseReset\n
- * APB1RSTR USART2RST LL_APB1_GRP1_ReleaseReset\n
- * APB1RSTR LPUART1RST LL_APB1_GRP1_ReleaseReset\n
- * APB1RSTR USART4RST LL_APB1_GRP1_ReleaseReset\n
- * APB1RSTR USART5RST LL_APB1_GRP1_ReleaseReset\n
- * APB1RSTR I2C1RST LL_APB1_GRP1_ReleaseReset\n
- * APB1RSTR I2C2RST LL_APB1_GRP1_ReleaseReset\n
- * APB1RSTR USBRST LL_APB1_GRP1_ReleaseReset\n
- * APB1RSTR CRSRST LL_APB1_GRP1_ReleaseReset\n
- * APB1RSTR PWRRST LL_APB1_GRP1_ReleaseReset\n
- * APB1RSTR DACRST LL_APB1_GRP1_ReleaseReset\n
- * APB1RSTR I2C3RST LL_APB1_GRP1_ReleaseReset\n
- * APB1RSTR LPTIM1RST LL_APB1_GRP1_ReleaseReset
- * @param Periphs This parameter can be a combination of the following values:
- * @arg @ref LL_APB1_GRP1_PERIPH_ALL
- * @arg @ref LL_APB1_GRP1_PERIPH_TIM2
- * @arg @ref LL_APB1_GRP1_PERIPH_TIM3 (*)
- * @arg @ref LL_APB1_GRP1_PERIPH_TIM6 (*)
- * @arg @ref LL_APB1_GRP1_PERIPH_TIM7 (*)
- * @arg @ref LL_APB1_GRP1_PERIPH_LCD (*)
- * @arg @ref LL_APB1_GRP1_PERIPH_WWDG
- * @arg @ref LL_APB1_GRP1_PERIPH_SPI2 (*)
- * @arg @ref LL_APB1_GRP1_PERIPH_USART2
- * @arg @ref LL_APB1_GRP1_PERIPH_LPUART1
- * @arg @ref LL_APB1_GRP1_PERIPH_USART4 (*)
- * @arg @ref LL_APB1_GRP1_PERIPH_USART5 (*)
- * @arg @ref LL_APB1_GRP1_PERIPH_I2C1
- * @arg @ref LL_APB1_GRP1_PERIPH_I2C2 (*)
- * @arg @ref LL_APB1_GRP1_PERIPH_USB (*)
- * @arg @ref LL_APB1_GRP1_PERIPH_CRS (*)
- * @arg @ref LL_APB1_GRP1_PERIPH_PWR
- * @arg @ref LL_APB1_GRP1_PERIPH_DAC1 (*)
- * @arg @ref LL_APB1_GRP1_PERIPH_I2C3 (*)
- * @arg @ref LL_APB1_GRP1_PERIPH_LPTIM1
- *
- * (*) value not defined in all devices.
- * @retval None
- */
- __STATIC_INLINE void LL_APB1_GRP1_ReleaseReset(uint32_t Periphs)
- {
- CLEAR_BIT(RCC->APB1RSTR, Periphs);
- }
- /**
- * @brief Enable APB1 peripherals clock during Low Power (Sleep) mode.
- * @rmtoll APB1SMENR TIM2SMEN LL_APB1_GRP1_EnableClockSleep\n
- * APB1SMENR TIM3SMEN LL_APB1_GRP1_EnableClockSleep\n
- * APB1SMENR TIM6SMEN LL_APB1_GRP1_EnableClockSleep\n
- * APB1SMENR TIM7SMEN LL_APB1_GRP1_EnableClockSleep\n
- * APB1SMENR LCDSMEN LL_APB1_GRP1_EnableClockSleep\n
- * APB1SMENR WWDGSMEN LL_APB1_GRP1_EnableClockSleep\n
- * APB1SMENR SPI2SMEN LL_APB1_GRP1_EnableClockSleep\n
- * APB1SMENR USART2SMEN LL_APB1_GRP1_EnableClockSleep\n
- * APB1SMENR LPUART1SMEN LL_APB1_GRP1_EnableClockSleep\n
- * APB1SMENR USART4SMEN LL_APB1_GRP1_EnableClockSleep\n
- * APB1SMENR USART5SMEN LL_APB1_GRP1_EnableClockSleep\n
- * APB1SMENR I2C1SMEN LL_APB1_GRP1_EnableClockSleep\n
- * APB1SMENR I2C2SMEN LL_APB1_GRP1_EnableClockSleep\n
- * APB1SMENR USBSMEN LL_APB1_GRP1_EnableClockSleep\n
- * APB1SMENR CRSSMEN LL_APB1_GRP1_EnableClockSleep\n
- * APB1SMENR PWRSMEN LL_APB1_GRP1_EnableClockSleep\n
- * APB1SMENR DACSMEN LL_APB1_GRP1_EnableClockSleep\n
- * APB1SMENR I2C3SMEN LL_APB1_GRP1_EnableClockSleep\n
- * APB1SMENR LPTIM1SMEN LL_APB1_GRP1_EnableClockSleep
- * @param Periphs This parameter can be a combination of the following values:
- * @arg @ref LL_APB1_GRP1_PERIPH_TIM2
- * @arg @ref LL_APB1_GRP1_PERIPH_TIM3 (*)
- * @arg @ref LL_APB1_GRP1_PERIPH_TIM6 (*)
- * @arg @ref LL_APB1_GRP1_PERIPH_TIM7 (*)
- * @arg @ref LL_APB1_GRP1_PERIPH_LCD (*)
- * @arg @ref LL_APB1_GRP1_PERIPH_WWDG
- * @arg @ref LL_APB1_GRP1_PERIPH_SPI2 (*)
- * @arg @ref LL_APB1_GRP1_PERIPH_USART2
- * @arg @ref LL_APB1_GRP1_PERIPH_LPUART1
- * @arg @ref LL_APB1_GRP1_PERIPH_USART4 (*)
- * @arg @ref LL_APB1_GRP1_PERIPH_USART5 (*)
- * @arg @ref LL_APB1_GRP1_PERIPH_I2C1
- * @arg @ref LL_APB1_GRP1_PERIPH_I2C2 (*)
- * @arg @ref LL_APB1_GRP1_PERIPH_USB (*)
- * @arg @ref LL_APB1_GRP1_PERIPH_CRS (*)
- * @arg @ref LL_APB1_GRP1_PERIPH_PWR
- * @arg @ref LL_APB1_GRP1_PERIPH_DAC1 (*)
- * @arg @ref LL_APB1_GRP1_PERIPH_I2C3 (*)
- * @arg @ref LL_APB1_GRP1_PERIPH_LPTIM1
- *
- * (*) value not defined in all devices.
- * @retval None
- */
- __STATIC_INLINE void LL_APB1_GRP1_EnableClockSleep(uint32_t Periphs)
- {
- __IO uint32_t tmpreg;
- SET_BIT(RCC->APB1SMENR, Periphs);
- /* Delay after an RCC peripheral clock enabling */
- tmpreg = READ_BIT(RCC->APB1SMENR, Periphs);
- (void)tmpreg;
- }
- /**
- * @brief Disable APB1 peripherals clock during Low Power (Sleep) mode.
- * @rmtoll APB1SMENR TIM2SMEN LL_APB1_GRP1_DisableClockSleep\n
- * APB1SMENR TIM3SMEN LL_APB1_GRP1_DisableClockSleep\n
- * APB1SMENR TIM6SMEN LL_APB1_GRP1_DisableClockSleep\n
- * APB1SMENR TIM7SMEN LL_APB1_GRP1_DisableClockSleep\n
- * APB1SMENR LCDSMEN LL_APB1_GRP1_DisableClockSleep\n
- * APB1SMENR WWDGSMEN LL_APB1_GRP1_DisableClockSleep\n
- * APB1SMENR SPI2SMEN LL_APB1_GRP1_DisableClockSleep\n
- * APB1SMENR USART2SMEN LL_APB1_GRP1_DisableClockSleep\n
- * APB1SMENR LPUART1SMEN LL_APB1_GRP1_DisableClockSleep\n
- * APB1SMENR USART4SMEN LL_APB1_GRP1_DisableClockSleep\n
- * APB1SMENR USART5SMEN LL_APB1_GRP1_DisableClockSleep\n
- * APB1SMENR I2C1SMEN LL_APB1_GRP1_DisableClockSleep\n
- * APB1SMENR I2C2SMEN LL_APB1_GRP1_DisableClockSleep\n
- * APB1SMENR USBSMEN LL_APB1_GRP1_DisableClockSleep\n
- * APB1SMENR CRSSMEN LL_APB1_GRP1_DisableClockSleep\n
- * APB1SMENR PWRSMEN LL_APB1_GRP1_DisableClockSleep\n
- * APB1SMENR DACSMEN LL_APB1_GRP1_DisableClockSleep\n
- * APB1SMENR I2C3SMEN LL_APB1_GRP1_DisableClockSleep\n
- * APB1SMENR LPTIM1SMEN LL_APB1_GRP1_DisableClockSleep
- * @param Periphs This parameter can be a combination of the following values:
- * @arg @ref LL_APB1_GRP1_PERIPH_TIM2
- * @arg @ref LL_APB1_GRP1_PERIPH_TIM3 (*)
- * @arg @ref LL_APB1_GRP1_PERIPH_TIM6 (*)
- * @arg @ref LL_APB1_GRP1_PERIPH_TIM7 (*)
- * @arg @ref LL_APB1_GRP1_PERIPH_LCD (*)
- * @arg @ref LL_APB1_GRP1_PERIPH_WWDG
- * @arg @ref LL_APB1_GRP1_PERIPH_SPI2 (*)
- * @arg @ref LL_APB1_GRP1_PERIPH_USART2
- * @arg @ref LL_APB1_GRP1_PERIPH_LPUART1
- * @arg @ref LL_APB1_GRP1_PERIPH_USART4 (*)
- * @arg @ref LL_APB1_GRP1_PERIPH_USART5 (*)
- * @arg @ref LL_APB1_GRP1_PERIPH_I2C1
- * @arg @ref LL_APB1_GRP1_PERIPH_I2C2 (*)
- * @arg @ref LL_APB1_GRP1_PERIPH_USB (*)
- * @arg @ref LL_APB1_GRP1_PERIPH_CRS (*)
- * @arg @ref LL_APB1_GRP1_PERIPH_PWR
- * @arg @ref LL_APB1_GRP1_PERIPH_DAC1 (*)
- * @arg @ref LL_APB1_GRP1_PERIPH_I2C3 (*)
- * @arg @ref LL_APB1_GRP1_PERIPH_LPTIM1
- *
- * (*) value not defined in all devices.
- * @retval None
- */
- __STATIC_INLINE void LL_APB1_GRP1_DisableClockSleep(uint32_t Periphs)
- {
- CLEAR_BIT(RCC->APB1SMENR, Periphs);
- }
- /**
- * @}
- */
- /** @defgroup BUS_LL_EF_APB2 APB2
- * @{
- */
- /**
- * @brief Enable APB2 peripherals clock.
- * @rmtoll APB2ENR SYSCFGEN LL_APB2_GRP1_EnableClock\n
- * APB2ENR TIM21EN LL_APB2_GRP1_EnableClock\n
- * APB2ENR TIM22EN LL_APB2_GRP1_EnableClock\n
- * APB2ENR FWEN LL_APB2_GRP1_EnableClock\n
- * APB2ENR ADCEN LL_APB2_GRP1_EnableClock\n
- * APB2ENR SPI1EN LL_APB2_GRP1_EnableClock\n
- * APB2ENR USART1EN LL_APB2_GRP1_EnableClock\n
- * APB2ENR DBGEN LL_APB2_GRP1_EnableClock
- * @param Periphs This parameter can be a combination of the following values:
- * @arg @ref LL_APB2_GRP1_PERIPH_SYSCFG
- * @arg @ref LL_APB2_GRP1_PERIPH_TIM21
- * @arg @ref LL_APB2_GRP1_PERIPH_TIM22 (*)
- * @arg @ref LL_APB2_GRP1_PERIPH_FW
- * @arg @ref LL_APB2_GRP1_PERIPH_ADC1
- * @arg @ref LL_APB2_GRP1_PERIPH_SPI1
- * @arg @ref LL_APB2_GRP1_PERIPH_USART1 (*)
- * @arg @ref LL_APB2_GRP1_PERIPH_DBGMCU
- *
- * (*) value not defined in all devices.
- * @retval None
- */
- __STATIC_INLINE void LL_APB2_GRP1_EnableClock(uint32_t Periphs)
- {
- __IO uint32_t tmpreg;
- SET_BIT(RCC->APB2ENR, Periphs);
- /* Delay after an RCC peripheral clock enabling */
- tmpreg = READ_BIT(RCC->APB2ENR, Periphs);
- (void)tmpreg;
- }
- /**
- * @brief Check if APB2 peripheral clock is enabled or not
- * @rmtoll APB2ENR SYSCFGEN LL_APB2_GRP1_IsEnabledClock\n
- * APB2ENR TIM21EN LL_APB2_GRP1_IsEnabledClock\n
- * APB2ENR TIM22EN LL_APB2_GRP1_IsEnabledClock\n
- * APB2ENR FWEN LL_APB2_GRP1_IsEnabledClock\n
- * APB2ENR ADCEN LL_APB2_GRP1_IsEnabledClock\n
- * APB2ENR SPI1EN LL_APB2_GRP1_IsEnabledClock\n
- * APB2ENR USART1EN LL_APB2_GRP1_IsEnabledClock\n
- * APB2ENR DBGEN LL_APB2_GRP1_IsEnabledClock
- * @param Periphs This parameter can be a combination of the following values:
- * @arg @ref LL_APB2_GRP1_PERIPH_SYSCFG
- * @arg @ref LL_APB2_GRP1_PERIPH_TIM21
- * @arg @ref LL_APB2_GRP1_PERIPH_TIM22 (*)
- * @arg @ref LL_APB2_GRP1_PERIPH_FW
- * @arg @ref LL_APB2_GRP1_PERIPH_ADC1
- * @arg @ref LL_APB2_GRP1_PERIPH_SPI1
- * @arg @ref LL_APB2_GRP1_PERIPH_USART1 (*)
- * @arg @ref LL_APB2_GRP1_PERIPH_DBGMCU
- *
- * (*) value not defined in all devices.
- * @retval State of Periphs (1 or 0).
- */
- __STATIC_INLINE uint32_t LL_APB2_GRP1_IsEnabledClock(uint32_t Periphs)
- {
- return ((READ_BIT(RCC->APB2ENR, Periphs) == (Periphs)) ? 1UL : 0UL);
- }
- /**
- * @brief Disable APB2 peripherals clock.
- * @rmtoll APB2ENR SYSCFGEN LL_APB2_GRP1_DisableClock\n
- * APB2ENR TIM21EN LL_APB2_GRP1_DisableClock\n
- * APB2ENR TIM22EN LL_APB2_GRP1_DisableClock\n
- * APB2ENR FWEN LL_APB2_GRP1_DisableClock\n
- * APB2ENR ADCEN LL_APB2_GRP1_DisableClock\n
- * APB2ENR SPI1EN LL_APB2_GRP1_DisableClock\n
- * APB2ENR USART1EN LL_APB2_GRP1_DisableClock\n
- * APB2ENR DBGEN LL_APB2_GRP1_DisableClock
- * @param Periphs This parameter can be a combination of the following values:
- * @arg @ref LL_APB2_GRP1_PERIPH_SYSCFG
- * @arg @ref LL_APB2_GRP1_PERIPH_TIM21
- * @arg @ref LL_APB2_GRP1_PERIPH_TIM22 (*)
- * @arg @ref LL_APB2_GRP1_PERIPH_FW
- * @arg @ref LL_APB2_GRP1_PERIPH_ADC1
- * @arg @ref LL_APB2_GRP1_PERIPH_SPI1
- * @arg @ref LL_APB2_GRP1_PERIPH_USART1 (*)
- * @arg @ref LL_APB2_GRP1_PERIPH_DBGMCU
- *
- * (*) value not defined in all devices.
- * @retval None
- */
- __STATIC_INLINE void LL_APB2_GRP1_DisableClock(uint32_t Periphs)
- {
- CLEAR_BIT(RCC->APB2ENR, Periphs);
- }
- /**
- * @brief Force APB2 peripherals reset.
- * @rmtoll APB2RSTR SYSCFGRST LL_APB2_GRP1_ForceReset\n
- * APB2RSTR TIM21RST LL_APB2_GRP1_ForceReset\n
- * APB2RSTR TIM22RST LL_APB2_GRP1_ForceReset\n
- * APB2RSTR ADCRST LL_APB2_GRP1_ForceReset\n
- * APB2RSTR SPI1RST LL_APB2_GRP1_ForceReset\n
- * APB2RSTR USART1RST LL_APB2_GRP1_ForceReset\n
- * APB2RSTR DBGRST LL_APB2_GRP1_ForceReset
- * @param Periphs This parameter can be a combination of the following values:
- * @arg @ref LL_APB2_GRP1_PERIPH_ALL
- * @arg @ref LL_APB2_GRP1_PERIPH_SYSCFG
- * @arg @ref LL_APB2_GRP1_PERIPH_TIM21
- * @arg @ref LL_APB2_GRP1_PERIPH_TIM22 (*)
- * @arg @ref LL_APB2_GRP1_PERIPH_ADC1
- * @arg @ref LL_APB2_GRP1_PERIPH_SPI1
- * @arg @ref LL_APB2_GRP1_PERIPH_USART1 (*)
- * @arg @ref LL_APB2_GRP1_PERIPH_DBGMCU
- *
- * (*) value not defined in all devices.
- * @retval None
- */
- __STATIC_INLINE void LL_APB2_GRP1_ForceReset(uint32_t Periphs)
- {
- SET_BIT(RCC->APB2RSTR, Periphs);
- }
- /**
- * @brief Release APB2 peripherals reset.
- * @rmtoll APB2RSTR SYSCFGRST LL_APB2_GRP1_ReleaseReset\n
- * APB2RSTR TIM21RST LL_APB2_GRP1_ReleaseReset\n
- * APB2RSTR TIM22RST LL_APB2_GRP1_ReleaseReset\n
- * APB2RSTR ADCRST LL_APB2_GRP1_ReleaseReset\n
- * APB2RSTR SPI1RST LL_APB2_GRP1_ReleaseReset\n
- * APB2RSTR USART1RST LL_APB2_GRP1_ReleaseReset\n
- * APB2RSTR DBGRST LL_APB2_GRP1_ReleaseReset
- * @param Periphs This parameter can be a combination of the following values:
- * @arg @ref LL_APB2_GRP1_PERIPH_ALL
- * @arg @ref LL_APB2_GRP1_PERIPH_SYSCFG
- * @arg @ref LL_APB2_GRP1_PERIPH_TIM21
- * @arg @ref LL_APB2_GRP1_PERIPH_TIM22 (*)
- * @arg @ref LL_APB2_GRP1_PERIPH_ADC1
- * @arg @ref LL_APB2_GRP1_PERIPH_SPI1
- * @arg @ref LL_APB2_GRP1_PERIPH_USART1 (*)
- * @arg @ref LL_APB2_GRP1_PERIPH_DBGMCU
- *
- * (*) value not defined in all devices.
- * @retval None
- */
- __STATIC_INLINE void LL_APB2_GRP1_ReleaseReset(uint32_t Periphs)
- {
- CLEAR_BIT(RCC->APB2RSTR, Periphs);
- }
- /**
- * @brief Enable APB2 peripherals clock during Low Power (Sleep) mode.
- * @rmtoll APB2SMENR SYSCFGSMEN LL_APB2_GRP1_EnableClockSleep\n
- * APB2SMENR TIM21SMEN LL_APB2_GRP1_EnableClockSleep\n
- * APB2SMENR TIM22SMEN LL_APB2_GRP1_EnableClockSleep\n
- * APB2SMENR ADCSMEN LL_APB2_GRP1_EnableClockSleep\n
- * APB2SMENR SPI1SMEN LL_APB2_GRP1_EnableClockSleep\n
- * APB2SMENR USART1SMEN LL_APB2_GRP1_EnableClockSleep\n
- * APB2SMENR DBGSMEN LL_APB2_GRP1_EnableClockSleep
- * @param Periphs This parameter can be a combination of the following values:
- * @arg @ref LL_APB2_GRP1_PERIPH_SYSCFG
- * @arg @ref LL_APB2_GRP1_PERIPH_TIM21
- * @arg @ref LL_APB2_GRP1_PERIPH_TIM22 (*)
- * @arg @ref LL_APB2_GRP1_PERIPH_ADC1
- * @arg @ref LL_APB2_GRP1_PERIPH_SPI1
- * @arg @ref LL_APB2_GRP1_PERIPH_USART1 (*)
- * @arg @ref LL_APB2_GRP1_PERIPH_DBGMCU
- *
- * (*) value not defined in all devices.
- * @retval None
- */
- __STATIC_INLINE void LL_APB2_GRP1_EnableClockSleep(uint32_t Periphs)
- {
- __IO uint32_t tmpreg;
- SET_BIT(RCC->APB2SMENR, Periphs);
- /* Delay after an RCC peripheral clock enabling */
- tmpreg = READ_BIT(RCC->APB2SMENR, Periphs);
- (void)tmpreg;
- }
- /**
- * @brief Disable APB2 peripherals clock during Low Power (Sleep) mode.
- * @rmtoll APB2SMENR SYSCFGSMEN LL_APB2_GRP1_DisableClockSleep\n
- * APB2SMENR TIM21SMEN LL_APB2_GRP1_DisableClockSleep\n
- * APB2SMENR TIM22SMEN LL_APB2_GRP1_DisableClockSleep\n
- * APB2SMENR ADCSMEN LL_APB2_GRP1_DisableClockSleep\n
- * APB2SMENR SPI1SMEN LL_APB2_GRP1_DisableClockSleep\n
- * APB2SMENR USART1SMEN LL_APB2_GRP1_DisableClockSleep\n
- * APB2SMENR DBGSMEN LL_APB2_GRP1_DisableClockSleep
- * @param Periphs This parameter can be a combination of the following values:
- * @arg @ref LL_APB2_GRP1_PERIPH_SYSCFG
- * @arg @ref LL_APB2_GRP1_PERIPH_TIM21
- * @arg @ref LL_APB2_GRP1_PERIPH_TIM22 (*)
- * @arg @ref LL_APB2_GRP1_PERIPH_ADC1
- * @arg @ref LL_APB2_GRP1_PERIPH_SPI1
- * @arg @ref LL_APB2_GRP1_PERIPH_USART1 (*)
- * @arg @ref LL_APB2_GRP1_PERIPH_DBGMCU
- *
- * (*) value not defined in all devices.
- * @retval None
- */
- __STATIC_INLINE void LL_APB2_GRP1_DisableClockSleep(uint32_t Periphs)
- {
- CLEAR_BIT(RCC->APB2SMENR, Periphs);
- }
- /**
- * @}
- */
- /** @defgroup BUS_LL_EF_IOP IOP
- * @{
- */
- /**
- * @brief Enable IOP peripherals clock.
- * @rmtoll IOPENR GPIOAEN LL_IOP_GRP1_EnableClock\n
- * IOPENR GPIOBEN LL_IOP_GRP1_EnableClock\n
- * IOPENR GPIOCEN LL_IOP_GRP1_EnableClock\n
- * IOPENR GPIODEN LL_IOP_GRP1_EnableClock\n
- * IOPENR GPIOEEN LL_IOP_GRP1_EnableClock\n
- * IOPENR GPIOHEN LL_IOP_GRP1_EnableClock
- * @param Periphs This parameter can be a combination of the following values:
- * @arg @ref LL_IOP_GRP1_PERIPH_GPIOA
- * @arg @ref LL_IOP_GRP1_PERIPH_GPIOB
- * @arg @ref LL_IOP_GRP1_PERIPH_GPIOC
- * @arg @ref LL_IOP_GRP1_PERIPH_GPIOD (*)
- * @arg @ref LL_IOP_GRP1_PERIPH_GPIOE (*)
- * @arg @ref LL_IOP_GRP1_PERIPH_GPIOH (*)
- *
- * (*) value not defined in all devices.
- * @retval None
- */
- __STATIC_INLINE void LL_IOP_GRP1_EnableClock(uint32_t Periphs)
- {
- __IO uint32_t tmpreg;
- SET_BIT(RCC->IOPENR, Periphs);
- /* Delay after an RCC peripheral clock enabling */
- tmpreg = READ_BIT(RCC->IOPENR, Periphs);
- (void)tmpreg;
- }
- /**
- * @brief Check if IOP peripheral clock is enabled or not
- * @rmtoll IOPENR GPIOAEN LL_IOP_GRP1_IsEnabledClock\n
- * IOPENR GPIOBEN LL_IOP_GRP1_IsEnabledClock\n
- * IOPENR GPIOCEN LL_IOP_GRP1_IsEnabledClock\n
- * IOPENR GPIODEN LL_IOP_GRP1_IsEnabledClock\n
- * IOPENR GPIOEEN LL_IOP_GRP1_IsEnabledClock\n
- * IOPENR GPIOHEN LL_IOP_GRP1_IsEnabledClock
- * @param Periphs This parameter can be a combination of the following values:
- * @arg @ref LL_IOP_GRP1_PERIPH_GPIOA
- * @arg @ref LL_IOP_GRP1_PERIPH_GPIOB
- * @arg @ref LL_IOP_GRP1_PERIPH_GPIOC
- * @arg @ref LL_IOP_GRP1_PERIPH_GPIOD (*)
- * @arg @ref LL_IOP_GRP1_PERIPH_GPIOE (*)
- * @arg @ref LL_IOP_GRP1_PERIPH_GPIOH (*)
- *
- * (*) value not defined in all devices.
- * @retval State of Periphs (1 or 0).
- */
- __STATIC_INLINE uint32_t LL_IOP_GRP1_IsEnabledClock(uint32_t Periphs)
- {
- return ((READ_BIT(RCC->IOPENR, Periphs) == (Periphs)) ? 1UL : 0UL);
- }
- /**
- * @brief Disable IOP peripherals clock.
- * @rmtoll IOPENR GPIOAEN LL_IOP_GRP1_DisableClock\n
- * IOPENR GPIOBEN LL_IOP_GRP1_DisableClock\n
- * IOPENR GPIOCEN LL_IOP_GRP1_DisableClock\n
- * IOPENR GPIODEN LL_IOP_GRP1_DisableClock\n
- * IOPENR GPIOEEN LL_IOP_GRP1_DisableClock\n
- * IOPENR GPIOHEN LL_IOP_GRP1_DisableClock
- * @param Periphs This parameter can be a combination of the following values:
- * @arg @ref LL_IOP_GRP1_PERIPH_GPIOA
- * @arg @ref LL_IOP_GRP1_PERIPH_GPIOB
- * @arg @ref LL_IOP_GRP1_PERIPH_GPIOC
- * @arg @ref LL_IOP_GRP1_PERIPH_GPIOD (*)
- * @arg @ref LL_IOP_GRP1_PERIPH_GPIOE (*)
- * @arg @ref LL_IOP_GRP1_PERIPH_GPIOH (*)
- *
- * (*) value not defined in all devices.
- * @retval None
- */
- __STATIC_INLINE void LL_IOP_GRP1_DisableClock(uint32_t Periphs)
- {
- CLEAR_BIT(RCC->IOPENR, Periphs);
- }
- /**
- * @brief Disable IOP peripherals clock.
- * @rmtoll IOPRSTR GPIOASMEN LL_IOP_GRP1_ForceReset\n
- * IOPRSTR GPIOBSMEN LL_IOP_GRP1_ForceReset\n
- * IOPRSTR GPIOCSMEN LL_IOP_GRP1_ForceReset\n
- * IOPRSTR GPIODSMEN LL_IOP_GRP1_ForceReset\n
- * IOPRSTR GPIOESMEN LL_IOP_GRP1_ForceReset\n
- * IOPRSTR GPIOHSMEN LL_IOP_GRP1_ForceReset
- * @param Periphs This parameter can be a combination of the following values:
- * @arg @ref LL_IOP_GRP1_PERIPH_ALL
- * @arg @ref LL_IOP_GRP1_PERIPH_GPIOA
- * @arg @ref LL_IOP_GRP1_PERIPH_GPIOB
- * @arg @ref LL_IOP_GRP1_PERIPH_GPIOC
- * @arg @ref LL_IOP_GRP1_PERIPH_GPIOD (*)
- * @arg @ref LL_IOP_GRP1_PERIPH_GPIOE (*)
- * @arg @ref LL_IOP_GRP1_PERIPH_GPIOH (*)
- *
- * (*) value not defined in all devices.
- * @retval None
- */
- __STATIC_INLINE void LL_IOP_GRP1_ForceReset(uint32_t Periphs)
- {
- SET_BIT(RCC->IOPRSTR, Periphs);
- }
- /**
- * @brief Release IOP peripherals reset.
- * @rmtoll IOPRSTR GPIOASMEN LL_IOP_GRP1_ReleaseReset\n
- * IOPRSTR GPIOBSMEN LL_IOP_GRP1_ReleaseReset\n
- * IOPRSTR GPIOCSMEN LL_IOP_GRP1_ReleaseReset\n
- * IOPRSTR GPIODSMEN LL_IOP_GRP1_ReleaseReset\n
- * IOPRSTR GPIOESMEN LL_IOP_GRP1_ReleaseReset\n
- * IOPRSTR GPIOHSMEN LL_IOP_GRP1_ReleaseReset
- * @param Periphs This parameter can be a combination of the following values:
- * @arg @ref LL_IOP_GRP1_PERIPH_ALL
- * @arg @ref LL_IOP_GRP1_PERIPH_GPIOA
- * @arg @ref LL_IOP_GRP1_PERIPH_GPIOB
- * @arg @ref LL_IOP_GRP1_PERIPH_GPIOC
- * @arg @ref LL_IOP_GRP1_PERIPH_GPIOD (*)
- * @arg @ref LL_IOP_GRP1_PERIPH_GPIOE (*)
- * @arg @ref LL_IOP_GRP1_PERIPH_GPIOH (*)
- *
- * (*) value not defined in all devices.
- * @retval None
- */
- __STATIC_INLINE void LL_IOP_GRP1_ReleaseReset(uint32_t Periphs)
- {
- CLEAR_BIT(RCC->IOPRSTR, Periphs);
- }
- /**
- * @brief Enable IOP peripherals clock during Low Power (Sleep) mode.
- * @rmtoll IOPSMENR GPIOARST LL_IOP_GRP1_EnableClockSleep\n
- * IOPSMENR GPIOBRST LL_IOP_GRP1_EnableClockSleep\n
- * IOPSMENR GPIOCRST LL_IOP_GRP1_EnableClockSleep\n
- * IOPSMENR GPIODRST LL_IOP_GRP1_EnableClockSleep\n
- * IOPSMENR GPIOERST LL_IOP_GRP1_EnableClockSleep\n
- * IOPSMENR GPIOHRST LL_IOP_GRP1_EnableClockSleep
- * @param Periphs This parameter can be a combination of the following values:
- * @arg @ref LL_IOP_GRP1_PERIPH_GPIOA
- * @arg @ref LL_IOP_GRP1_PERIPH_GPIOB
- * @arg @ref LL_IOP_GRP1_PERIPH_GPIOC
- * @arg @ref LL_IOP_GRP1_PERIPH_GPIOD (*)
- * @arg @ref LL_IOP_GRP1_PERIPH_GPIOE (*)
- * @arg @ref LL_IOP_GRP1_PERIPH_GPIOH (*)
- *
- * (*) value not defined in all devices.
- * @retval None
- */
- __STATIC_INLINE void LL_IOP_GRP1_EnableClockSleep(uint32_t Periphs)
- {
- __IO uint32_t tmpreg;
- SET_BIT(RCC->IOPSMENR, Periphs);
- /* Delay after an RCC peripheral clock enabling */
- tmpreg = READ_BIT(RCC->IOPSMENR, Periphs);
- (void)tmpreg;
- }
- /**
- * @brief Disable IOP peripherals clock during Low Power (Sleep) mode.
- * @rmtoll IOPSMENR GPIOARST LL_IOP_GRP1_DisableClockSleep\n
- * IOPSMENR GPIOBRST LL_IOP_GRP1_DisableClockSleep\n
- * IOPSMENR GPIOCRST LL_IOP_GRP1_DisableClockSleep\n
- * IOPSMENR GPIODRST LL_IOP_GRP1_DisableClockSleep\n
- * IOPSMENR GPIOERST LL_IOP_GRP1_DisableClockSleep\n
- * IOPSMENR GPIOHRST LL_IOP_GRP1_DisableClockSleep
- * @param Periphs This parameter can be a combination of the following values:
- * @arg @ref LL_IOP_GRP1_PERIPH_GPIOA
- * @arg @ref LL_IOP_GRP1_PERIPH_GPIOB
- * @arg @ref LL_IOP_GRP1_PERIPH_GPIOC
- * @arg @ref LL_IOP_GRP1_PERIPH_GPIOD (*)
- * @arg @ref LL_IOP_GRP1_PERIPH_GPIOE (*)
- * @arg @ref LL_IOP_GRP1_PERIPH_GPIOH (*)
- *
- * (*) value not defined in all devices.
- * @retval None
- */
- __STATIC_INLINE void LL_IOP_GRP1_DisableClockSleep(uint32_t Periphs)
- {
- CLEAR_BIT(RCC->IOPSMENR, Periphs);
- }
- /**
- * @}
- */
- /**
- * @}
- */
- /**
- * @}
- */
- #endif /* defined(RCC) */
- /**
- * @}
- */
- #ifdef __cplusplus
- }
- #endif
- #endif /* __STM32L0xx_LL_BUS_H */
|