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
STMLIBRARIES/tm_stm32_rcc.h@14:2044ad5cd3fe, 2016-02-21 (annotated)
- Committer:
- the_sz
- Date:
- Sun Feb 21 04:26:17 2016 +0000
- Revision:
- 14:2044ad5cd3fe
- Parent:
- 12:a89096944f20
all fonts are working
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
the_sz | 12:a89096944f20 | 1 | /** |
the_sz | 12:a89096944f20 | 2 | * @author Tilen Majerle |
the_sz | 12:a89096944f20 | 3 | * @email tilen@majerle.eu |
the_sz | 12:a89096944f20 | 4 | * @website http://stm32f4-discovery.com |
the_sz | 12:a89096944f20 | 5 | * @link http://stm32f4-discovery.com/2015/07/hal-library-01-rcc-for-stm32fxxx/ |
the_sz | 12:a89096944f20 | 6 | * @version v1.1 |
the_sz | 12:a89096944f20 | 7 | * @ide Keil uVision |
the_sz | 12:a89096944f20 | 8 | * @license GNU GPL v3 |
the_sz | 12:a89096944f20 | 9 | * @brief RCC Library for STM32F4xx and STM32F7xx devices |
the_sz | 12:a89096944f20 | 10 | * |
the_sz | 12:a89096944f20 | 11 | \verbatim |
the_sz | 12:a89096944f20 | 12 | ---------------------------------------------------------------------- |
the_sz | 12:a89096944f20 | 13 | Copyright (C) Tilen Majerle, 2015 |
the_sz | 12:a89096944f20 | 14 | |
the_sz | 12:a89096944f20 | 15 | This program is free software: you can redistribute it and/or modify |
the_sz | 12:a89096944f20 | 16 | it under the terms of the GNU General Public License as published by |
the_sz | 12:a89096944f20 | 17 | the Free Software Foundation, either version 3 of the License, or |
the_sz | 12:a89096944f20 | 18 | any later version. |
the_sz | 12:a89096944f20 | 19 | |
the_sz | 12:a89096944f20 | 20 | This program is distributed in the hope that it will be useful, |
the_sz | 12:a89096944f20 | 21 | but WITHOUT ANY WARRANTY; without even the implied warranty of |
the_sz | 12:a89096944f20 | 22 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
the_sz | 12:a89096944f20 | 23 | GNU General Public License for more details. |
the_sz | 12:a89096944f20 | 24 | |
the_sz | 12:a89096944f20 | 25 | You should have received a copy of the GNU General Public License |
the_sz | 12:a89096944f20 | 26 | along with this program. If not, see <http://www.gnu.org/licenses/>. |
the_sz | 12:a89096944f20 | 27 | ---------------------------------------------------------------------- |
the_sz | 12:a89096944f20 | 28 | \endverbatim |
the_sz | 12:a89096944f20 | 29 | */ |
the_sz | 12:a89096944f20 | 30 | #ifndef TM_RCC_H |
the_sz | 12:a89096944f20 | 31 | #define TM_RCC_H 110 |
the_sz | 12:a89096944f20 | 32 | |
the_sz | 12:a89096944f20 | 33 | /* C++ detection */ |
the_sz | 12:a89096944f20 | 34 | #ifdef __cplusplus |
the_sz | 12:a89096944f20 | 35 | extern "C" { |
the_sz | 12:a89096944f20 | 36 | #endif |
the_sz | 12:a89096944f20 | 37 | |
the_sz | 12:a89096944f20 | 38 | /** |
the_sz | 12:a89096944f20 | 39 | * @addtogroup TM_STM32Fxxx_HAL_Libraries |
the_sz | 12:a89096944f20 | 40 | * @{ |
the_sz | 12:a89096944f20 | 41 | */ |
the_sz | 12:a89096944f20 | 42 | |
the_sz | 12:a89096944f20 | 43 | /** |
the_sz | 12:a89096944f20 | 44 | * @defgroup TM_RCC |
the_sz | 12:a89096944f20 | 45 | * @brief RCC Library for STM32Fxxx - http://stm32f4-discovery.com/2015/07/hal-library-01-rcc-for-stm32fxxx/ |
the_sz | 12:a89096944f20 | 46 | * @{ |
the_sz | 12:a89096944f20 | 47 | * |
the_sz | 12:a89096944f20 | 48 | * 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. |
the_sz | 12:a89096944f20 | 49 | * |
the_sz | 12:a89096944f20 | 50 | * @note In case of STM32F7xx is used, this library also enables CACHE for Instructions and Data. |
the_sz | 12:a89096944f20 | 51 | * |
the_sz | 12:a89096944f20 | 52 | * \par Changelog |
the_sz | 12:a89096944f20 | 53 | * |
the_sz | 12:a89096944f20 | 54 | \verbatim |
the_sz | 12:a89096944f20 | 55 | Version 1.0 |
the_sz | 12:a89096944f20 | 56 | - Initial release |
the_sz | 12:a89096944f20 | 57 | |
the_sz | 12:a89096944f20 | 58 | Version 1.1 |
the_sz | 12:a89096944f20 | 59 | - October 10, 2015 |
the_sz | 12:a89096944f20 | 60 | - Added support for STM32F469 devices |
the_sz | 12:a89096944f20 | 61 | \endverbatim |
the_sz | 12:a89096944f20 | 62 | * |
the_sz | 12:a89096944f20 | 63 | * \par Dependencies |
the_sz | 12:a89096944f20 | 64 | * |
the_sz | 12:a89096944f20 | 65 | \verbatim |
the_sz | 12:a89096944f20 | 66 | - STM32Fxxx HAL |
the_sz | 12:a89096944f20 | 67 | - defines.h |
the_sz | 12:a89096944f20 | 68 | \endverbatim |
the_sz | 12:a89096944f20 | 69 | */ |
the_sz | 12:a89096944f20 | 70 | #include "stm32fxxx_hal.h" |
the_sz | 12:a89096944f20 | 71 | #include "defines.h" |
the_sz | 12:a89096944f20 | 72 | |
the_sz | 12:a89096944f20 | 73 | /** |
the_sz | 12:a89096944f20 | 74 | * @defgroup TM_RCC_Macros |
the_sz | 12:a89096944f20 | 75 | * @brief RCC Library macros |
the_sz | 12:a89096944f20 | 76 | * @{ |
the_sz | 12:a89096944f20 | 77 | */ |
the_sz | 12:a89096944f20 | 78 | |
the_sz | 12:a89096944f20 | 79 | /* Set default values if not defined by user */ |
the_sz | 12:a89096944f20 | 80 | #if !defined(RCC_OSCILLATORTYPE) || !defined(RCC_PLLM) || !defined(RCC_PLLN) || !defined(RCC_PLLP) || !defined(RCC_PLLQ) |
the_sz | 12:a89096944f20 | 81 | #define RCC_OSCILLATORTYPE RCC_OSCILLATORTYPE_HSE |
the_sz | 12:a89096944f20 | 82 | #define RCC_PLLM 8 |
the_sz | 12:a89096944f20 | 83 | #define RCC_PLLN 360 |
the_sz | 12:a89096944f20 | 84 | #define RCC_PLLP 2 |
the_sz | 12:a89096944f20 | 85 | #define RCC_PLLQ 7 |
the_sz | 12:a89096944f20 | 86 | #endif |
the_sz | 12:a89096944f20 | 87 | |
the_sz | 12:a89096944f20 | 88 | /** |
the_sz | 12:a89096944f20 | 89 | * @} |
the_sz | 12:a89096944f20 | 90 | */ |
the_sz | 12:a89096944f20 | 91 | |
the_sz | 12:a89096944f20 | 92 | /** |
the_sz | 12:a89096944f20 | 93 | * @defgroup TM_RCC_Typedefs |
the_sz | 12:a89096944f20 | 94 | * @brief RCC Typedefs used for RCC library for initialization purposes |
the_sz | 12:a89096944f20 | 95 | * @{ |
the_sz | 12:a89096944f20 | 96 | */ |
the_sz | 12:a89096944f20 | 97 | |
the_sz | 12:a89096944f20 | 98 | /** |
the_sz | 12:a89096944f20 | 99 | * @brief RCC result enumeration |
the_sz | 12:a89096944f20 | 100 | */ |
the_sz | 12:a89096944f20 | 101 | typedef enum { |
the_sz | 12:a89096944f20 | 102 | TM_RCC_Result_Ok = 0x00, /*!< Everything OK */ |
the_sz | 12:a89096944f20 | 103 | TM_RCC_Result_Error /*!< An error occurred */ |
the_sz | 12:a89096944f20 | 104 | } TM_RCC_Result_t; |
the_sz | 12:a89096944f20 | 105 | |
the_sz | 12:a89096944f20 | 106 | /** |
the_sz | 12:a89096944f20 | 107 | * @} TM_RCC_Typedefs |
the_sz | 12:a89096944f20 | 108 | */ |
the_sz | 12:a89096944f20 | 109 | |
the_sz | 12:a89096944f20 | 110 | /** |
the_sz | 12:a89096944f20 | 111 | * @defgroup TM_RCC_Functions |
the_sz | 12:a89096944f20 | 112 | * @brief RCC Functions |
the_sz | 12:a89096944f20 | 113 | * @{ |
the_sz | 12:a89096944f20 | 114 | */ |
the_sz | 12:a89096944f20 | 115 | |
the_sz | 12:a89096944f20 | 116 | /** |
the_sz | 12:a89096944f20 | 117 | * @brief Initializes system clocks |
the_sz | 12:a89096944f20 | 118 | * @note This function should be called on the start of main program |
the_sz | 12:a89096944f20 | 119 | * @note When STM32F7xx target is used, D and I caches are also enabled with this function |
the_sz | 12:a89096944f20 | 120 | * @param None |
the_sz | 12:a89096944f20 | 121 | * @retval RCC System status |
the_sz | 12:a89096944f20 | 122 | */ |
the_sz | 12:a89096944f20 | 123 | TM_RCC_Result_t TM_RCC_InitSystem(void); |
the_sz | 12:a89096944f20 | 124 | |
the_sz | 12:a89096944f20 | 125 | /** |
the_sz | 12:a89096944f20 | 126 | * @} |
the_sz | 12:a89096944f20 | 127 | */ |
the_sz | 12:a89096944f20 | 128 | /** |
the_sz | 12:a89096944f20 | 129 | * @} |
the_sz | 12:a89096944f20 | 130 | */ |
the_sz | 12:a89096944f20 | 131 | /** |
the_sz | 12:a89096944f20 | 132 | * @} |
the_sz | 12:a89096944f20 | 133 | */ |
the_sz | 12:a89096944f20 | 134 | |
the_sz | 12:a89096944f20 | 135 | /* C++ detection */ |
the_sz | 12:a89096944f20 | 136 | #ifdef __cplusplus |
the_sz | 12:a89096944f20 | 137 | } |
the_sz | 12:a89096944f20 | 138 | #endif |
the_sz | 12:a89096944f20 | 139 | |
the_sz | 12:a89096944f20 | 140 | #endif |