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 stm32f3xx_hal_flash_ex.h
Kojto 93:e188a91d3eaa 4 * @author MCD Application Team
Kojto 93:e188a91d3eaa 5 * @version V1.1.0
Kojto 93:e188a91d3eaa 6 * @date 12-Sept-2014
Kojto 93:e188a91d3eaa 7 * @brief Header file of Flash HAL Extended 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 __STM32F3xx_HAL_FLASH_EX_H
Kojto 93:e188a91d3eaa 40 #define __STM32F3xx_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 "stm32f3xx_hal_def.h"
Kojto 93:e188a91d3eaa 48
Kojto 93:e188a91d3eaa 49 /** @addtogroup STM32F3xx_HAL_Driver
Kojto 93:e188a91d3eaa 50 * @{
Kojto 93:e188a91d3eaa 51 */
Kojto 93:e188a91d3eaa 52
Kojto 93:e188a91d3eaa 53 /** @addtogroup FLASHEx FLASH Extended HAL module driver
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 FLASH Extended Exported Constants
Kojto 93:e188a91d3eaa 60 * @{
Kojto 93:e188a91d3eaa 61 */
Kojto 93:e188a91d3eaa 62 #define FLASH_SIZE_DATA_REGISTER ((uint32_t)0x1FFFF7CC)
Kojto 93:e188a91d3eaa 63 #define FLASH_PAGE_SIZE 0x800
Kojto 93:e188a91d3eaa 64 /**
Kojto 93:e188a91d3eaa 65 * @}
Kojto 93:e188a91d3eaa 66 */
Kojto 93:e188a91d3eaa 67
Kojto 93:e188a91d3eaa 68 /** @defgroup FLASHEx_Address FLASH Extended Address
Kojto 93:e188a91d3eaa 69 * @{
Kojto 93:e188a91d3eaa 70 */
Kojto 93:e188a91d3eaa 71 #if defined(STM32F302xC) || defined(STM32F303xC) || defined(STM32F358xx) || \
Kojto 93:e188a91d3eaa 72 defined(STM32F373xC) || defined(STM32F378xx)
Kojto 93:e188a91d3eaa 73 #define IS_FLASH_PROGRAM_ADDRESS(ADDRESS) (((ADDRESS) >= 0x08000000) && (((*((uint16_t *)FLASH_SIZE_DATA_REGISTER)) == 0x100) ? \
Kojto 93:e188a91d3eaa 74 ((ADDRESS) <= 0x0803FFFF) : (((*((uint16_t *)FLASH_SIZE_DATA_REGISTER)) == 0x80) ? \
Kojto 93:e188a91d3eaa 75 ((ADDRESS) <= 0x0801FFFF) : ((ADDRESS) <= 0x0800FFFF))))
Kojto 93:e188a91d3eaa 76 #endif /* STM32F302xC || STM32F303xC || STM32F358xx || */
Kojto 93:e188a91d3eaa 77 /* STM32F373xC || STM32F378xx */
Kojto 93:e188a91d3eaa 78
Kojto 93:e188a91d3eaa 79 #if defined(STM32F302xE) || defined(STM32F303xE) || defined(STM32F398xx)
Kojto 93:e188a91d3eaa 80 #define IS_FLASH_PROGRAM_ADDRESS(ADDRESS) (((ADDRESS) >= 0x08000000) && ((ADDRESS) <= 0x0807FFFF))
Kojto 93:e188a91d3eaa 81 #endif /* STM32F302xE || STM32F303xE || STM32F398xx */
Kojto 93:e188a91d3eaa 82
Kojto 93:e188a91d3eaa 83 #if defined(STM32F301x8) || defined(STM32F302x8) || defined(STM32F318xx) || \
Kojto 93:e188a91d3eaa 84 defined(STM32F303x8) || defined(STM32F334x8) || defined(STM32F328xx)
Kojto 93:e188a91d3eaa 85 #define IS_FLASH_PROGRAM_ADDRESS(ADDRESS) (((ADDRESS) >= 0x08000000) && (((*((uint16_t *)FLASH_SIZE_DATA_REGISTER)) == 0x40) ? \
Kojto 93:e188a91d3eaa 86 ((ADDRESS) <= 0x0800FFFF) : (((*((uint16_t *)FLASH_SIZE_DATA_REGISTER)) == 0x20) ? \
Kojto 93:e188a91d3eaa 87 ((ADDRESS) <= 0x08007FFF) : ((ADDRESS) <= 0x08003FFF))))
Kojto 93:e188a91d3eaa 88 #endif /* STM32F301x8 || STM32F302x8 || STM32F318xx || */
Kojto 93:e188a91d3eaa 89 /* STM32F303x8 || STM32F334x8 || STM32F328xx */
Kojto 93:e188a91d3eaa 90 /**
Kojto 93:e188a91d3eaa 91 * @}
Kojto 93:e188a91d3eaa 92 */
Kojto 93:e188a91d3eaa 93
Kojto 93:e188a91d3eaa 94 /** @defgroup FLASHEx_Nb_Pages FLASH Extended Nb Pages
Kojto 93:e188a91d3eaa 95 * @{
Kojto 93:e188a91d3eaa 96 */
Kojto 93:e188a91d3eaa 97 #if defined(STM32F302xC) || defined(STM32F303xC) || defined(STM32F358xx) || \
Kojto 93:e188a91d3eaa 98 defined(STM32F373xC) || defined(STM32F378xx)
Kojto 93:e188a91d3eaa 99 #define IS_FLASH_NB_PAGES(ADDRESS,NBPAGES) (((*((uint16_t *)FLASH_SIZE_DATA_REGISTER)) == 0x100) ? ((ADDRESS)+((NBPAGES)*FLASH_PAGE_SIZE)-1 <= 0x0803FFFF) : \
Kojto 93:e188a91d3eaa 100 (((*((uint16_t *)FLASH_SIZE_DATA_REGISTER)) == 0x80) ? ((ADDRESS)+((NBPAGES)*FLASH_PAGE_SIZE)-1 <= 0x0801FFFF) : \
Kojto 93:e188a91d3eaa 101 ((ADDRESS)+((NBPAGES)*FLASH_PAGE_SIZE)-1 <= 0x0800FFFF)))
Kojto 93:e188a91d3eaa 102 #endif /* STM32F302xC || STM32F303xC || STM32F358xx || */
Kojto 93:e188a91d3eaa 103 /* STM32F373xC || STM32F378xx */
Kojto 93:e188a91d3eaa 104
Kojto 93:e188a91d3eaa 105 #if defined(STM32F302xE) || defined(STM32F303xE) || defined(STM32F398xx)
Kojto 93:e188a91d3eaa 106 #define IS_FLASH_NB_PAGES(ADDRESS,NBPAGES) ((ADDRESS)+((NBPAGES)*FLASH_PAGE_SIZE)-1 <= 0x0807FFFF)
Kojto 93:e188a91d3eaa 107 #endif /* STM32F302xE || STM32F303xE || STM32F398xx */
Kojto 93:e188a91d3eaa 108
Kojto 93:e188a91d3eaa 109 #if defined(STM32F301x8) || defined(STM32F302x8) || defined(STM32F318xx) || \
Kojto 93:e188a91d3eaa 110 defined(STM32F303x8) || defined(STM32F334x8) || defined(STM32F328xx)
Kojto 93:e188a91d3eaa 111 #define IS_FLASH_NB_PAGES(ADDRESS,NBPAGES) (((*((uint16_t *)FLASH_SIZE_DATA_REGISTER)) == 0x40) ? ((ADDRESS)+((NBPAGES)*FLASH_PAGE_SIZE)-1 <= 0x0800FFFF) : \
Kojto 93:e188a91d3eaa 112 (((*((uint16_t *)FLASH_SIZE_DATA_REGISTER)) == 0x20) ? ((ADDRESS)+((NBPAGES)*FLASH_PAGE_SIZE)-1 <= 0x08007FFF) : \
Kojto 93:e188a91d3eaa 113 ((ADDRESS)+((NBPAGES)*FLASH_PAGE_SIZE)-1 <= 0x08003FFF)))
Kojto 93:e188a91d3eaa 114 #endif /* STM32F301x8 || STM32F302x8 || STM32F318xx || */
Kojto 93:e188a91d3eaa 115 /* STM32F303x8 || STM32F334x8 || STM32F328xx */
Kojto 93:e188a91d3eaa 116 /**
Kojto 93:e188a91d3eaa 117 * @}
Kojto 93:e188a91d3eaa 118 */
Kojto 93:e188a91d3eaa 119
Kojto 93:e188a91d3eaa 120 /** @defgroup FLASHEx_OB_Write_Protection FLASH Extended Option Bytes Write Protection
Kojto 93:e188a91d3eaa 121 * @{
Kojto 93:e188a91d3eaa 122 */
Kojto 93:e188a91d3eaa 123 #define OB_WRP_PAGES0TO1 ((uint32_t)0x00000001) /* Write protection of page 0 to 1 */
Kojto 93:e188a91d3eaa 124 #define OB_WRP_PAGES2TO3 ((uint32_t)0x00000002) /* Write protection of page 2 to 3 */
Kojto 93:e188a91d3eaa 125 #define OB_WRP_PAGES4TO5 ((uint32_t)0x00000004) /* Write protection of page 4 to 5 */
Kojto 93:e188a91d3eaa 126 #define OB_WRP_PAGES6TO7 ((uint32_t)0x00000008) /* Write protection of page 6 to 7 */
Kojto 93:e188a91d3eaa 127 #define OB_WRP_PAGES8TO9 ((uint32_t)0x00000010) /* Write protection of page 8 to 9 */
Kojto 93:e188a91d3eaa 128 #define OB_WRP_PAGES10TO11 ((uint32_t)0x00000020) /* Write protection of page 10 to 11 */
Kojto 93:e188a91d3eaa 129 #define OB_WRP_PAGES12TO13 ((uint32_t)0x00000040) /* Write protection of page 12 to 13 */
Kojto 93:e188a91d3eaa 130 #define OB_WRP_PAGES14TO15 ((uint32_t)0x00000080) /* Write protection of page 14 to 15 */
Kojto 93:e188a91d3eaa 131 #define OB_WRP_PAGES16TO17 ((uint32_t)0x00000100) /* Write protection of page 16 to 17 */
Kojto 93:e188a91d3eaa 132 #define OB_WRP_PAGES18TO19 ((uint32_t)0x00000200) /* Write protection of page 18 to 19 */
Kojto 93:e188a91d3eaa 133 #define OB_WRP_PAGES20TO21 ((uint32_t)0x00000400) /* Write protection of page 20 to 21 */
Kojto 93:e188a91d3eaa 134 #define OB_WRP_PAGES22TO23 ((uint32_t)0x00000800) /* Write protection of page 22 to 23 */
Kojto 93:e188a91d3eaa 135 #define OB_WRP_PAGES24TO25 ((uint32_t)0x00001000) /* Write protection of page 24 to 25 */
Kojto 93:e188a91d3eaa 136 #define OB_WRP_PAGES26TO27 ((uint32_t)0x00002000) /* Write protection of page 26 to 27 */
Kojto 93:e188a91d3eaa 137 #define OB_WRP_PAGES28TO29 ((uint32_t)0x00004000) /* Write protection of page 28 to 29 */
Kojto 93:e188a91d3eaa 138 #define OB_WRP_PAGES30TO31 ((uint32_t)0x00008000) /* Write protection of page 30 to 31 */
Kojto 93:e188a91d3eaa 139
Kojto 93:e188a91d3eaa 140 #if defined(STM32F302xC) || defined(STM32F303xC) || defined(STM32F358xx) || \
Kojto 93:e188a91d3eaa 141 defined(STM32F373xC) || defined(STM32F378xx)
Kojto 93:e188a91d3eaa 142 #define OB_WRP_PAGES32TO33 ((uint32_t)0x00010000) /* Write protection of page 32 to 33 */
Kojto 93:e188a91d3eaa 143 #define OB_WRP_PAGES34TO35 ((uint32_t)0x00020000) /* Write protection of page 34 to 35 */
Kojto 93:e188a91d3eaa 144 #define OB_WRP_PAGES36TO37 ((uint32_t)0x00040000) /* Write protection of page 36 to 37 */
Kojto 93:e188a91d3eaa 145 #define OB_WRP_PAGES38TO39 ((uint32_t)0x00080000) /* Write protection of page 38 to 39 */
Kojto 93:e188a91d3eaa 146 #define OB_WRP_PAGES40TO41 ((uint32_t)0x00100000) /* Write protection of page 40 to 41 */
Kojto 93:e188a91d3eaa 147 #define OB_WRP_PAGES42TO43 ((uint32_t)0x00200000) /* Write protection of page 42 to 43 */
Kojto 93:e188a91d3eaa 148 #define OB_WRP_PAGES44TO45 ((uint32_t)0x00400000) /* Write protection of page 44 to 45 */
Kojto 93:e188a91d3eaa 149 #define OB_WRP_PAGES46TO47 ((uint32_t)0x00800000) /* Write protection of page 46 to 47 */
Kojto 93:e188a91d3eaa 150 #define OB_WRP_PAGES48TO49 ((uint32_t)0x01000000) /* Write protection of page 48 to 49 */
Kojto 93:e188a91d3eaa 151 #define OB_WRP_PAGES50TO51 ((uint32_t)0x02000000) /* Write protection of page 50 to 51 */
Kojto 93:e188a91d3eaa 152 #define OB_WRP_PAGES52TO53 ((uint32_t)0x04000000) /* Write protection of page 52 to 53 */
Kojto 93:e188a91d3eaa 153 #define OB_WRP_PAGES54TO55 ((uint32_t)0x08000000) /* Write protection of page 54 to 55 */
Kojto 93:e188a91d3eaa 154 #define OB_WRP_PAGES56TO57 ((uint32_t)0x10000000) /* Write protection of page 56 to 57 */
Kojto 93:e188a91d3eaa 155 #define OB_WRP_PAGES58TO59 ((uint32_t)0x20000000) /* Write protection of page 58 to 59 */
Kojto 93:e188a91d3eaa 156 #define OB_WRP_PAGES60TO61 ((uint32_t)0x40000000) /* Write protection of page 60 to 61 */
Kojto 93:e188a91d3eaa 157 #define OB_WRP_PAGES62TO127 ((uint32_t)0x80000000) /* Write protection of page 62 to 127 */
Kojto 93:e188a91d3eaa 158 #endif /* STM32F302xC || STM32F303xC || STM32F358xx || */
Kojto 93:e188a91d3eaa 159 /* STM32F373xC || STM32F378xx */
Kojto 93:e188a91d3eaa 160
Kojto 93:e188a91d3eaa 161 #if defined(STM32F302xE) || defined(STM32F303xE) || defined(STM32F398xx)
Kojto 93:e188a91d3eaa 162 #define OB_WRP_PAGES32TO33 ((uint32_t)0x00010000) /* Write protection of page 32 to 33 */
Kojto 93:e188a91d3eaa 163 #define OB_WRP_PAGES34TO35 ((uint32_t)0x00020000) /* Write protection of page 34 to 35 */
Kojto 93:e188a91d3eaa 164 #define OB_WRP_PAGES36TO37 ((uint32_t)0x00040000) /* Write protection of page 36 to 37 */
Kojto 93:e188a91d3eaa 165 #define OB_WRP_PAGES38TO39 ((uint32_t)0x00080000) /* Write protection of page 38 to 39 */
Kojto 93:e188a91d3eaa 166 #define OB_WRP_PAGES40TO41 ((uint32_t)0x00100000) /* Write protection of page 40 to 41 */
Kojto 93:e188a91d3eaa 167 #define OB_WRP_PAGES42TO43 ((uint32_t)0x00200000) /* Write protection of page 42 to 43 */
Kojto 93:e188a91d3eaa 168 #define OB_WRP_PAGES44TO45 ((uint32_t)0x00400000) /* Write protection of page 44 to 45 */
Kojto 93:e188a91d3eaa 169 #define OB_WRP_PAGES46TO47 ((uint32_t)0x00800000) /* Write protection of page 46 to 47 */
Kojto 93:e188a91d3eaa 170 #define OB_WRP_PAGES48TO49 ((uint32_t)0x01000000) /* Write protection of page 48 to 49 */
Kojto 93:e188a91d3eaa 171 #define OB_WRP_PAGES50TO51 ((uint32_t)0x02000000) /* Write protection of page 50 to 51 */
Kojto 93:e188a91d3eaa 172 #define OB_WRP_PAGES52TO53 ((uint32_t)0x04000000) /* Write protection of page 52 to 53 */
Kojto 93:e188a91d3eaa 173 #define OB_WRP_PAGES54TO55 ((uint32_t)0x08000000) /* Write protection of page 54 to 55 */
Kojto 93:e188a91d3eaa 174 #define OB_WRP_PAGES56TO57 ((uint32_t)0x10000000) /* Write protection of page 56 to 57 */
Kojto 93:e188a91d3eaa 175 #define OB_WRP_PAGES58TO59 ((uint32_t)0x20000000) /* Write protection of page 58 to 59 */
Kojto 93:e188a91d3eaa 176 #define OB_WRP_PAGES60TO61 ((uint32_t)0x40000000) /* Write protection of page 60 to 61 */
Kojto 93:e188a91d3eaa 177 #define OB_WRP_PAGES62TO255 ((uint32_t)0x80000000) /* Write protection of page 62 to 255 */
Kojto 93:e188a91d3eaa 178 #endif /* STM32F302xE || STM32F303xE || STM32F398xx */
Kojto 93:e188a91d3eaa 179
Kojto 93:e188a91d3eaa 180 #define OB_WRP_PAGES0TO15MASK ((uint32_t)0x000000FF)
Kojto 93:e188a91d3eaa 181 #define OB_WRP_PAGES16TO31MASK ((uint32_t)0x0000FF00)
Kojto 93:e188a91d3eaa 182
Kojto 93:e188a91d3eaa 183 #if defined(STM32F302xC) || defined(STM32F303xC) || defined(STM32F358xx) || \
Kojto 93:e188a91d3eaa 184 defined(STM32F373xC) || defined(STM32F378xx)
Kojto 93:e188a91d3eaa 185 #define OB_WRP_PAGES32TO47MASK ((uint32_t)0x00FF0000)
Kojto 93:e188a91d3eaa 186 #define OB_WRP_PAGES48TO127MASK ((uint32_t)0xFF000000)
Kojto 93:e188a91d3eaa 187 #endif /* STM32F302xC || STM32F303xC || STM32F358xx || */
Kojto 93:e188a91d3eaa 188 /* STM32F373xC || STM32F378xx */
Kojto 93:e188a91d3eaa 189
Kojto 93:e188a91d3eaa 190 #if defined(STM32F302xE) || defined(STM32F303xE) || defined(STM32F398xx)
Kojto 93:e188a91d3eaa 191 #define OB_WRP_PAGES32TO47MASK ((uint32_t)0x00FF0000)
Kojto 93:e188a91d3eaa 192 #define OB_WRP_PAGES48TO255MASK ((uint32_t)0xFF000000)
Kojto 93:e188a91d3eaa 193 #endif /* STM32F302xE || STM32F303xE || STM32F398xx */
Kojto 93:e188a91d3eaa 194
Kojto 93:e188a91d3eaa 195 #if defined(STM32F302xC) || defined(STM32F303xC) || defined(STM32F358xx) || \
Kojto 93:e188a91d3eaa 196 defined(STM32F373xC) || defined(STM32F378xx)
Kojto 93:e188a91d3eaa 197 #define OB_WRP_PAGES32TO47MASK ((uint32_t)0x00FF0000)
Kojto 93:e188a91d3eaa 198 #define OB_WRP_PAGES48TO127MASK ((uint32_t)0xFF000000)
Kojto 93:e188a91d3eaa 199 #endif /* STM32F302xC || STM32F303xC || STM32F358xx || */
Kojto 93:e188a91d3eaa 200 /* STM32F373xC || STM32F378xx */
Kojto 93:e188a91d3eaa 201
Kojto 93:e188a91d3eaa 202 #if defined(STM32F302xE) || defined(STM32F303xE) || defined(STM32F398xx) || \
Kojto 93:e188a91d3eaa 203 defined(STM32F302xC) || defined(STM32F303xC) || defined(STM32F358xx) || \
Kojto 93:e188a91d3eaa 204 defined(STM32F373xC) || defined(STM32F378xx)
Kojto 93:e188a91d3eaa 205 #define OB_WRP_ALLPAGES ((uint32_t)0xFFFFFFFF) /*!< Write protection of all pages */
Kojto 93:e188a91d3eaa 206 #endif /* STM32F302xE || STM32F303xE || STM32F398xx || */
Kojto 93:e188a91d3eaa 207 /* STM32F302xC || STM32F303xC || STM32F358xx || */
Kojto 93:e188a91d3eaa 208 /* STM32F373xC || STM32F378xx */
Kojto 93:e188a91d3eaa 209
Kojto 93:e188a91d3eaa 210 #if defined(STM32F301x8) || defined(STM32F302x8) || defined(STM32F318xx) || \
Kojto 93:e188a91d3eaa 211 defined(STM32F303x8) || defined(STM32F334x8) || defined(STM32F328xx)
Kojto 93:e188a91d3eaa 212 #define OB_WRP_ALLPAGES ((uint32_t)0x0000FFFF) /*!< Write protection of all pages */
Kojto 93:e188a91d3eaa 213 #endif /* STM32F301x8 || STM32F302x8 || STM32F318xx || */
Kojto 93:e188a91d3eaa 214 /* STM32F303x8 || STM32F334x8 || STM32F328xx */
Kojto 93:e188a91d3eaa 215
Kojto 93:e188a91d3eaa 216 #define IS_OB_WRP(PAGE) (((PAGE) != 0x0000000))
Kojto 93:e188a91d3eaa 217 /**
Kojto 93:e188a91d3eaa 218 * @}
Kojto 93:e188a91d3eaa 219 */
Kojto 93:e188a91d3eaa 220
Kojto 93:e188a91d3eaa 221 #if defined(STM32F373xC) || defined(STM32F378xx)
Kojto 93:e188a91d3eaa 222 /** @defgroup FLASHEx_OB_SDADC12_VDD_MONITOR FLASH Extended Option Bytes SDADC12 VDD MONITOR
Kojto 93:e188a91d3eaa 223 * @{
Kojto 93:e188a91d3eaa 224 */
Kojto 93:e188a91d3eaa 225 #define OB_SDACD_VDD_MONITOR_RESET ((uint8_t)0x00) /*!< SDADC VDD Monitor reset */
Kojto 93:e188a91d3eaa 226 #define OB_SDACD_VDD_MONITOR_SET ((uint8_t)0x80) /*!< SDADC VDD Monitor set */
Kojto 93:e188a91d3eaa 227
Kojto 93:e188a91d3eaa 228 #define IS_OB_SDACD_VDD_MONITOR(VDD_MONITOR) (((VDD_MONITOR) == OB_SDACD_VDD_MONITOR_SET) || \
Kojto 93:e188a91d3eaa 229 ((VDD_MONITOR) == OB_SDACD_VDD_MONITOR_RESET))
Kojto 93:e188a91d3eaa 230 /**
Kojto 93:e188a91d3eaa 231 * @}
Kojto 93:e188a91d3eaa 232 */
Kojto 93:e188a91d3eaa 233 #endif /* STM32F373xC || STM32F378xx */
Kojto 93:e188a91d3eaa 234
Kojto 93:e188a91d3eaa 235
Kojto 93:e188a91d3eaa 236 /* Exported macro ------------------------------------------------------------*/
Kojto 93:e188a91d3eaa 237
Kojto 93:e188a91d3eaa 238 /* Exported functions --------------------------------------------------------*/
Kojto 93:e188a91d3eaa 239 /** @addtogroup FLASHEx_Exported_Functions FLASH Extended Exported Functions
Kojto 93:e188a91d3eaa 240 * @{
Kojto 93:e188a91d3eaa 241 */
Kojto 93:e188a91d3eaa 242
Kojto 93:e188a91d3eaa 243 /** @addtogroup FLASHEx_Exported_Functions_Group1 Extended Input and Output operation functions
Kojto 93:e188a91d3eaa 244 * @{
Kojto 93:e188a91d3eaa 245 */
Kojto 93:e188a91d3eaa 246 /* IO operation functions *****************************************************/
Kojto 93:e188a91d3eaa 247 HAL_StatusTypeDef HAL_FLASHEx_Erase(FLASH_EraseInitTypeDef *pEraseInit, uint32_t *PageError);
Kojto 93:e188a91d3eaa 248 HAL_StatusTypeDef HAL_FLASHEx_Erase_IT(FLASH_EraseInitTypeDef *pEraseInit);
Kojto 93:e188a91d3eaa 249
Kojto 93:e188a91d3eaa 250 /**
Kojto 93:e188a91d3eaa 251 * @}
Kojto 93:e188a91d3eaa 252 */
Kojto 93:e188a91d3eaa 253
Kojto 93:e188a91d3eaa 254 /** @addtogroup FLASHEx_Exported_Functions_Group2 Extended Peripheral Control functions
Kojto 93:e188a91d3eaa 255 * @{
Kojto 93:e188a91d3eaa 256 */
Kojto 93:e188a91d3eaa 257 /* Peripheral Control functions ***********************************************/
Kojto 93:e188a91d3eaa 258 HAL_StatusTypeDef HAL_FLASHEx_OBErase(void);
Kojto 93:e188a91d3eaa 259 HAL_StatusTypeDef HAL_FLASHEx_OBProgram(FLASH_OBProgramInitTypeDef *pOBInit);
Kojto 93:e188a91d3eaa 260 void HAL_FLASHEx_OBGetConfig(FLASH_OBProgramInitTypeDef *pOBInit);
Kojto 93:e188a91d3eaa 261
Kojto 93:e188a91d3eaa 262 /**
Kojto 93:e188a91d3eaa 263 * @}
Kojto 93:e188a91d3eaa 264 */
Kojto 93:e188a91d3eaa 265
Kojto 93:e188a91d3eaa 266 /**
Kojto 93:e188a91d3eaa 267 * @}
Kojto 93:e188a91d3eaa 268 */
Kojto 93:e188a91d3eaa 269
Kojto 93:e188a91d3eaa 270 /**
Kojto 93:e188a91d3eaa 271 * @}
Kojto 93:e188a91d3eaa 272 */
Kojto 93:e188a91d3eaa 273
Kojto 93:e188a91d3eaa 274 /**
Kojto 93:e188a91d3eaa 275 * @}
Kojto 93:e188a91d3eaa 276 */
Kojto 93:e188a91d3eaa 277 #ifdef __cplusplus
Kojto 93:e188a91d3eaa 278 }
Kojto 93:e188a91d3eaa 279 #endif
Kojto 93:e188a91d3eaa 280
Kojto 93:e188a91d3eaa 281 #endif /* __STM32F3xx_HAL_FLASH_EX_H */
Kojto 93:e188a91d3eaa 282
Kojto 93:e188a91d3eaa 283 /************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/