DHT11

Committer:
jhon309
Date:
Thu Aug 13 00:21:57 2015 +0000
Revision:
0:c52df770855b
DHT11

Who changed what in which revision?

UserRevisionLine numberNew contents of line
jhon309 0:c52df770855b 1 /**
jhon309 0:c52df770855b 2 ******************************************************************************
jhon309 0:c52df770855b 3 * @file stm32f0xx_hal_flash_ex.h
jhon309 0:c52df770855b 4 * @author MCD Application Team
jhon309 0:c52df770855b 5 * @version V1.2.0
jhon309 0:c52df770855b 6 * @date 11-December-2014
jhon309 0:c52df770855b 7 * @brief Header file of FLASH HAL Extension module.
jhon309 0:c52df770855b 8 ******************************************************************************
jhon309 0:c52df770855b 9 * @attention
jhon309 0:c52df770855b 10 *
jhon309 0:c52df770855b 11 * <h2><center>&copy; COPYRIGHT(c) 2014 STMicroelectronics</center></h2>
jhon309 0:c52df770855b 12 *
jhon309 0:c52df770855b 13 * Redistribution and use in source and binary forms, with or without modification,
jhon309 0:c52df770855b 14 * are permitted provided that the following conditions are met:
jhon309 0:c52df770855b 15 * 1. Redistributions of source code must retain the above copyright notice,
jhon309 0:c52df770855b 16 * this list of conditions and the following disclaimer.
jhon309 0:c52df770855b 17 * 2. Redistributions in binary form must reproduce the above copyright notice,
jhon309 0:c52df770855b 18 * this list of conditions and the following disclaimer in the documentation
jhon309 0:c52df770855b 19 * and/or other materials provided with the distribution.
jhon309 0:c52df770855b 20 * 3. Neither the name of STMicroelectronics nor the names of its contributors
jhon309 0:c52df770855b 21 * may be used to endorse or promote products derived from this software
jhon309 0:c52df770855b 22 * without specific prior written permission.
jhon309 0:c52df770855b 23 *
jhon309 0:c52df770855b 24 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
jhon309 0:c52df770855b 25 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
jhon309 0:c52df770855b 26 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
jhon309 0:c52df770855b 27 * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
jhon309 0:c52df770855b 28 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
jhon309 0:c52df770855b 29 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
jhon309 0:c52df770855b 30 * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
jhon309 0:c52df770855b 31 * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
jhon309 0:c52df770855b 32 * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
jhon309 0:c52df770855b 33 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
jhon309 0:c52df770855b 34 *
jhon309 0:c52df770855b 35 ******************************************************************************
jhon309 0:c52df770855b 36 */
jhon309 0:c52df770855b 37
jhon309 0:c52df770855b 38 /* Define to prevent recursive inclusion -------------------------------------*/
jhon309 0:c52df770855b 39 #ifndef __STM32F0xx_HAL_FLASH_EX_H
jhon309 0:c52df770855b 40 #define __STM32F0xx_HAL_FLASH_EX_H
jhon309 0:c52df770855b 41
jhon309 0:c52df770855b 42 #ifdef __cplusplus
jhon309 0:c52df770855b 43 extern "C" {
jhon309 0:c52df770855b 44 #endif
jhon309 0:c52df770855b 45
jhon309 0:c52df770855b 46 /* Includes ------------------------------------------------------------------*/
jhon309 0:c52df770855b 47 #include "stm32f0xx_hal_def.h"
jhon309 0:c52df770855b 48
jhon309 0:c52df770855b 49 /** @addtogroup STM32F0xx_HAL_Driver
jhon309 0:c52df770855b 50 * @{
jhon309 0:c52df770855b 51 */
jhon309 0:c52df770855b 52
jhon309 0:c52df770855b 53 /** @addtogroup FLASHEx
jhon309 0:c52df770855b 54 * @{
jhon309 0:c52df770855b 55 */
jhon309 0:c52df770855b 56
jhon309 0:c52df770855b 57 /* Exported types ------------------------------------------------------------*/
jhon309 0:c52df770855b 58 /* Exported constants --------------------------------------------------------*/
jhon309 0:c52df770855b 59 /** @defgroup FLASHEx_Exported_Constants FLASHEx Exported Constants
jhon309 0:c52df770855b 60 * @{
jhon309 0:c52df770855b 61 */
jhon309 0:c52df770855b 62 /** @defgroup FLASHEx_Address FLASHEx Address
jhon309 0:c52df770855b 63 * @{
jhon309 0:c52df770855b 64 */
jhon309 0:c52df770855b 65 #if defined(STM32F030x6) || defined(STM32F031x6) || defined(STM32F042x6) || defined(STM32F048xx) || defined(STM32F038xx) || defined(STM32F070x6)
jhon309 0:c52df770855b 66 #define IS_FLASH_PROGRAM_ADDRESS(ADDRESS) (((ADDRESS) >= 0x08000000) && ((ADDRESS) <= 0x08007FFF))
jhon309 0:c52df770855b 67 #endif /* STM32F030x6 || STM32F031x6 || STM32F042x6 || STM32F048xx || STM32F038xx || STM32F070x6 */
jhon309 0:c52df770855b 68
jhon309 0:c52df770855b 69 #if defined(STM32F030x8) || defined(STM32F051x8) || defined(STM32F058xx)
jhon309 0:c52df770855b 70 #define IS_FLASH_PROGRAM_ADDRESS(ADDRESS) (((ADDRESS) >= 0x08000000) && ((ADDRESS) <= 0x0800FFFF))
jhon309 0:c52df770855b 71 #endif /* STM32F030x8 || STM32F051x8 || STM32F058xx */
jhon309 0:c52df770855b 72
jhon309 0:c52df770855b 73 #if defined(STM32F071xB) || defined(STM32F072xB) || defined(STM32F078xx) || defined(STM32F070xB)
jhon309 0:c52df770855b 74 #define IS_FLASH_PROGRAM_ADDRESS(ADDRESS) (((ADDRESS) >= 0x08000000) && ((ADDRESS) <= 0x0801FFFF))
jhon309 0:c52df770855b 75 #endif /* STM32F071xB || STM32F072xB || STM32F078xx || STM32F070xB*/
jhon309 0:c52df770855b 76
jhon309 0:c52df770855b 77 #if defined(STM32F091xC) || defined(STM32F098xx) || defined(STM32F030xC)
jhon309 0:c52df770855b 78 #define IS_FLASH_PROGRAM_ADDRESS(ADDRESS) (((ADDRESS) >= 0x08000000) && ((ADDRESS) <= 0x0803FFFF))
jhon309 0:c52df770855b 79 #endif /* STM32F091xC || STM32F098xx || STM32F030xC*/
jhon309 0:c52df770855b 80 /**
jhon309 0:c52df770855b 81 * @}
jhon309 0:c52df770855b 82 */
jhon309 0:c52df770855b 83
jhon309 0:c52df770855b 84 /** @defgroup FLASHEx_Page_Size FLASHEx Page Size
jhon309 0:c52df770855b 85 * @{
jhon309 0:c52df770855b 86 */
jhon309 0:c52df770855b 87 #if defined(STM32F030x6) || defined(STM32F030x8) || defined(STM32F031x6) || defined(STM32F038xx) || \
jhon309 0:c52df770855b 88 defined(STM32F051x8) || defined(STM32F042x6) || defined(STM32F048xx) || defined(STM32F058xx) || defined(STM32F070x6)
jhon309 0:c52df770855b 89 #define FLASH_PAGE_SIZE 0x400
jhon309 0:c52df770855b 90 #endif /* STM32F030x6 || STM32F030x8 || STM32F031x6 || STM32F051x8 || STM32F042x6 || STM32F048xx || STM32F058xx || STM32F070x6 */
jhon309 0:c52df770855b 91
jhon309 0:c52df770855b 92 #if defined(STM32F071xB) || defined(STM32F072xB) || defined(STM32F078xx) || defined(STM32F070xB) || \
jhon309 0:c52df770855b 93 defined(STM32F091xC) || defined(STM32F098xx) || defined(STM32F030xC)
jhon309 0:c52df770855b 94 #define FLASH_PAGE_SIZE 0x800
jhon309 0:c52df770855b 95 #endif /* STM32F071xB || STM32F072xB || STM32F078xx || STM32F091xC || STM32F098xx || STM32F030xC */
jhon309 0:c52df770855b 96
jhon309 0:c52df770855b 97 /**
jhon309 0:c52df770855b 98 * @}
jhon309 0:c52df770855b 99 */
jhon309 0:c52df770855b 100
jhon309 0:c52df770855b 101 /** @defgroup FLASHEx_Nb_Pages FLASHEx Nb Pages
jhon309 0:c52df770855b 102 * @{
jhon309 0:c52df770855b 103 */
jhon309 0:c52df770855b 104 #if defined(STM32F030x6) || defined(STM32F031x6) || defined(STM32F042x6) || defined(STM32F048xx) || defined(STM32F038xx)|| defined(STM32F070x6)
jhon309 0:c52df770855b 105 #define IS_FLASH_NB_PAGES(ADDRESS,NBPAGES) ((ADDRESS)+((NBPAGES)*FLASH_PAGE_SIZE)-1 <= 0x08007FFF)
jhon309 0:c52df770855b 106 #endif /* STM32F030x6 || STM32F031x6 || STM32F042x6 || STM32F048xx || STM32F038xx || STM32F070x6 */
jhon309 0:c52df770855b 107
jhon309 0:c52df770855b 108 #if defined(STM32F030x8) || defined(STM32F051x8) || defined(STM32F058xx)
jhon309 0:c52df770855b 109 #define IS_FLASH_NB_PAGES(ADDRESS,NBPAGES) ((ADDRESS)+((NBPAGES)*FLASH_PAGE_SIZE)-1 <= 0x0800FFFF)
jhon309 0:c52df770855b 110 #endif /* STM32F030x8 || STM32F051x8 || STM32F058xx */
jhon309 0:c52df770855b 111
jhon309 0:c52df770855b 112 #if defined(STM32F071xB) || defined(STM32F072xB) || defined(STM32F078xx) || defined(STM32F070xB)
jhon309 0:c52df770855b 113 #define IS_FLASH_NB_PAGES(ADDRESS,NBPAGES) ((ADDRESS)+((NBPAGES)*FLASH_PAGE_SIZE)-1 <= 0x0801FFFF)
jhon309 0:c52df770855b 114 #endif /* STM32F071xB || STM32F072xB || STM32F078xx || STM32F070xB */
jhon309 0:c52df770855b 115
jhon309 0:c52df770855b 116 #if defined(STM32F091xC) || defined(STM32F098xx) || defined(STM32F030xC)
jhon309 0:c52df770855b 117 #define IS_FLASH_NB_PAGES(ADDRESS,NBPAGES) ((ADDRESS)+((NBPAGES)*FLASH_PAGE_SIZE)-1 <= 0x0803FFFF)
jhon309 0:c52df770855b 118 #endif /* STM32F091xC || STM32F098xx || STM32F030xC */
jhon309 0:c52df770855b 119 /**
jhon309 0:c52df770855b 120 * @}
jhon309 0:c52df770855b 121 */
jhon309 0:c52df770855b 122
jhon309 0:c52df770855b 123 /** @defgroup FLASHEx_OB_Write_Protection FLASHEx OB Write Protection
jhon309 0:c52df770855b 124 * @{
jhon309 0:c52df770855b 125 */
jhon309 0:c52df770855b 126 #if defined(STM32F030x6) || defined(STM32F030x8) || defined(STM32F031x6) || defined(STM32F038xx) || \
jhon309 0:c52df770855b 127 defined(STM32F051x8) || defined(STM32F042x6) || defined(STM32F048xx) || defined(STM32F058xx) || defined(STM32F070x6)
jhon309 0:c52df770855b 128 #define OB_WRP_PAGES0TO3 ((uint32_t)0x00000001) /* Write protection of page 0 to 3 */
jhon309 0:c52df770855b 129 #define OB_WRP_PAGES4TO7 ((uint32_t)0x00000002) /* Write protection of page 4 to 7 */
jhon309 0:c52df770855b 130 #define OB_WRP_PAGES8TO11 ((uint32_t)0x00000004) /* Write protection of page 8 to 11 */
jhon309 0:c52df770855b 131 #define OB_WRP_PAGES12TO15 ((uint32_t)0x00000008) /* Write protection of page 12 to 15 */
jhon309 0:c52df770855b 132 #define OB_WRP_PAGES16TO19 ((uint32_t)0x00000010) /* Write protection of page 16 to 19 */
jhon309 0:c52df770855b 133 #define OB_WRP_PAGES20TO23 ((uint32_t)0x00000020) /* Write protection of page 20 to 23 */
jhon309 0:c52df770855b 134 #define OB_WRP_PAGES24TO27 ((uint32_t)0x00000040) /* Write protection of page 24 to 27 */
jhon309 0:c52df770855b 135 #define OB_WRP_PAGES28TO31 ((uint32_t)0x00000080) /* Write protection of page 28 to 31 */
jhon309 0:c52df770855b 136 #if defined(STM32F030x8) || defined(STM32F051x8) || defined(STM32F058xx)
jhon309 0:c52df770855b 137 #define OB_WRP_PAGES32TO35 ((uint32_t)0x00000100) /* Write protection of page 32 to 35 */
jhon309 0:c52df770855b 138 #define OB_WRP_PAGES36TO39 ((uint32_t)0x00000200) /* Write protection of page 36 to 39 */
jhon309 0:c52df770855b 139 #define OB_WRP_PAGES40TO43 ((uint32_t)0x00000400) /* Write protection of page 40 to 43 */
jhon309 0:c52df770855b 140 #define OB_WRP_PAGES44TO47 ((uint32_t)0x00000800) /* Write protection of page 44 to 47 */
jhon309 0:c52df770855b 141 #define OB_WRP_PAGES48TO51 ((uint32_t)0x00001000) /* Write protection of page 48 to 51 */
jhon309 0:c52df770855b 142 #define OB_WRP_PAGES52TO57 ((uint32_t)0x00002000) /* Write protection of page 52 to 57 */
jhon309 0:c52df770855b 143 #define OB_WRP_PAGES56TO59 ((uint32_t)0x00004000) /* Write protection of page 56 to 59 */
jhon309 0:c52df770855b 144 #define OB_WRP_PAGES60TO63 ((uint32_t)0x00008000) /* Write protection of page 60 to 63 */
jhon309 0:c52df770855b 145 #endif /* STM32F030x8 || STM32F051x8 || STM32F058xx */
jhon309 0:c52df770855b 146
jhon309 0:c52df770855b 147 #define OB_WRP_PAGES0TO31MASK ((uint32_t)0x000000FF)
jhon309 0:c52df770855b 148 #if defined(STM32F030x8) || defined(STM32F051x8) || defined(STM32F058xx)
jhon309 0:c52df770855b 149 #define OB_WRP_PAGES32TO63MASK ((uint32_t)0x0000FF00)
jhon309 0:c52df770855b 150 #endif /* STM32F030x8 || STM32F051x8 || STM32F058xx */
jhon309 0:c52df770855b 151
jhon309 0:c52df770855b 152 #if defined(STM32F030x6) || defined(STM32F031x6) || defined(STM32F042x6) || defined(STM32F048xx) || defined(STM32F038xx)|| defined(STM32F070x6)
jhon309 0:c52df770855b 153 #define OB_WRP_ALLPAGES ((uint32_t)0x000000FF) /*!< Write protection of all pages */
jhon309 0:c52df770855b 154 #endif /* STM32F030x6 || STM32F031x6 || STM32F042x6 || STM32F048xx || STM32F038xx || STM32F070x6 */
jhon309 0:c52df770855b 155
jhon309 0:c52df770855b 156 #if defined(STM32F030x8) || defined(STM32F051x8) || defined(STM32F058xx)
jhon309 0:c52df770855b 157 #define OB_WRP_ALLPAGES ((uint32_t)0x0000FFFF) /*!< Write protection of all pages */
jhon309 0:c52df770855b 158 #endif /* STM32F030x8 || STM32F051x8 || STM32F058xx */
jhon309 0:c52df770855b 159 #endif /* STM32F030x6 || STM32F030x8 || STM32F031x6 || STM32F051x8 || STM32F042x6 || STM32F048xx || STM32F038xx || STM32F058xx || STM32F070x6 */
jhon309 0:c52df770855b 160
jhon309 0:c52df770855b 161 #if defined(STM32F071xB) || defined(STM32F072xB) || defined(STM32F078xx) || defined(STM32F070xB) || \
jhon309 0:c52df770855b 162 defined(STM32F091xC) || defined(STM32F098xx) || defined(STM32F030xC)
jhon309 0:c52df770855b 163 #define OB_WRP_PAGES0TO1 ((uint32_t)0x00000001) /* Write protection of page 0 to 1 */
jhon309 0:c52df770855b 164 #define OB_WRP_PAGES2TO3 ((uint32_t)0x00000002) /* Write protection of page 2 to 3 */
jhon309 0:c52df770855b 165 #define OB_WRP_PAGES4TO5 ((uint32_t)0x00000004) /* Write protection of page 4 to 5 */
jhon309 0:c52df770855b 166 #define OB_WRP_PAGES6TO7 ((uint32_t)0x00000008) /* Write protection of page 6 to 7 */
jhon309 0:c52df770855b 167 #define OB_WRP_PAGES8TO9 ((uint32_t)0x00000010) /* Write protection of page 8 to 9 */
jhon309 0:c52df770855b 168 #define OB_WRP_PAGES10TO11 ((uint32_t)0x00000020) /* Write protection of page 10 to 11 */
jhon309 0:c52df770855b 169 #define OB_WRP_PAGES12TO13 ((uint32_t)0x00000040) /* Write protection of page 12 to 13 */
jhon309 0:c52df770855b 170 #define OB_WRP_PAGES14TO15 ((uint32_t)0x00000080) /* Write protection of page 14 to 15 */
jhon309 0:c52df770855b 171 #define OB_WRP_PAGES16TO17 ((uint32_t)0x00000100) /* Write protection of page 16 to 17 */
jhon309 0:c52df770855b 172 #define OB_WRP_PAGES18TO19 ((uint32_t)0x00000200) /* Write protection of page 18 to 19 */
jhon309 0:c52df770855b 173 #define OB_WRP_PAGES20TO21 ((uint32_t)0x00000400) /* Write protection of page 20 to 21 */
jhon309 0:c52df770855b 174 #define OB_WRP_PAGES22TO23 ((uint32_t)0x00000800) /* Write protection of page 22 to 23 */
jhon309 0:c52df770855b 175 #define OB_WRP_PAGES24TO25 ((uint32_t)0x00001000) /* Write protection of page 24 to 25 */
jhon309 0:c52df770855b 176 #define OB_WRP_PAGES26TO27 ((uint32_t)0x00002000) /* Write protection of page 26 to 27 */
jhon309 0:c52df770855b 177 #define OB_WRP_PAGES28TO29 ((uint32_t)0x00004000) /* Write protection of page 28 to 29 */
jhon309 0:c52df770855b 178 #define OB_WRP_PAGES30TO31 ((uint32_t)0x00008000) /* Write protection of page 30 to 31 */
jhon309 0:c52df770855b 179 #define OB_WRP_PAGES32TO33 ((uint32_t)0x00010000) /* Write protection of page 32 to 33 */
jhon309 0:c52df770855b 180 #define OB_WRP_PAGES34TO35 ((uint32_t)0x00020000) /* Write protection of page 34 to 35 */
jhon309 0:c52df770855b 181 #define OB_WRP_PAGES36TO37 ((uint32_t)0x00040000) /* Write protection of page 36 to 37 */
jhon309 0:c52df770855b 182 #define OB_WRP_PAGES38TO39 ((uint32_t)0x00080000) /* Write protection of page 38 to 39 */
jhon309 0:c52df770855b 183 #define OB_WRP_PAGES40TO41 ((uint32_t)0x00100000) /* Write protection of page 40 to 41 */
jhon309 0:c52df770855b 184 #define OB_WRP_PAGES42TO43 ((uint32_t)0x00200000) /* Write protection of page 42 to 43 */
jhon309 0:c52df770855b 185 #define OB_WRP_PAGES44TO45 ((uint32_t)0x00400000) /* Write protection of page 44 to 45 */
jhon309 0:c52df770855b 186 #define OB_WRP_PAGES46TO47 ((uint32_t)0x00800000) /* Write protection of page 46 to 47 */
jhon309 0:c52df770855b 187 #define OB_WRP_PAGES48TO49 ((uint32_t)0x01000000) /* Write protection of page 48 to 49 */
jhon309 0:c52df770855b 188 #define OB_WRP_PAGES50TO51 ((uint32_t)0x02000000) /* Write protection of page 50 to 51 */
jhon309 0:c52df770855b 189 #define OB_WRP_PAGES52TO53 ((uint32_t)0x04000000) /* Write protection of page 52 to 53 */
jhon309 0:c52df770855b 190 #define OB_WRP_PAGES54TO55 ((uint32_t)0x08000000) /* Write protection of page 54 to 55 */
jhon309 0:c52df770855b 191 #define OB_WRP_PAGES56TO57 ((uint32_t)0x10000000) /* Write protection of page 56 to 57 */
jhon309 0:c52df770855b 192 #define OB_WRP_PAGES58TO59 ((uint32_t)0x20000000) /* Write protection of page 58 to 59 */
jhon309 0:c52df770855b 193 #define OB_WRP_PAGES60TO61 ((uint32_t)0x40000000) /* Write protection of page 60 to 61 */
jhon309 0:c52df770855b 194 #if defined(STM32F071xB) || defined(STM32F072xB) || defined(STM32F078xx) || defined(STM32F070xB)
jhon309 0:c52df770855b 195 #define OB_WRP_PAGES62TO63 ((uint32_t)0x80000000) /* Write protection of page 62 to 63 */
jhon309 0:c52df770855b 196 #endif /* STM32F071xB || STM32F072xB || STM32F078xx || STM32F070xB */
jhon309 0:c52df770855b 197 #if defined(STM32F091xC) || defined(STM32F098xx) || defined(STM32F030xC)
jhon309 0:c52df770855b 198 #define OB_WRP_PAGES62TO127 ((uint32_t)0x80000000) /* Write protection of page 62 to 127 */
jhon309 0:c52df770855b 199 #endif /* STM32F091xC || STM32F098xx || STM32F030xC */
jhon309 0:c52df770855b 200
jhon309 0:c52df770855b 201 #define OB_WRP_PAGES0TO15MASK ((uint32_t)0x000000FF)
jhon309 0:c52df770855b 202 #define OB_WRP_PAGES16TO31MASK ((uint32_t)0x0000FF00)
jhon309 0:c52df770855b 203 #define OB_WRP_PAGES32TO47MASK ((uint32_t)0x00FF0000)
jhon309 0:c52df770855b 204 #if defined(STM32F071xB) || defined(STM32F072xB) || defined(STM32F078xx) || defined(STM32F070xB)
jhon309 0:c52df770855b 205 #define OB_WRP_PAGES48TO63MASK ((uint32_t)0xFF000000)
jhon309 0:c52df770855b 206 #endif /* STM32F071xB || STM32F072xB || STM32F078xx || STM32F070xB */
jhon309 0:c52df770855b 207 #if defined(STM32F091xC) || defined(STM32F098xx) || defined(STM32F030xC)
jhon309 0:c52df770855b 208 #define OB_WRP_PAGES48TO127MASK ((uint32_t)0xFF000000)
jhon309 0:c52df770855b 209 #endif /* STM32F091xC || STM32F098xx || STM32F030xC */
jhon309 0:c52df770855b 210
jhon309 0:c52df770855b 211 #define OB_WRP_ALLPAGES ((uint32_t)0xFFFFFFFF) /*!< Write protection of all pages */
jhon309 0:c52df770855b 212 #endif /* STM32F071xB || STM32F072xB || STM32F078xx || STM32F091xC || STM32F098xx || STM32F030xC || STM32F070xB */
jhon309 0:c52df770855b 213
jhon309 0:c52df770855b 214 #define IS_OB_WRP(PAGE) (((PAGE) != 0x0000000))
jhon309 0:c52df770855b 215 /**
jhon309 0:c52df770855b 216 * @}
jhon309 0:c52df770855b 217 */
jhon309 0:c52df770855b 218
jhon309 0:c52df770855b 219 #if defined(STM32F042x6) || defined(STM32F048xx) || defined(STM32F091xC) || defined(STM32F098xx) || defined(STM32F030xC)|| defined(STM32F070x6)
jhon309 0:c52df770855b 220 /** @defgroup FLASHEx_OB_BOOT_SEL FLASHEx OB BOOT SEL
jhon309 0:c52df770855b 221 * @{
jhon309 0:c52df770855b 222 */
jhon309 0:c52df770855b 223 #define OB_BOOT_SEL_RESET ((uint8_t)0x00) /*!< BOOT_SEL Reset */
jhon309 0:c52df770855b 224 #define OB_BOOT_SEL_SET ((uint8_t)0x80) /*!< BOOT_SEL Set */
jhon309 0:c52df770855b 225 #define IS_OB_BOOT_SEL(BOOT_SEL) (((BOOT_SEL) == OB_BOOT_SEL_RESET) || ((BOOT_SEL) == OB_BOOT_SEL_SET))
jhon309 0:c52df770855b 226 /**
jhon309 0:c52df770855b 227 * @}
jhon309 0:c52df770855b 228 */
jhon309 0:c52df770855b 229
jhon309 0:c52df770855b 230 /** @defgroup FLASHEx_OB_BOOT0 FLASHEx OB BOOT0
jhon309 0:c52df770855b 231 * @{
jhon309 0:c52df770855b 232 */
jhon309 0:c52df770855b 233 #define OB_BOOT0_RESET ((uint8_t)0x00) /*!< BOOT0 Reset */
jhon309 0:c52df770855b 234 #define OB_BOOT0_SET ((uint8_t)0x08) /*!< BOOT0 Set */
jhon309 0:c52df770855b 235 #define IS_OB_BOOT0(BOOT0) (((BOOT0) == OB_BOOT0_RESET) || ((BOOT0) == OB_BOOT0_SET))
jhon309 0:c52df770855b 236 /**
jhon309 0:c52df770855b 237 * @}
jhon309 0:c52df770855b 238 */
jhon309 0:c52df770855b 239 #endif /* STM32F042x6 || STM32F048xx || STM32F091xC || STM32F098xx || STM32F030xC || STM32F070x6 */
jhon309 0:c52df770855b 240
jhon309 0:c52df770855b 241 /**
jhon309 0:c52df770855b 242 * @}
jhon309 0:c52df770855b 243 */
jhon309 0:c52df770855b 244
jhon309 0:c52df770855b 245 /* Exported macro ------------------------------------------------------------*/
jhon309 0:c52df770855b 246
jhon309 0:c52df770855b 247 /* Exported functions --------------------------------------------------------*/
jhon309 0:c52df770855b 248 /** @addtogroup FLASHEx_Exported_Functions FLASHEx Exported Functions
jhon309 0:c52df770855b 249 * @{
jhon309 0:c52df770855b 250 */
jhon309 0:c52df770855b 251
jhon309 0:c52df770855b 252 /** @addtogroup FLASHEx_Exported_Functions_Group2 Extended I/O operation functions
jhon309 0:c52df770855b 253 * @brief Extended I/O operation functions
jhon309 0:c52df770855b 254 * @{
jhon309 0:c52df770855b 255 */
jhon309 0:c52df770855b 256 /* IO operation functions *****************************************************/
jhon309 0:c52df770855b 257 HAL_StatusTypeDef HAL_FLASHEx_Erase(FLASH_EraseInitTypeDef *pEraseInit, uint32_t *PageError);
jhon309 0:c52df770855b 258 HAL_StatusTypeDef HAL_FLASHEx_Erase_IT(FLASH_EraseInitTypeDef *pEraseInit);
jhon309 0:c52df770855b 259
jhon309 0:c52df770855b 260 /**
jhon309 0:c52df770855b 261 * @}
jhon309 0:c52df770855b 262 */
jhon309 0:c52df770855b 263
jhon309 0:c52df770855b 264 /** @addtogroup FLASHEx_Exported_Functions_Group3 Extended Peripheral Control functions
jhon309 0:c52df770855b 265 * @brief Extended Peripheral Control functions
jhon309 0:c52df770855b 266 * @{
jhon309 0:c52df770855b 267 */
jhon309 0:c52df770855b 268 /* Peripheral Control functions ***********************************************/
jhon309 0:c52df770855b 269 HAL_StatusTypeDef HAL_FLASHEx_OBErase(void);
jhon309 0:c52df770855b 270 HAL_StatusTypeDef HAL_FLASHEx_OBProgram(FLASH_OBProgramInitTypeDef *pOBInit);
jhon309 0:c52df770855b 271 void HAL_FLASHEx_OBGetConfig(FLASH_OBProgramInitTypeDef *pOBInit);
jhon309 0:c52df770855b 272
jhon309 0:c52df770855b 273 /**
jhon309 0:c52df770855b 274 * @}
jhon309 0:c52df770855b 275 */
jhon309 0:c52df770855b 276
jhon309 0:c52df770855b 277 /**
jhon309 0:c52df770855b 278 * @}
jhon309 0:c52df770855b 279 */
jhon309 0:c52df770855b 280
jhon309 0:c52df770855b 281 /**
jhon309 0:c52df770855b 282 * @}
jhon309 0:c52df770855b 283 */
jhon309 0:c52df770855b 284
jhon309 0:c52df770855b 285 /**
jhon309 0:c52df770855b 286 * @}
jhon309 0:c52df770855b 287 */
jhon309 0:c52df770855b 288
jhon309 0:c52df770855b 289 #ifdef __cplusplus
jhon309 0:c52df770855b 290 }
jhon309 0:c52df770855b 291 #endif
jhon309 0:c52df770855b 292
jhon309 0:c52df770855b 293 #endif /* __STM32F0xx_HAL_FLASH_EX_H */
jhon309 0:c52df770855b 294
jhon309 0:c52df770855b 295 /************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/
jhon309 0:c52df770855b 296