stm32f1xx_HBL/drivers/rcc.h
Steins7 dd6d5fbdd1 Implement RCC's clock configuration
For now, flash configuration is hard-coded. This will fixed in future
commits
2023-03-22 23:30:29 +01:00

39 lines
893 B
C

/** @file rcc.h
* Module handling Reset and Clocks Control (RCC).
*
* The module provides functions to configure clocks according to presets as
* well as to enable/disable/reset peripherals.
*/
#ifndef _RCC_H_
#define _RCC_H_
//--includes--------------------------------------------------------------------
#include "stdint.h"
//--type definitions------------------------------------------------------------
/**
* Available clock configuration presets
*/
enum RccPreset {
RCC_PRESET_DEFAULT, //sane values, identical to reset config
RCC_PRESET_SPEED, //highest clocks, uses 8MHz HSE if available
};
//--functions-------------------------------------------------------------------
/**
* Configures the clocks and buses according to the given preset.
*
* @param preset the preset to use for configuration
*/
void rcc_configure(enum RccPreset preset);
#endif //_RCC_H_