The official mbed C/C SDK provides the software platform and libraries to build your applications.

Fork of mbed by mbed official

Committer:
Kojto
Date:
Tue Feb 03 15:31:20 2015 +0000
Revision:
93:e188a91d3eaa
Release 93 of the mbed library

Main changes:

- Renesas RZ_A1H bugfixes - i2c, ticker
- new targets - Nucleo F303RE, Nucleo F070RB, BLE SMURFS,
Dragonfly 411RE,
- BusXXX - is connected method, plus operators addition
- LPC8xx - I2c fixes
- timestamp_t reverted to uint32_t
- RTX - fixes regarding stack (alignment, magic word)

Who changed what in which revision?

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