STM32 Blue Pill Drivers
Drivers that could be used to interface and interact with STM32F103C8T6 Microcontroller
|
This file contains the implementation for the RCC module. More...
#include "../../LIB/LSTD_TYPES.h"
#include "../../LIB/LSTD_BITMATH.h"
#include "../../LIB/LSTD_COMPILER.h"
#include "../../LIB/LSTD_VALUES.h"
#include "RCC_private.h"
#include "RCC_interface.h"
#include "RCC_config.h"
Functions | |
static void | RCC_vInitHSEClock (void) |
This function initializes the HSE clock. More... | |
static void | RCC_vInitHSIClock (void) |
This function initializes the HSI clock. More... | |
static void | RCC_vInitPLL (void) |
This function initializes the PLL clock. More... | |
static void | RCC_vInitSystemClock (void) |
This function initializes the system clock. More... | |
static void | RCC_vInitMCO (void) |
This function initializes the MCO. More... | |
static void | RCC_vSetAPB2PeripheralClockStatus (t_RCC_APB2Peripherals enuPeripheral, t_bool bStatus) |
This function initializes a certain peripheral clock on APB2 bus. More... | |
static void | RCC_vSetAPB1PeripheralClockStatus (t_RCC_APB1Peripherals enuPeripheral, t_bool bStatus) |
This function initializes a certain peripheral clock on APB1 bus. More... | |
static void | RCC_vSetAHBPeripheralClockStatus (t_RCC_AHBPeripherals enuPeripheral, t_bool bStatus) |
This function initializes a certain peripheral clock on AHB bus. More... | |
static void | RCC_vSetADCPreScaler (void) |
This function sets the ADC prescaler. More... | |
static void | RCC_vSetUSBPrescaler (void) |
This function sets the USB prescaler. More... | |
static void | RCC_vSetAHBPrescaler (void) |
This function sets the AHB prescaler. More... | |
static void | RCC_vSetAPB1Prescaler (void) |
This function sets the APB1 prescaler. More... | |
static void | RCC_vSetAPB2Prescaler (void) |
This function sets the APB2 prescaler. More... | |
void | RCC_vInit (void) |
This function initializes the RCC peripheral. More... | |
void | RCC_vEnablePeripheralABP2 (t_RCC_APB2Peripherals enuPeripheral) |
This function enables the clock of a peripheral connected to the APB2 bus. More... | |
void | RCC_vDisablePeripheralABP2 (t_RCC_APB2Peripherals enuPeripheral) |
This function disables the clock of a peripheral connected to the APB2 bus. More... | |
void | RCC_vEnablePeripheralABP1 (t_RCC_APB1Peripherals enuPeripheral) |
This function enables the clock of a peripheral connected to the APB1 bus. More... | |
void | RCC_vDisablePeripheralABP1 (t_RCC_APB1Peripherals enuPeripheral) |
This function disables the clock of a peripheral connected to the APB1 bus. More... | |
void | RCC_vEnablePeripheralAHB (t_RCC_AHBPeripherals enuPeripheral) |
This function enables the clock of a peripheral connected to the AHB bus. More... | |
void | RCC_vDisablePeripheralAHB (t_RCC_AHBPeripherals enuPeripheral) |
This function disables the clock of a peripheral connected to the AHB bus. More... | |
This file contains the implementation for the RCC module.
This file contains the implementation for the RCC module.
|
static |
This function initializes the HSE clock.
This function initializes the HSE clock and waits until it is ready
References FALSE, RCC, RCC_ENABLE_CSS, and TRUE.
Referenced by RCC_vInit(), and RCC_vInitPLL().
|
static |
This function initializes the HSI clock.
This function initializes the HSI clock and waits until it is ready
References FALSE, RCC, and TRUE.
Referenced by RCC_vInit(), and RCC_vInitPLL().
|
static |
This function initializes the PLL clock.
This function initializes the PLL clock and waits until it is ready
References FALSE, RCC, RCC_PLL_HSE_DIVIDE_BY_2, RCC_PLL_MUL, RCC_PLL_SRC, RCC_PLLSource_HSE, RCC_PLLSource_HSI_DividedBy2, RCC_vInitHSEClock(), RCC_vInitHSIClock(), and TRUE.
Referenced by RCC_vInit().
|
static |
This function initializes the system clock.
This function initializes the system clock
References RCC, and RCC_SYSTEM_CLOCK_SOURCE.
Referenced by RCC_vInit().
|
static |
This function initializes the MCO.
This function initializes the MCO (Microcontroller Clock Output) and waits until it is ready
References RCC, and RCC_MCO_SOURCE.
Referenced by RCC_vInit().
|
static |
This function initializes a certain peripheral clock on APB2 bus.
This function initializes a certain peripheral clock on APB2 bus
[in] | enuPeripheral | Peripheral to enable/disable its clock |
[in] | bStatus | Enable/Disable peripheral clock |
References RCC_APB2Peripherals_ADC1, RCC_APB2Peripherals_ADC2, RCC_APB2Peripherals_ADC3, RCC_APB2Peripherals_AFIO, RCC_APB2Peripherals_PORTA, RCC_APB2Peripherals_PORTB, RCC_APB2Peripherals_PORTC, RCC_APB2Peripherals_PORTD, RCC_APB2Peripherals_PORTE, RCC_APB2Peripherals_PORTF, RCC_APB2Peripherals_PORTG, RCC_APB2Peripherals_SPI1, RCC_APB2Peripherals_TIM1, RCC_APB2Peripherals_USART1, and RCC_SET_REGISTER_BIT_STATUS.
Referenced by RCC_vDisablePeripheralABP2(), and RCC_vEnablePeripheralABP2().
|
static |
This function initializes a certain peripheral clock on APB1 bus.
This function initializes a certain peripheral clock on APB1 bus
[in] | enuPeripheral | Peripheral to enable/disable its clock |
[in] | bStatus | Enable/Disable peripheral clock |
References RCC_APB1Peripherals_BKP, RCC_APB1Peripherals_CAN, RCC_APB1Peripherals_DAC, RCC_APB1Peripherals_I2C1, RCC_APB1Peripherals_I2C2, RCC_APB1Peripherals_PWR, RCC_APB1Peripherals_SPI2, RCC_APB1Peripherals_SPI3, RCC_APB1Peripherals_TIM2, RCC_APB1Peripherals_TIM3, RCC_APB1Peripherals_TIM4, RCC_APB1Peripherals_TIM5, RCC_APB1Peripherals_TIM6, RCC_APB1Peripherals_TIM7, RCC_APB1Peripherals_UART4, RCC_APB1Peripherals_UART5, RCC_APB1Peripherals_USART2, RCC_APB1Peripherals_USART3, RCC_APB1Peripherals_USB, RCC_APB1Peripherals_WWDG, and RCC_SET_REGISTER_BIT_STATUS.
Referenced by RCC_vDisablePeripheralABP1(), and RCC_vEnablePeripheralABP1().
|
static |
This function initializes a certain peripheral clock on AHB bus.
This function initializes a certain peripheral clock on AHB bus
[in] | enuPeripheral | Peripheral to enable/disable its clock |
[in] | bStatus | Enable/Disable peripheral clock |
References RCC_AHBPeripherals_CRC, RCC_AHBPeripherals_DMA1, RCC_AHBPeripherals_DMA2, and RCC_SET_REGISTER_BIT_STATUS.
Referenced by RCC_vDisablePeripheralAHB(), and RCC_vEnablePeripheralAHB().
|
static |
This function sets the ADC prescaler.
This function sets the ADC prescaler to be used by ADC
References RCC, and RCC_ADC_PRESCALER.
Referenced by RCC_vInit().
|
static |
This function sets the USB prescaler.
This function sets the USB prescaler to be used by USB
References RCC, and RCC_USB_PRESCALER.
Referenced by RCC_vInit().
|
static |
This function sets the AHB prescaler.
This function sets the AHB prescaler to be used by AHB bus
References RCC, and RCC_AHB_PRESCALER.
Referenced by RCC_vInit().
|
static |
This function sets the APB1 prescaler.
This function sets the APB1 prescaler to be used by APB1 bus
References RCC, and RCC_APB1_PRESCALER.
Referenced by RCC_vInit().
|
static |
This function sets the APB2 prescaler.
This function sets the APB2 prescaler to be used by APB2 bus
References RCC, and RCC_APB2_PRESCALER.
Referenced by RCC_vInit().