My Project
Loading...
Searching...
No Matches
stm32f3xx_ll_bus.h
Go to the documentation of this file.
1
35/* Define to prevent recursive inclusion -------------------------------------*/
36#ifndef __STM32F3xx_LL_BUS_H
37#define __STM32F3xx_LL_BUS_H
38
39#ifdef __cplusplus
40extern "C" {
41#endif
42
43/* Includes ------------------------------------------------------------------*/
44#include "stm32f3xx.h"
45
50#if defined(RCC)
51
56/* Private types -------------------------------------------------------------*/
57/* Private variables ---------------------------------------------------------*/
58
59/* Private constants ---------------------------------------------------------*/
60
61/* Private macros ------------------------------------------------------------*/
62
63/* Exported types ------------------------------------------------------------*/
64/* Exported constants --------------------------------------------------------*/
72#define LL_AHB1_GRP1_PERIPH_ALL (uint32_t)0xFFFFFFFFU
73#define LL_AHB1_GRP1_PERIPH_DMA1 RCC_AHBENR_DMA1EN
74#if defined(DMA2)
75#define LL_AHB1_GRP1_PERIPH_DMA2 RCC_AHBENR_DMA2EN
76#endif /*DMA2*/
77#define LL_AHB1_GRP1_PERIPH_SRAM RCC_AHBENR_SRAMEN
78#define LL_AHB1_GRP1_PERIPH_FLASH RCC_AHBENR_FLITFEN
79#if defined(FMC_Bank1)
80#define LL_AHB1_GRP1_PERIPH_FMC RCC_AHBENR_FMCEN
81#endif /*FMC_Bank1*/
82#define LL_AHB1_GRP1_PERIPH_CRC RCC_AHBENR_CRCEN
83#if defined(GPIOH)
84#define LL_AHB1_GRP1_PERIPH_GPIOH RCC_AHBENR_GPIOHEN
85#endif /*GPIOH*/
86#define LL_AHB1_GRP1_PERIPH_GPIOA RCC_AHBENR_GPIOAEN
87#define LL_AHB1_GRP1_PERIPH_GPIOB RCC_AHBENR_GPIOBEN
88#define LL_AHB1_GRP1_PERIPH_GPIOC RCC_AHBENR_GPIOCEN
89#define LL_AHB1_GRP1_PERIPH_GPIOD RCC_AHBENR_GPIODEN
90#if defined(GPIOE)
91#define LL_AHB1_GRP1_PERIPH_GPIOE RCC_AHBENR_GPIOEEN
92#endif /*GPIOE*/
93#define LL_AHB1_GRP1_PERIPH_GPIOF RCC_AHBENR_GPIOFEN
94#if defined(GPIOG)
95#define LL_AHB1_GRP1_PERIPH_GPIOG RCC_AHBENR_GPIOGEN
96#endif /*GPIOH*/
97#define LL_AHB1_GRP1_PERIPH_TSC RCC_AHBENR_TSCEN
98#if defined(RCC_AHBENR_ADC1EN)
99#define LL_AHB1_GRP1_PERIPH_ADC1 RCC_AHBENR_ADC1EN
100#endif /*RCC_AHBENR_ADC1EN*/
101#if defined(ADC1_2_COMMON)
102#define LL_AHB1_GRP1_PERIPH_ADC12 RCC_AHBENR_ADC12EN
103#endif /*ADC1_2_COMMON*/
104#if defined(ADC3_4_COMMON)
105#define LL_AHB1_GRP1_PERIPH_ADC34 RCC_AHBENR_ADC34EN
106#endif /*ADC3_4_COMMON*/
114#define LL_APB1_GRP1_PERIPH_ALL (uint32_t)0xFFFFFFFFU
115#define LL_APB1_GRP1_PERIPH_TIM2 RCC_APB1ENR_TIM2EN
116#if defined(TIM3)
117#define LL_APB1_GRP1_PERIPH_TIM3 RCC_APB1ENR_TIM3EN
118#endif /*TIM3*/
119#if defined(TIM4)
120#define LL_APB1_GRP1_PERIPH_TIM4 RCC_APB1ENR_TIM4EN
121#endif /*TIM4*/
122#if defined(TIM5)
123#define LL_APB1_GRP1_PERIPH_TIM5 RCC_APB1ENR_TIM5EN
124#endif /*TIM5*/
125#define LL_APB1_GRP1_PERIPH_TIM6 RCC_APB1ENR_TIM6EN
126#if defined(TIM7)
127#define LL_APB1_GRP1_PERIPH_TIM7 RCC_APB1ENR_TIM7EN
128#endif /*TIM7*/
129#if defined(TIM12)
130#define LL_APB1_GRP1_PERIPH_TIM12 RCC_APB1ENR_TIM12EN
131#endif /*TIM12*/
132#if defined(TIM13)
133#define LL_APB1_GRP1_PERIPH_TIM13 RCC_APB1ENR_TIM13EN
134#endif /*TIM13*/
135#if defined(TIM14)
136#define LL_APB1_GRP1_PERIPH_TIM14 RCC_APB1ENR_TIM14EN
137#endif /*TIM14*/
138#if defined(TIM18)
139#define LL_APB1_GRP1_PERIPH_TIM18 RCC_APB1ENR_TIM18EN
140#endif /*TIM18*/
141#define LL_APB1_GRP1_PERIPH_WWDG RCC_APB1ENR_WWDGEN
142#if defined(SPI2)
143#define LL_APB1_GRP1_PERIPH_SPI2 RCC_APB1ENR_SPI2EN
144#endif /*SPI2*/
145#if defined(SPI3)
146#define LL_APB1_GRP1_PERIPH_SPI3 RCC_APB1ENR_SPI3EN
147#endif /*SPI3*/
148#define LL_APB1_GRP1_PERIPH_USART2 RCC_APB1ENR_USART2EN
149#define LL_APB1_GRP1_PERIPH_USART3 RCC_APB1ENR_USART3EN
150#if defined(UART4)
151#define LL_APB1_GRP1_PERIPH_UART4 RCC_APB1ENR_UART4EN
152#endif /*UART4*/
153#if defined(UART5)
154#define LL_APB1_GRP1_PERIPH_UART5 RCC_APB1ENR_UART5EN
155#endif /*UART5*/
156#define LL_APB1_GRP1_PERIPH_I2C1 RCC_APB1ENR_I2C1EN
157#if defined(I2C2)
158#define LL_APB1_GRP1_PERIPH_I2C2 RCC_APB1ENR_I2C2EN
159#endif /*I2C2*/
160#if defined(USB)
161#define LL_APB1_GRP1_PERIPH_USB RCC_APB1ENR_USBEN
162#endif /*USB*/
163#if defined(CAN)
164#define LL_APB1_GRP1_PERIPH_CAN RCC_APB1ENR_CANEN
165#endif /*CAN*/
166#if defined(DAC2)
167#define LL_APB1_GRP1_PERIPH_DAC2 RCC_APB1ENR_DAC2EN
168#endif /*DAC2*/
169#define LL_APB1_GRP1_PERIPH_PWR RCC_APB1ENR_PWREN
170#define LL_APB1_GRP1_PERIPH_DAC1 RCC_APB1ENR_DAC1EN
171#if defined(CEC)
172#define LL_APB1_GRP1_PERIPH_CEC RCC_APB1ENR_CECEN
173#endif /*CEC*/
174#if defined(I2C3)
175#define LL_APB1_GRP1_PERIPH_I2C3 RCC_APB1ENR_I2C3EN
176#endif /*I2C3*/
184#define LL_APB2_GRP1_PERIPH_ALL (uint32_t)0xFFFFFFFFU
185#define LL_APB2_GRP1_PERIPH_SYSCFG RCC_APB2ENR_SYSCFGEN
186#if defined(RCC_APB2ENR_ADC1EN)
187#define LL_APB2_GRP1_PERIPH_ADC1 RCC_APB2ENR_ADC1EN
188#endif /*RCC_APB2ENR_ADC1EN*/
189#if defined(TIM1)
190#define LL_APB2_GRP1_PERIPH_TIM1 RCC_APB2ENR_TIM1EN
191#endif /*TIM1*/
192#if defined(SPI1)
193#define LL_APB2_GRP1_PERIPH_SPI1 RCC_APB2ENR_SPI1EN
194#endif /*SPI1*/
195#if defined(TIM8)
196#define LL_APB2_GRP1_PERIPH_TIM8 RCC_APB2ENR_TIM8EN
197#endif /*TIM8*/
198#define LL_APB2_GRP1_PERIPH_USART1 RCC_APB2ENR_USART1EN
199#if defined(SPI4)
200#define LL_APB2_GRP1_PERIPH_SPI4 RCC_APB2ENR_SPI4EN
201#endif /*SPI4*/
202#define LL_APB2_GRP1_PERIPH_TIM15 RCC_APB2ENR_TIM15EN
203#define LL_APB2_GRP1_PERIPH_TIM16 RCC_APB2ENR_TIM16EN
204#define LL_APB2_GRP1_PERIPH_TIM17 RCC_APB2ENR_TIM17EN
205#if defined(TIM19)
206#define LL_APB2_GRP1_PERIPH_TIM19 RCC_APB2ENR_TIM19EN
207#endif /*TIM19*/
208#if defined(TIM20)
209#define LL_APB2_GRP1_PERIPH_TIM20 RCC_APB2ENR_TIM20EN
210#endif /*TIM20*/
211#if defined(HRTIM1)
212#define LL_APB2_GRP1_PERIPH_HRTIM1 RCC_APB2ENR_HRTIM1EN
213#endif /*HRTIM1*/
214#if defined(SDADC1)
215#define LL_APB2_GRP1_PERIPH_SDADC1 RCC_APB2ENR_SDADC1EN
216#endif /*SDADC1*/
217#if defined(SDADC2)
218#define LL_APB2_GRP1_PERIPH_SDADC2 RCC_APB2ENR_SDADC2EN
219#endif /*SDADC2*/
220#if defined(SDADC3)
221#define LL_APB2_GRP1_PERIPH_SDADC3 RCC_APB2ENR_SDADC3EN
222#endif /*SDADC3*/
231/* Exported macro ------------------------------------------------------------*/
232
233/* Exported functions --------------------------------------------------------*/
285__STATIC_INLINE void LL_AHB1_GRP1_EnableClock(uint32_t Periphs)
286{
287 __IO uint32_t tmpreg;
288 SET_BIT(RCC->AHBENR, Periphs);
289 /* Delay after an RCC peripheral clock enabling */
290 tmpreg = READ_BIT(RCC->AHBENR, Periphs);
291 (void)tmpreg;
292}
293
337__STATIC_INLINE uint32_t LL_AHB1_GRP1_IsEnabledClock(uint32_t Periphs)
338{
339 return (READ_BIT(RCC->AHBENR, Periphs) == Periphs);
340}
341
385__STATIC_INLINE void LL_AHB1_GRP1_DisableClock(uint32_t Periphs)
386{
387 CLEAR_BIT(RCC->AHBENR, Periphs);
388}
389
424__STATIC_INLINE void LL_AHB1_GRP1_ForceReset(uint32_t Periphs)
425{
426 SET_BIT(RCC->AHBRSTR, Periphs);
427}
428
463__STATIC_INLINE void LL_AHB1_GRP1_ReleaseReset(uint32_t Periphs)
464{
465 CLEAR_BIT(RCC->AHBRSTR, Periphs);
466}
467
535__STATIC_INLINE void LL_APB1_GRP1_EnableClock(uint32_t Periphs)
536{
537 __IO uint32_t tmpreg;
538 SET_BIT(RCC->APB1ENR, Periphs);
539 /* Delay after an RCC peripheral clock enabling */
540 tmpreg = READ_BIT(RCC->APB1ENR, Periphs);
541 (void)tmpreg;
542}
543
603__STATIC_INLINE uint32_t LL_APB1_GRP1_IsEnabledClock(uint32_t Periphs)
604{
605 return (READ_BIT(RCC->APB1ENR, Periphs) == Periphs);
606}
607
667__STATIC_INLINE void LL_APB1_GRP1_DisableClock(uint32_t Periphs)
668{
669 CLEAR_BIT(RCC->APB1ENR, Periphs);
670}
671
732__STATIC_INLINE void LL_APB1_GRP1_ForceReset(uint32_t Periphs)
733{
734 SET_BIT(RCC->APB1RSTR, Periphs);
735}
736
797__STATIC_INLINE void LL_APB1_GRP1_ReleaseReset(uint32_t Periphs)
798{
799 CLEAR_BIT(RCC->APB1RSTR, Periphs);
800}
801
849__STATIC_INLINE void LL_APB2_GRP1_EnableClock(uint32_t Periphs)
850{
851 __IO uint32_t tmpreg;
852 SET_BIT(RCC->APB2ENR, Periphs);
853 /* Delay after an RCC peripheral clock enabling */
854 tmpreg = READ_BIT(RCC->APB2ENR, Periphs);
855 (void)tmpreg;
856}
857
897__STATIC_INLINE uint32_t LL_APB2_GRP1_IsEnabledClock(uint32_t Periphs)
898{
899 return (READ_BIT(RCC->APB2ENR, Periphs) == Periphs);
900}
901
941__STATIC_INLINE void LL_APB2_GRP1_DisableClock(uint32_t Periphs)
942{
943 CLEAR_BIT(RCC->APB2ENR, Periphs);
944}
945
986__STATIC_INLINE void LL_APB2_GRP1_ForceReset(uint32_t Periphs)
987{
988 SET_BIT(RCC->APB2RSTR, Periphs);
989}
990
1031__STATIC_INLINE void LL_APB2_GRP1_ReleaseReset(uint32_t Periphs)
1032{
1033 CLEAR_BIT(RCC->APB2RSTR, Periphs);
1034}
1035
1049#endif /* defined(RCC) */
1050
1055#ifdef __cplusplus
1056}
1057#endif
1058
1059#endif /* __STM32F3xx_LL_BUS_H */
1060
#define __STATIC_INLINE
Definition: cmsis_armcc.h:59
#define __IO
Definition: core_armv8mbl.h:196
#define CLEAR_BIT(REG, BIT)
Definition: stm32f3xx.h:192
#define SET_BIT(REG, BIT)
Definition: stm32f3xx.h:190
#define READ_BIT(REG, BIT)
Definition: stm32f3xx.h:194
#define RCC
Definition: stm32f303xe.h:977
CMSIS STM32F3xx Device Peripheral Access Layer Header File.