my fork
Fork of mbed by
TARGET_NUCLEO_L152RE/stm32l1xx_hal_nor.h@90:cb3d968589d8, 2014-10-28 (annotated)
- Committer:
- Kojto
- Date:
- Tue Oct 28 16:40:41 2014 +0000
- Revision:
- 90:cb3d968589d8
Release 90 of the mbed library
Changes:
- Freescale KSDK update (v1.0)
- K22 - new target addition
- KL43Z - new target addition
- Nucleo F091RC - new target addition
- Nucleo L152RE - STM32Cube driver
- Nordic - Softdevice v7.1.0
- Nvic files - BSD License
- LPC824 - various HAL fixes
- Nucleo F411RE - CMSIS - IAR files
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
Kojto | 90:cb3d968589d8 | 1 | /** |
Kojto | 90:cb3d968589d8 | 2 | ****************************************************************************** |
Kojto | 90:cb3d968589d8 | 3 | * @file stm32l1xx_hal_nor.h |
Kojto | 90:cb3d968589d8 | 4 | * @author MCD Application Team |
Kojto | 90:cb3d968589d8 | 5 | * @version V1.0.0 |
Kojto | 90:cb3d968589d8 | 6 | * @date 5-September-2014 |
Kojto | 90:cb3d968589d8 | 7 | * @brief Header file of NOR HAL module. |
Kojto | 90:cb3d968589d8 | 8 | ****************************************************************************** |
Kojto | 90:cb3d968589d8 | 9 | * @attention |
Kojto | 90:cb3d968589d8 | 10 | * |
Kojto | 90:cb3d968589d8 | 11 | * <h2><center>© COPYRIGHT(c) 2014 STMicroelectronics</center></h2> |
Kojto | 90:cb3d968589d8 | 12 | * |
Kojto | 90:cb3d968589d8 | 13 | * Redistribution and use in source and binary forms, with or without modification, |
Kojto | 90:cb3d968589d8 | 14 | * are permitted provided that the following conditions are met: |
Kojto | 90:cb3d968589d8 | 15 | * 1. Redistributions of source code must retain the above copyright notice, |
Kojto | 90:cb3d968589d8 | 16 | * this list of conditions and the following disclaimer. |
Kojto | 90:cb3d968589d8 | 17 | * 2. Redistributions in binary form must reproduce the above copyright notice, |
Kojto | 90:cb3d968589d8 | 18 | * this list of conditions and the following disclaimer in the documentation |
Kojto | 90:cb3d968589d8 | 19 | * and/or other materials provided with the distribution. |
Kojto | 90:cb3d968589d8 | 20 | * 3. Neither the name of STMicroelectronics nor the names of its contributors |
Kojto | 90:cb3d968589d8 | 21 | * may be used to endorse or promote products derived from this software |
Kojto | 90:cb3d968589d8 | 22 | * without specific prior written permission. |
Kojto | 90:cb3d968589d8 | 23 | * |
Kojto | 90:cb3d968589d8 | 24 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" |
Kojto | 90:cb3d968589d8 | 25 | * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE |
Kojto | 90:cb3d968589d8 | 26 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE |
Kojto | 90:cb3d968589d8 | 27 | * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE |
Kojto | 90:cb3d968589d8 | 28 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL |
Kojto | 90:cb3d968589d8 | 29 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR |
Kojto | 90:cb3d968589d8 | 30 | * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER |
Kojto | 90:cb3d968589d8 | 31 | * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, |
Kojto | 90:cb3d968589d8 | 32 | * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE |
Kojto | 90:cb3d968589d8 | 33 | * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
Kojto | 90:cb3d968589d8 | 34 | * |
Kojto | 90:cb3d968589d8 | 35 | ****************************************************************************** |
Kojto | 90:cb3d968589d8 | 36 | */ |
Kojto | 90:cb3d968589d8 | 37 | |
Kojto | 90:cb3d968589d8 | 38 | /* Define to prevent recursive inclusion -------------------------------------*/ |
Kojto | 90:cb3d968589d8 | 39 | #ifndef __STM32L1xx_HAL_NOR_H |
Kojto | 90:cb3d968589d8 | 40 | #define __STM32L1xx_HAL_NOR_H |
Kojto | 90:cb3d968589d8 | 41 | |
Kojto | 90:cb3d968589d8 | 42 | #ifdef __cplusplus |
Kojto | 90:cb3d968589d8 | 43 | extern "C" { |
Kojto | 90:cb3d968589d8 | 44 | #endif |
Kojto | 90:cb3d968589d8 | 45 | |
Kojto | 90:cb3d968589d8 | 46 | /* Includes ------------------------------------------------------------------*/ |
Kojto | 90:cb3d968589d8 | 47 | #include "stm32l1xx_ll_fsmc.h" |
Kojto | 90:cb3d968589d8 | 48 | |
Kojto | 90:cb3d968589d8 | 49 | /** @addtogroup STM32L1xx_HAL_Driver |
Kojto | 90:cb3d968589d8 | 50 | * @{ |
Kojto | 90:cb3d968589d8 | 51 | */ |
Kojto | 90:cb3d968589d8 | 52 | |
Kojto | 90:cb3d968589d8 | 53 | /** @addtogroup NOR |
Kojto | 90:cb3d968589d8 | 54 | * @{ |
Kojto | 90:cb3d968589d8 | 55 | */ |
Kojto | 90:cb3d968589d8 | 56 | |
Kojto | 90:cb3d968589d8 | 57 | #if defined (STM32L151xD) || defined (STM32L152xD) || defined (STM32L162xD) |
Kojto | 90:cb3d968589d8 | 58 | |
Kojto | 90:cb3d968589d8 | 59 | /* Exported typedef ----------------------------------------------------------*/ |
Kojto | 90:cb3d968589d8 | 60 | |
Kojto | 90:cb3d968589d8 | 61 | /** @defgroup NOR_Exported_typedef NOR Exported typedef |
Kojto | 90:cb3d968589d8 | 62 | * @{ |
Kojto | 90:cb3d968589d8 | 63 | */ |
Kojto | 90:cb3d968589d8 | 64 | |
Kojto | 90:cb3d968589d8 | 65 | /** |
Kojto | 90:cb3d968589d8 | 66 | * @brief HAL SRAM State structures definition |
Kojto | 90:cb3d968589d8 | 67 | */ |
Kojto | 90:cb3d968589d8 | 68 | typedef enum |
Kojto | 90:cb3d968589d8 | 69 | { |
Kojto | 90:cb3d968589d8 | 70 | HAL_NOR_STATE_RESET = 0x00, /*!< NOR not yet initialized or disabled */ |
Kojto | 90:cb3d968589d8 | 71 | HAL_NOR_STATE_READY = 0x01, /*!< NOR initialized and ready for use */ |
Kojto | 90:cb3d968589d8 | 72 | HAL_NOR_STATE_BUSY = 0x02, /*!< NOR internal processing is ongoing */ |
Kojto | 90:cb3d968589d8 | 73 | HAL_NOR_STATE_ERROR = 0x03, /*!< NOR error state */ |
Kojto | 90:cb3d968589d8 | 74 | HAL_NOR_STATE_PROTECTED = 0x04 /*!< NOR NORSRAM device write protected */ |
Kojto | 90:cb3d968589d8 | 75 | |
Kojto | 90:cb3d968589d8 | 76 | }HAL_NOR_StateTypeDef; |
Kojto | 90:cb3d968589d8 | 77 | |
Kojto | 90:cb3d968589d8 | 78 | /** |
Kojto | 90:cb3d968589d8 | 79 | * @brief FSMC NOR Status typedef |
Kojto | 90:cb3d968589d8 | 80 | */ |
Kojto | 90:cb3d968589d8 | 81 | typedef enum |
Kojto | 90:cb3d968589d8 | 82 | { |
Kojto | 90:cb3d968589d8 | 83 | NOR_SUCCESS = 0, |
Kojto | 90:cb3d968589d8 | 84 | NOR_ONGOING, |
Kojto | 90:cb3d968589d8 | 85 | NOR_ERROR, |
Kojto | 90:cb3d968589d8 | 86 | NOR_TIMEOUT |
Kojto | 90:cb3d968589d8 | 87 | |
Kojto | 90:cb3d968589d8 | 88 | }NOR_StatusTypedef; |
Kojto | 90:cb3d968589d8 | 89 | |
Kojto | 90:cb3d968589d8 | 90 | /** |
Kojto | 90:cb3d968589d8 | 91 | * @brief FSMC NOR ID typedef |
Kojto | 90:cb3d968589d8 | 92 | */ |
Kojto | 90:cb3d968589d8 | 93 | typedef struct |
Kojto | 90:cb3d968589d8 | 94 | { |
Kojto | 90:cb3d968589d8 | 95 | uint16_t ManufacturerCode; /*!< Defines the device's manufacturer code used to identify the memory */ |
Kojto | 90:cb3d968589d8 | 96 | |
Kojto | 90:cb3d968589d8 | 97 | uint16_t DeviceCode1; |
Kojto | 90:cb3d968589d8 | 98 | |
Kojto | 90:cb3d968589d8 | 99 | uint16_t DeviceCode2; |
Kojto | 90:cb3d968589d8 | 100 | |
Kojto | 90:cb3d968589d8 | 101 | uint16_t DeviceCode3; /*!< Defines the devices' codes used to identify the memory. |
Kojto | 90:cb3d968589d8 | 102 | These codes can be accessed by performing read operations with specific |
Kojto | 90:cb3d968589d8 | 103 | control signals and addresses set.They can also be accessed by issuing |
Kojto | 90:cb3d968589d8 | 104 | an Auto Select command */ |
Kojto | 90:cb3d968589d8 | 105 | |
Kojto | 90:cb3d968589d8 | 106 | }NOR_IDTypeDef; |
Kojto | 90:cb3d968589d8 | 107 | |
Kojto | 90:cb3d968589d8 | 108 | |
Kojto | 90:cb3d968589d8 | 109 | /** |
Kojto | 90:cb3d968589d8 | 110 | * @brief FSMC NOR CFI typedef |
Kojto | 90:cb3d968589d8 | 111 | */ |
Kojto | 90:cb3d968589d8 | 112 | typedef struct |
Kojto | 90:cb3d968589d8 | 113 | { |
Kojto | 90:cb3d968589d8 | 114 | /*!< Defines the information stored in the memory's Common flash interface |
Kojto | 90:cb3d968589d8 | 115 | which contains a description of various electrical and timing parameters, |
Kojto | 90:cb3d968589d8 | 116 | density information and functions supported by the memory */ |
Kojto | 90:cb3d968589d8 | 117 | |
Kojto | 90:cb3d968589d8 | 118 | uint16_t CFI1; |
Kojto | 90:cb3d968589d8 | 119 | |
Kojto | 90:cb3d968589d8 | 120 | uint16_t CFI2; |
Kojto | 90:cb3d968589d8 | 121 | |
Kojto | 90:cb3d968589d8 | 122 | uint16_t CFI3; |
Kojto | 90:cb3d968589d8 | 123 | |
Kojto | 90:cb3d968589d8 | 124 | uint16_t CFI4; |
Kojto | 90:cb3d968589d8 | 125 | |
Kojto | 90:cb3d968589d8 | 126 | }NOR_CFITypeDef; |
Kojto | 90:cb3d968589d8 | 127 | |
Kojto | 90:cb3d968589d8 | 128 | /** |
Kojto | 90:cb3d968589d8 | 129 | * @brief NOR handle Structure definition |
Kojto | 90:cb3d968589d8 | 130 | */ |
Kojto | 90:cb3d968589d8 | 131 | typedef struct |
Kojto | 90:cb3d968589d8 | 132 | { |
Kojto | 90:cb3d968589d8 | 133 | FSMC_NORSRAM_TYPEDEF *Instance; /*!< Register base address */ |
Kojto | 90:cb3d968589d8 | 134 | |
Kojto | 90:cb3d968589d8 | 135 | FSMC_NORSRAM_EXTENDED_TYPEDEF *Extended; /*!< Extended mode register base address */ |
Kojto | 90:cb3d968589d8 | 136 | |
Kojto | 90:cb3d968589d8 | 137 | FSMC_NORSRAM_InitTypeDef Init; /*!< NOR device control configuration parameters */ |
Kojto | 90:cb3d968589d8 | 138 | |
Kojto | 90:cb3d968589d8 | 139 | HAL_LockTypeDef Lock; /*!< NOR locking object */ |
Kojto | 90:cb3d968589d8 | 140 | |
Kojto | 90:cb3d968589d8 | 141 | __IO HAL_NOR_StateTypeDef State; /*!< NOR device access state */ |
Kojto | 90:cb3d968589d8 | 142 | |
Kojto | 90:cb3d968589d8 | 143 | }NOR_HandleTypeDef; |
Kojto | 90:cb3d968589d8 | 144 | |
Kojto | 90:cb3d968589d8 | 145 | /** |
Kojto | 90:cb3d968589d8 | 146 | * @} |
Kojto | 90:cb3d968589d8 | 147 | */ |
Kojto | 90:cb3d968589d8 | 148 | |
Kojto | 90:cb3d968589d8 | 149 | /* Exported constants --------------------------------------------------------*/ |
Kojto | 90:cb3d968589d8 | 150 | |
Kojto | 90:cb3d968589d8 | 151 | /** @defgroup NOR_Exported_Constants NOR Exported Constants |
Kojto | 90:cb3d968589d8 | 152 | * @{ |
Kojto | 90:cb3d968589d8 | 153 | */ |
Kojto | 90:cb3d968589d8 | 154 | |
Kojto | 90:cb3d968589d8 | 155 | /* NOR device IDs addresses */ |
Kojto | 90:cb3d968589d8 | 156 | #define MC_ADDRESS ((uint16_t)0x0000) |
Kojto | 90:cb3d968589d8 | 157 | #define DEVICE_CODE1_ADDR ((uint16_t)0x0001) |
Kojto | 90:cb3d968589d8 | 158 | #define DEVICE_CODE2_ADDR ((uint16_t)0x000E) |
Kojto | 90:cb3d968589d8 | 159 | #define DEVICE_CODE3_ADDR ((uint16_t)0x000F) |
Kojto | 90:cb3d968589d8 | 160 | |
Kojto | 90:cb3d968589d8 | 161 | /* NOR CFI IDs addresses */ |
Kojto | 90:cb3d968589d8 | 162 | #define CFI1_ADDRESS ((uint16_t)0x10) |
Kojto | 90:cb3d968589d8 | 163 | #define CFI2_ADDRESS ((uint16_t)0x11) |
Kojto | 90:cb3d968589d8 | 164 | #define CFI3_ADDRESS ((uint16_t)0x12) |
Kojto | 90:cb3d968589d8 | 165 | #define CFI4_ADDRESS ((uint16_t)0x13) |
Kojto | 90:cb3d968589d8 | 166 | |
Kojto | 90:cb3d968589d8 | 167 | /* NOR operation wait timeout */ |
Kojto | 90:cb3d968589d8 | 168 | #define NOR_TMEOUT ((uint16_t)0xFFFF) |
Kojto | 90:cb3d968589d8 | 169 | |
Kojto | 90:cb3d968589d8 | 170 | /* NOR memory data width */ |
Kojto | 90:cb3d968589d8 | 171 | #define NOR_MEMORY_8B ((uint8_t)0x0) |
Kojto | 90:cb3d968589d8 | 172 | #define NOR_MEMORY_16B ((uint8_t)0x1) |
Kojto | 90:cb3d968589d8 | 173 | |
Kojto | 90:cb3d968589d8 | 174 | /* NOR memory device read/write start address */ |
Kojto | 90:cb3d968589d8 | 175 | #define NOR_MEMORY_ADRESS1 ((uint32_t)0x60000000) |
Kojto | 90:cb3d968589d8 | 176 | #define NOR_MEMORY_ADRESS2 ((uint32_t)0x64000000) |
Kojto | 90:cb3d968589d8 | 177 | #define NOR_MEMORY_ADRESS3 ((uint32_t)0x68000000) |
Kojto | 90:cb3d968589d8 | 178 | #define NOR_MEMORY_ADRESS4 ((uint32_t)0x6C000000) |
Kojto | 90:cb3d968589d8 | 179 | |
Kojto | 90:cb3d968589d8 | 180 | /** |
Kojto | 90:cb3d968589d8 | 181 | * @} |
Kojto | 90:cb3d968589d8 | 182 | */ |
Kojto | 90:cb3d968589d8 | 183 | |
Kojto | 90:cb3d968589d8 | 184 | /* Exported macro ------------------------------------------------------------*/ |
Kojto | 90:cb3d968589d8 | 185 | |
Kojto | 90:cb3d968589d8 | 186 | /** @defgroup NOR_Exported_macro NOR Exported macro |
Kojto | 90:cb3d968589d8 | 187 | * @{ |
Kojto | 90:cb3d968589d8 | 188 | */ |
Kojto | 90:cb3d968589d8 | 189 | |
Kojto | 90:cb3d968589d8 | 190 | /** @brief Reset NOR handle state |
Kojto | 90:cb3d968589d8 | 191 | * @param __HANDLE__: NOR handle |
Kojto | 90:cb3d968589d8 | 192 | * @retval None |
Kojto | 90:cb3d968589d8 | 193 | */ |
Kojto | 90:cb3d968589d8 | 194 | #define __HAL_NOR_RESET_HANDLE_STATE(__HANDLE__) ((__HANDLE__)->State = HAL_NOR_STATE_RESET) |
Kojto | 90:cb3d968589d8 | 195 | |
Kojto | 90:cb3d968589d8 | 196 | |
Kojto | 90:cb3d968589d8 | 197 | /** |
Kojto | 90:cb3d968589d8 | 198 | * @brief NOR memory address shifting. |
Kojto | 90:cb3d968589d8 | 199 | * @param __NOR_ADDRESS: NOR base address |
Kojto | 90:cb3d968589d8 | 200 | * @param __NOR_MEMORY_WIDTH_: NOR memory width |
Kojto | 90:cb3d968589d8 | 201 | * @param __ADDRESS__: NOR memory address |
Kojto | 90:cb3d968589d8 | 202 | * @retval NOR shifted address value |
Kojto | 90:cb3d968589d8 | 203 | */ |
Kojto | 90:cb3d968589d8 | 204 | #define __NOR_ADDR_SHIFT(__NOR_ADDRESS, __NOR_MEMORY_WIDTH_, __ADDRESS__) \ |
Kojto | 90:cb3d968589d8 | 205 | ((uint32_t)(((__NOR_MEMORY_WIDTH_) == NOR_MEMORY_16B)? \ |
Kojto | 90:cb3d968589d8 | 206 | ((uint32_t)((__NOR_ADDRESS) + (2 * (__ADDRESS__)))): \ |
Kojto | 90:cb3d968589d8 | 207 | ((uint32_t)((__NOR_ADDRESS) + (__ADDRESS__))))) |
Kojto | 90:cb3d968589d8 | 208 | |
Kojto | 90:cb3d968589d8 | 209 | /** |
Kojto | 90:cb3d968589d8 | 210 | * @brief NOR memory write data to specified address. |
Kojto | 90:cb3d968589d8 | 211 | * @param __ADDRESS__: NOR memory address |
Kojto | 90:cb3d968589d8 | 212 | * @param __DATA__: Data to write |
Kojto | 90:cb3d968589d8 | 213 | * @retval None |
Kojto | 90:cb3d968589d8 | 214 | */ |
Kojto | 90:cb3d968589d8 | 215 | #define __NOR_WRITE(__ADDRESS__, __DATA__) (*(__IO uint16_t *)((uint32_t)(__ADDRESS__)) = (__DATA__)) |
Kojto | 90:cb3d968589d8 | 216 | |
Kojto | 90:cb3d968589d8 | 217 | /** |
Kojto | 90:cb3d968589d8 | 218 | * @} |
Kojto | 90:cb3d968589d8 | 219 | */ |
Kojto | 90:cb3d968589d8 | 220 | |
Kojto | 90:cb3d968589d8 | 221 | /* Exported functions --------------------------------------------------------*/ |
Kojto | 90:cb3d968589d8 | 222 | |
Kojto | 90:cb3d968589d8 | 223 | /** @addtogroup NOR_Exported_Functions |
Kojto | 90:cb3d968589d8 | 224 | * @{ |
Kojto | 90:cb3d968589d8 | 225 | */ |
Kojto | 90:cb3d968589d8 | 226 | |
Kojto | 90:cb3d968589d8 | 227 | /** @addtogroup NOR_Exported_Functions_Group1 |
Kojto | 90:cb3d968589d8 | 228 | * @{ |
Kojto | 90:cb3d968589d8 | 229 | */ |
Kojto | 90:cb3d968589d8 | 230 | |
Kojto | 90:cb3d968589d8 | 231 | /* Initialization/de-initialization functions **********************************/ |
Kojto | 90:cb3d968589d8 | 232 | HAL_StatusTypeDef HAL_NOR_Init(NOR_HandleTypeDef *hnor, FSMC_NORSRAM_TimingTypeDef *Timing, FSMC_NORSRAM_TimingTypeDef *ExtTiming); |
Kojto | 90:cb3d968589d8 | 233 | HAL_StatusTypeDef HAL_NOR_DeInit(NOR_HandleTypeDef *hnor); |
Kojto | 90:cb3d968589d8 | 234 | void HAL_NOR_MspInit(NOR_HandleTypeDef *hnor); |
Kojto | 90:cb3d968589d8 | 235 | void HAL_NOR_MspDeInit(NOR_HandleTypeDef *hnor); |
Kojto | 90:cb3d968589d8 | 236 | void HAL_NOR_MspWait(NOR_HandleTypeDef *hnor, uint32_t Timeout); |
Kojto | 90:cb3d968589d8 | 237 | |
Kojto | 90:cb3d968589d8 | 238 | /** |
Kojto | 90:cb3d968589d8 | 239 | * @} |
Kojto | 90:cb3d968589d8 | 240 | */ |
Kojto | 90:cb3d968589d8 | 241 | |
Kojto | 90:cb3d968589d8 | 242 | /** @addtogroup NOR_Exported_Functions_Group2 |
Kojto | 90:cb3d968589d8 | 243 | * @{ |
Kojto | 90:cb3d968589d8 | 244 | */ |
Kojto | 90:cb3d968589d8 | 245 | |
Kojto | 90:cb3d968589d8 | 246 | /* I/O operation functions *****************************************************/ |
Kojto | 90:cb3d968589d8 | 247 | HAL_StatusTypeDef HAL_NOR_Read_ID(NOR_HandleTypeDef *hnor, NOR_IDTypeDef *pNOR_ID); |
Kojto | 90:cb3d968589d8 | 248 | HAL_StatusTypeDef HAL_NOR_ReturnToReadMode(NOR_HandleTypeDef *hnor); |
Kojto | 90:cb3d968589d8 | 249 | HAL_StatusTypeDef HAL_NOR_Read(NOR_HandleTypeDef *hnor, uint32_t *pAddress, uint16_t *pData); |
Kojto | 90:cb3d968589d8 | 250 | HAL_StatusTypeDef HAL_NOR_Program(NOR_HandleTypeDef *hnor, uint32_t *pAddress, uint16_t *pData); |
Kojto | 90:cb3d968589d8 | 251 | |
Kojto | 90:cb3d968589d8 | 252 | HAL_StatusTypeDef HAL_NOR_ReadBuffer(NOR_HandleTypeDef *hnor, uint32_t uwAddress, uint16_t *pData, uint32_t uwBufferSize); |
Kojto | 90:cb3d968589d8 | 253 | HAL_StatusTypeDef HAL_NOR_ProgramBuffer(NOR_HandleTypeDef *hnor, uint32_t uwAddress, uint16_t *pData, uint32_t uwBufferSize); |
Kojto | 90:cb3d968589d8 | 254 | |
Kojto | 90:cb3d968589d8 | 255 | HAL_StatusTypeDef HAL_NOR_Erase_Block(NOR_HandleTypeDef *hnor, uint32_t BlockAddress, uint32_t Address); |
Kojto | 90:cb3d968589d8 | 256 | HAL_StatusTypeDef HAL_NOR_Erase_Chip(NOR_HandleTypeDef *hnor, uint32_t Address); |
Kojto | 90:cb3d968589d8 | 257 | HAL_StatusTypeDef HAL_NOR_Read_CFI(NOR_HandleTypeDef *hnor, NOR_CFITypeDef *pNOR_CFI); |
Kojto | 90:cb3d968589d8 | 258 | |
Kojto | 90:cb3d968589d8 | 259 | /** |
Kojto | 90:cb3d968589d8 | 260 | * @} |
Kojto | 90:cb3d968589d8 | 261 | */ |
Kojto | 90:cb3d968589d8 | 262 | |
Kojto | 90:cb3d968589d8 | 263 | /** @addtogroup NOR_Exported_Functions_Group3 |
Kojto | 90:cb3d968589d8 | 264 | * @{ |
Kojto | 90:cb3d968589d8 | 265 | */ |
Kojto | 90:cb3d968589d8 | 266 | |
Kojto | 90:cb3d968589d8 | 267 | /* NOR Control functions *******************************************************/ |
Kojto | 90:cb3d968589d8 | 268 | HAL_StatusTypeDef HAL_NOR_WriteOperation_Enable(NOR_HandleTypeDef *hnor); |
Kojto | 90:cb3d968589d8 | 269 | HAL_StatusTypeDef HAL_NOR_WriteOperation_Disable(NOR_HandleTypeDef *hnor); |
Kojto | 90:cb3d968589d8 | 270 | |
Kojto | 90:cb3d968589d8 | 271 | /** |
Kojto | 90:cb3d968589d8 | 272 | * @} |
Kojto | 90:cb3d968589d8 | 273 | */ |
Kojto | 90:cb3d968589d8 | 274 | |
Kojto | 90:cb3d968589d8 | 275 | /** @addtogroup NOR_Exported_Functions_Group4 |
Kojto | 90:cb3d968589d8 | 276 | * @{ |
Kojto | 90:cb3d968589d8 | 277 | */ |
Kojto | 90:cb3d968589d8 | 278 | |
Kojto | 90:cb3d968589d8 | 279 | /* NOR State functions **********************************************************/ |
Kojto | 90:cb3d968589d8 | 280 | HAL_NOR_StateTypeDef HAL_NOR_GetState(NOR_HandleTypeDef *hnor); |
Kojto | 90:cb3d968589d8 | 281 | NOR_StatusTypedef HAL_NOR_GetStatus(NOR_HandleTypeDef *hnor, uint32_t Address, uint32_t Timeout); |
Kojto | 90:cb3d968589d8 | 282 | |
Kojto | 90:cb3d968589d8 | 283 | /** |
Kojto | 90:cb3d968589d8 | 284 | * @} |
Kojto | 90:cb3d968589d8 | 285 | */ |
Kojto | 90:cb3d968589d8 | 286 | |
Kojto | 90:cb3d968589d8 | 287 | /** |
Kojto | 90:cb3d968589d8 | 288 | * @} |
Kojto | 90:cb3d968589d8 | 289 | */ |
Kojto | 90:cb3d968589d8 | 290 | |
Kojto | 90:cb3d968589d8 | 291 | #endif /* STM32L151xD || STM32L152xD || STM32L162xD */ |
Kojto | 90:cb3d968589d8 | 292 | |
Kojto | 90:cb3d968589d8 | 293 | /** |
Kojto | 90:cb3d968589d8 | 294 | * @} |
Kojto | 90:cb3d968589d8 | 295 | */ |
Kojto | 90:cb3d968589d8 | 296 | |
Kojto | 90:cb3d968589d8 | 297 | /** |
Kojto | 90:cb3d968589d8 | 298 | * @} |
Kojto | 90:cb3d968589d8 | 299 | */ |
Kojto | 90:cb3d968589d8 | 300 | |
Kojto | 90:cb3d968589d8 | 301 | #ifdef __cplusplus |
Kojto | 90:cb3d968589d8 | 302 | } |
Kojto | 90:cb3d968589d8 | 303 | #endif |
Kojto | 90:cb3d968589d8 | 304 | |
Kojto | 90:cb3d968589d8 | 305 | #endif /* __STM32L1xx_HAL_NOR_H */ |
Kojto | 90:cb3d968589d8 | 306 | |
Kojto | 90:cb3d968589d8 | 307 | /************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/ |