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
stm32fxxx_hal.h
00001 /** 00002 * @author Tilen Majerle 00003 * @email tilen@majerle.eu 00004 * @website http://stm32f4-discovery.com 00005 * @version v1.0 00006 * @license GNU GPL v3 00007 @verbatim 00008 ---------------------------------------------------------------------- 00009 Copyright (C) Tilen Majerle, 2015 00010 00011 This program is free software: you can redistribute it and/or modify 00012 it under the terms of the GNU General Public License as published by 00013 the Free Software Foundation, either version 3 of the License, or 00014 any later version. 00015 00016 This program is distributed in the hope that it will be useful, 00017 but WITHOUT ANY WARRANTY; without even the implied warranty of 00018 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00019 GNU General Public License for more details. 00020 00021 You should have received a copy of the GNU General Public License 00022 along with this program. If not, see <http://www.gnu.org/licenses/>. 00023 ---------------------------------------------------------------------- 00024 @endverbatim 00025 */ 00026 #ifndef TM_STM32Fxxx_H 00027 #define TM_STM32Fxxx_H 00028 00029 /* C++ detection */ 00030 #ifdef __cplusplus 00031 extern "C" { 00032 #endif 00033 00034 /** 00035 * @addtogroup TM_STM32Fxxx_HAL_Libraries 00036 * @{ 00037 * 00038 * 00039 * \par Beginning for libraries 00040 * 00041 * For start using these libraries, check @ref TM_HAL. 00042 */ 00043 00044 /** 00045 * @defgroup TM_HAL 00046 * @brief Main description and usage of TM HAL based libraries 00047 * @{ 00048 * 00049 * \par About libraries 00050 * 00051 * These libraries are provided by Tilen Majerle and are developed under GNU GPL v3 licence. For more information about that, please check website of license. 00052 * 00053 * To use it, I suppose you know C language and at least basics of STM32 devices (especially STM32F0, STM32F4 or STM32F7 series). 00054 * 00055 * \par Download libraries 00056 * 00057 * Download for all libraries is on this link: http://stm32f4-discovery.com/?wpdmdl=2618 00058 * 00059 * \par Examples 00060 * 00061 * Each library has Keil uVision based example on my Github account, https://github.com/MaJerle/stm32fxxx_hal_libraries. 00062 * 00063 * If you are beginner, then I suggest you to download entire repository from Github, install basic demo version of Keil uVision and open examples directly from download. 00064 * Almost all examples works with demo version of Keil uVision. 00065 * 00066 * \par Libraries structure 00067 * 00068 * Each library is structured in the same way where you have these parts: 00069 * - Header file: 00070 * - Library description with link on website 00071 * - Includes section 00072 * - Defines section for different configurations in library 00073 * - Enumerations and structures section 00074 * - Function declaration section 00075 * - Source file: 00076 * - Function implementations 00077 * 00078 * Each library includes at least these 2 files: 00079 * - stm32fxxx_hal.h file: 00080 * This file was done by me for better organization between several STM32 families to use with my libraries for future use. 00081 * It sets some basic defines, which can also be set using compiler's preprocessor defines. Check file for more information with detailed description. 00082 * 00083 * - defines.h file: 00084 * <b>This file is totally based on user and should also be created by user</b>. 00085 * 00086 * It is used for library configuration settings, so you don't have to edit library file. 00087 * If you edit library file, then if new version is out, it will be overwritten what you don't wanna have. 00088 * 00089 * Check example below for meaning. 00090 * 00091 \code 00092 //------------------------------------ 00093 //tm_stm32_exti.h file: 00094 //------------------------------------ 00095 //Content in this file is similar to this below: 00096 00097 //Include defines.h file for user configuration 00098 #include "defines.h" 00099 00100 //Set default NVIC preemption priority if not defined by user to 0x03 00101 #ifndef EXTI_NVIC_PRIORITY 00102 #define EXTI_NVIC_PRIORITY 0x03 00103 #endif 00104 00105 //------------------------------------ 00106 //defines.h file: (set by user) 00107 //------------------------------------ 00108 00109 //User wants to change that, use defines.h file like this: 00110 #ifndef DEFINES_FILE 00111 #define DEFINES_FILE 00112 00113 //Let's set EXTI NVIC preemption priority to highest, so we will do: 00114 #define EXTI_NVIC_PRIORITY 0x00 00115 00116 #endif 00117 \endcode 00118 * 00119 * Code above shows how you can use defines.h file to change default library settings. 00120 * 00121 * \par HAL Source from ST 00122 * 00123 * TM HAL libraries works on STM32Cube provided from ST and are not included in package of libraries. 00124 * 00125 * @note You have to go to ST website and download STM32Cube package for your family and use that STM32Fxxx_HAL_Drivers libraries in your project together with my libraries. 00126 * On my Github, you have example how they are used together. 00127 * 00128 * \par About defines.h file 00129 * 00130 * Please check above about this. 00131 * 00132 */ 00133 00134 /** 00135 * @defgroup TM_HAL_Family 00136 * @brief In stm32fxxx_hal.h file you have to specify STM32 family used for HAL drivers. 00137 * @{ 00138 */ 00139 00140 /* Defines for family used with libraries */ 00141 /* Uncomment line for your family used with HAL libraries */ 00142 //#define STM32F0xx /*!< Use STM32F0xx libraries */ 00143 //#define STM32F4xx /*!< Use STM32F4xx libraries */ 00144 #define STM32F7xx /*!< Use STM32F7xx libraries */ 00145 00146 /** 00147 * @} 00148 */ 00149 00150 /* Include project config file */ 00151 #include "defines.h" 00152 00153 /* Check if HAL drivers enabled */ 00154 #ifndef USE_HAL_DRIVER 00155 #define USE_HAL_DRIVER 00156 #endif 00157 00158 /* Include proper header file */ 00159 /* STM32F7xx */ 00160 #if defined(STM32F0xx) || defined(STM32F0XX) 00161 #ifndef STM32F0xx 00162 #define STM32F0xx 00163 #endif 00164 #ifndef STM32F0XX 00165 #define STM32F0XX 00166 #endif 00167 #include "stm32f0xx.h" 00168 #include "stm32f0xx_hal.h" 00169 #endif 00170 00171 /* STM32F4xx */ 00172 #if defined(STM32F4xx) || defined(STM32F4XX) 00173 #ifndef STM32F4xx 00174 #define STM32F4xx 00175 #endif 00176 #ifndef STM32F4XX 00177 #define STM32F4XX 00178 #endif 00179 #include "stm32f4xx.h" 00180 #include "stm32f4xx_hal.h" 00181 #endif 00182 00183 /* STM32F7xx */ 00184 #if defined(STM32F7xx) || defined(STM32F7XX) 00185 #ifndef STM32F7xx 00186 #define STM32F7xx 00187 #endif 00188 #ifndef STM32F7XX 00189 #define STM32F7XX 00190 #endif 00191 #include "stm32f7xx.h" 00192 #include "stm32f7xx_hal.h" 00193 #endif 00194 00195 /* Check if anything defined */ 00196 #if !defined(STM32F0xx) && !defined(STM32F4xx) && !defined(STM32F7xx) 00197 #error "There is not selected STM32 family used. Check stm32fxxx_hal.h file for configuration!" 00198 #endif 00199 00200 /* Init main libraries used everywhere */ 00201 #include "defines.h" 00202 #include "tm_stm32_rcc.h" 00203 #include "tm_stm32_gpio.h" 00204 00205 /** 00206 * @} 00207 */ 00208 00209 /** 00210 * @} 00211 */ 00212 00213 /* C++ detection */ 00214 #ifdef __cplusplus 00215 } 00216 #endif 00217 00218 #endif
Generated on Tue Jul 12 2022 21:40:04 by 1.7.2