Wakeup Light with touch user interface, anti-aliased Font, SD card access and RTC usage on STM32F746NG-DISCO board

Dependencies:   BSP_DISCO_F746NG_patch_fixed LCD_DISCO_F746NG TS_DISCO_F746NG FATFileSystem TinyJpgDec_interwork mbed-src

Embed: (wiki syntax)

« Back to documentation index

Show/hide line numbers tm_stm32_rcc.h Source File

tm_stm32_rcc.h

00001 /** 
00002  * @author  Tilen Majerle
00003  * @email   tilen@majerle.eu
00004  * @website http://stm32f4-discovery.com
00005  * @link    http://stm32f4-discovery.com/2015/07/hal-library-01-rcc-for-stm32fxxx/
00006  * @version v1.1
00007  * @ide     Keil uVision
00008  * @license GNU GPL v3
00009  * @brief   RCC Library for STM32F4xx and STM32F7xx devices
00010  *
00011 \verbatim
00012    ----------------------------------------------------------------------
00013     Copyright (C) Tilen Majerle, 2015
00014     
00015     This program is free software: you can redistribute it and/or modify
00016     it under the terms of the GNU General Public License as published by
00017     the Free Software Foundation, either version 3 of the License, or
00018     any later version.
00019      
00020     This program is distributed in the hope that it will be useful,
00021     but WITHOUT ANY WARRANTY; without even the implied warranty of
00022     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00023     GNU General Public License for more details.
00024     
00025     You should have received a copy of the GNU General Public License
00026     along with this program.  If not, see <http://www.gnu.org/licenses/>.
00027    ----------------------------------------------------------------------
00028 \endverbatim
00029  */
00030 #ifndef TM_RCC_H
00031 #define TM_RCC_H 110
00032 
00033 /* C++ detection */
00034 #ifdef __cplusplus
00035 extern "C" {
00036 #endif
00037     
00038 /**
00039  * @addtogroup TM_STM32Fxxx_HAL_Libraries
00040  * @{
00041  */
00042 
00043 /**
00044  * @defgroup TM_RCC
00045  * @brief    RCC Library for STM32Fxxx - http://stm32f4-discovery.com/2015/07/hal-library-01-rcc-for-stm32fxxx/
00046  * @{
00047  *
00048  * RCC library provides initialization of clock at the beginning. Function @ref TM_RCC_InitSystem should be called at beginning of @ref main function to initialize system.
00049  *
00050  * @note  In case of STM32F7xx is used, this library also enables CACHE for Instructions and Data.
00051  *
00052  * \par Changelog
00053  *
00054 \verbatim
00055  Version 1.0
00056   - Initial release
00057 
00058  Version 1.1
00059   - October 10, 2015
00060   - Added support for STM32F469 devices
00061 \endverbatim
00062  *
00063  * \par Dependencies
00064  *
00065 \verbatim
00066  - STM32Fxxx HAL
00067  - defines.h
00068 \endverbatim
00069  */
00070 #include "stm32fxxx_hal.h"
00071 #include "defines.h"
00072 
00073 /**
00074  * @defgroup TM_RCC_Macros
00075  * @brief    RCC Library macros
00076  * @{
00077  */
00078 
00079 /* Set default values if not defined by user */
00080 #if !defined(RCC_OSCILLATORTYPE) || !defined(RCC_PLLM) || !defined(RCC_PLLN) || !defined(RCC_PLLP) || !defined(RCC_PLLQ) 
00081 #define RCC_OSCILLATORTYPE    RCC_OSCILLATORTYPE_HSE
00082 #define RCC_PLLM              8
00083 #define RCC_PLLN              360
00084 #define RCC_PLLP              2
00085 #define RCC_PLLQ              7
00086 #endif
00087 
00088 /**
00089  * @}
00090  */
00091 
00092 /**
00093  * @defgroup TM_RCC_Typedefs
00094  * @brief    RCC Typedefs used for RCC library for initialization purposes
00095  * @{
00096  */
00097 
00098 /**
00099  * @brief  RCC result enumeration
00100  */
00101 typedef enum {
00102     TM_RCC_Result_Ok  = 0x00, /*!< Everything OK */
00103     TM_RCC_Result_Error       /*!< An error occurred */
00104 } TM_RCC_Result_t;
00105 
00106 /**
00107  * @} TM_RCC_Typedefs
00108  */
00109 
00110 /**
00111  * @defgroup TM_RCC_Functions
00112  * @brief    RCC Functions
00113  * @{
00114  */
00115 
00116 /**
00117  * @brief  Initializes system clocks
00118  * @note   This function should be called on the start of main program
00119  * @note   When STM32F7xx target is used, D and I caches are also enabled with this function
00120  * @param  None
00121  * @retval RCC System status
00122  */
00123 TM_RCC_Result_t TM_RCC_InitSystem(void);
00124 
00125 /**
00126  * @}
00127  */
00128 /**
00129  * @}
00130  */
00131 /**
00132  * @}
00133  */
00134 
00135 /* C++ detection */
00136 #ifdef __cplusplus
00137 }
00138 #endif
00139 
00140 #endif