mbed library sources

Fork of mbed-src by mbed official

Committer:
todotani
Date:
Fri Sep 05 14:20:33 2014 +0000
Revision:
308:59cc78a25982
Parent:
235:685d5f11838f
BLE_Health_Thermometer for mbed HRM1017 with BLE library 0.1.0

Who changed what in which revision?

UserRevisionLine numberNew contents of line
mbed_official 235:685d5f11838f 1 /**
mbed_official 235:685d5f11838f 2 ******************************************************************************
mbed_official 235:685d5f11838f 3 * @file stm32f4xx_ll_fsmc.h
mbed_official 235:685d5f11838f 4 * @author MCD Application Team
mbed_official 235:685d5f11838f 5 * @version V1.1.0
mbed_official 235:685d5f11838f 6 * @date 19-June-2014
mbed_official 235:685d5f11838f 7 * @brief Header file of FSMC HAL module.
mbed_official 235:685d5f11838f 8 ******************************************************************************
mbed_official 235:685d5f11838f 9 * @attention
mbed_official 235:685d5f11838f 10 *
mbed_official 235:685d5f11838f 11 * <h2><center>&copy; COPYRIGHT(c) 2014 STMicroelectronics</center></h2>
mbed_official 235:685d5f11838f 12 *
mbed_official 235:685d5f11838f 13 * Redistribution and use in source and binary forms, with or without modification,
mbed_official 235:685d5f11838f 14 * are permitted provided that the following conditions are met:
mbed_official 235:685d5f11838f 15 * 1. Redistributions of source code must retain the above copyright notice,
mbed_official 235:685d5f11838f 16 * this list of conditions and the following disclaimer.
mbed_official 235:685d5f11838f 17 * 2. Redistributions in binary form must reproduce the above copyright notice,
mbed_official 235:685d5f11838f 18 * this list of conditions and the following disclaimer in the documentation
mbed_official 235:685d5f11838f 19 * and/or other materials provided with the distribution.
mbed_official 235:685d5f11838f 20 * 3. Neither the name of STMicroelectronics nor the names of its contributors
mbed_official 235:685d5f11838f 21 * may be used to endorse or promote products derived from this software
mbed_official 235:685d5f11838f 22 * without specific prior written permission.
mbed_official 235:685d5f11838f 23 *
mbed_official 235:685d5f11838f 24 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
mbed_official 235:685d5f11838f 25 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
mbed_official 235:685d5f11838f 26 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
mbed_official 235:685d5f11838f 27 * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
mbed_official 235:685d5f11838f 28 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
mbed_official 235:685d5f11838f 29 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
mbed_official 235:685d5f11838f 30 * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
mbed_official 235:685d5f11838f 31 * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
mbed_official 235:685d5f11838f 32 * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
mbed_official 235:685d5f11838f 33 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
mbed_official 235:685d5f11838f 34 *
mbed_official 235:685d5f11838f 35 ******************************************************************************
mbed_official 235:685d5f11838f 36 */
mbed_official 235:685d5f11838f 37
mbed_official 235:685d5f11838f 38 /* Define to prevent recursive inclusion -------------------------------------*/
mbed_official 235:685d5f11838f 39 #ifndef __STM32F4xx_LL_FSMC_H
mbed_official 235:685d5f11838f 40 #define __STM32F4xx_LL_FSMC_H
mbed_official 235:685d5f11838f 41
mbed_official 235:685d5f11838f 42 #ifdef __cplusplus
mbed_official 235:685d5f11838f 43 extern "C" {
mbed_official 235:685d5f11838f 44 #endif
mbed_official 235:685d5f11838f 45
mbed_official 235:685d5f11838f 46 #if defined(STM32F405xx) || defined(STM32F415xx) || defined(STM32F407xx) || defined(STM32F417xx)
mbed_official 235:685d5f11838f 47
mbed_official 235:685d5f11838f 48 /* Includes ------------------------------------------------------------------*/
mbed_official 235:685d5f11838f 49 #include "stm32f4xx_hal_def.h"
mbed_official 235:685d5f11838f 50
mbed_official 235:685d5f11838f 51 /** @addtogroup STM32F4xx_HAL_Driver
mbed_official 235:685d5f11838f 52 * @{
mbed_official 235:685d5f11838f 53 */
mbed_official 235:685d5f11838f 54
mbed_official 235:685d5f11838f 55 /** @addtogroup FSMC
mbed_official 235:685d5f11838f 56 * @{
mbed_official 235:685d5f11838f 57 */
mbed_official 235:685d5f11838f 58
mbed_official 235:685d5f11838f 59 /* Exported typedef ----------------------------------------------------------*/
mbed_official 235:685d5f11838f 60 #define FSMC_NORSRAM_TypeDef FSMC_Bank1_TypeDef
mbed_official 235:685d5f11838f 61 #define FSMC_NORSRAM_EXTENDED_TypeDef FSMC_Bank1E_TypeDef
mbed_official 235:685d5f11838f 62 #define FSMC_NAND_TypeDef FSMC_Bank2_3_TypeDef
mbed_official 235:685d5f11838f 63 #define FSMC_PCCARD_TypeDef FSMC_Bank4_TypeDef
mbed_official 235:685d5f11838f 64
mbed_official 235:685d5f11838f 65 #define FSMC_NORSRAM_DEVICE FSMC_Bank1
mbed_official 235:685d5f11838f 66 #define FSMC_NORSRAM_EXTENDED_DEVICE FSMC_Bank1E
mbed_official 235:685d5f11838f 67 #define FSMC_NAND_DEVICE FSMC_Bank2_3
mbed_official 235:685d5f11838f 68 #define FSMC_PCCARD_DEVICE FSMC_Bank4
mbed_official 235:685d5f11838f 69
mbed_official 235:685d5f11838f 70 /**
mbed_official 235:685d5f11838f 71 * @brief FSMC_NORSRAM Configuration Structure definition
mbed_official 235:685d5f11838f 72 */
mbed_official 235:685d5f11838f 73 typedef struct
mbed_official 235:685d5f11838f 74 {
mbed_official 235:685d5f11838f 75 uint32_t NSBank; /*!< Specifies the NORSRAM memory device that will be used.
mbed_official 235:685d5f11838f 76 This parameter can be a value of @ref FSMC_NORSRAM_Bank */
mbed_official 235:685d5f11838f 77
mbed_official 235:685d5f11838f 78 uint32_t DataAddressMux; /*!< Specifies whether the address and data values are
mbed_official 235:685d5f11838f 79 multiplexed on the data bus or not.
mbed_official 235:685d5f11838f 80 This parameter can be a value of @ref FSMC_Data_Address_Bus_Multiplexing */
mbed_official 235:685d5f11838f 81
mbed_official 235:685d5f11838f 82 uint32_t MemoryType; /*!< Specifies the type of external memory attached to
mbed_official 235:685d5f11838f 83 the corresponding memory device.
mbed_official 235:685d5f11838f 84 This parameter can be a value of @ref FSMC_Memory_Type */
mbed_official 235:685d5f11838f 85
mbed_official 235:685d5f11838f 86 uint32_t MemoryDataWidth; /*!< Specifies the external memory device width.
mbed_official 235:685d5f11838f 87 This parameter can be a value of @ref FSMC_NORSRAM_Data_Width */
mbed_official 235:685d5f11838f 88
mbed_official 235:685d5f11838f 89 uint32_t BurstAccessMode; /*!< Enables or disables the burst access mode for Flash memory,
mbed_official 235:685d5f11838f 90 valid only with synchronous burst Flash memories.
mbed_official 235:685d5f11838f 91 This parameter can be a value of @ref FSMC_Burst_Access_Mode */
mbed_official 235:685d5f11838f 92
mbed_official 235:685d5f11838f 93 uint32_t WaitSignalPolarity; /*!< Specifies the wait signal polarity, valid only when accessing
mbed_official 235:685d5f11838f 94 the Flash memory in burst mode.
mbed_official 235:685d5f11838f 95 This parameter can be a value of @ref FSMC_Wait_Signal_Polarity */
mbed_official 235:685d5f11838f 96
mbed_official 235:685d5f11838f 97 uint32_t WrapMode; /*!< Enables or disables the Wrapped burst access mode for Flash
mbed_official 235:685d5f11838f 98 memory, valid only when accessing Flash memories in burst mode.
mbed_official 235:685d5f11838f 99 This parameter can be a value of @ref FSMC_Wrap_Mode */
mbed_official 235:685d5f11838f 100
mbed_official 235:685d5f11838f 101 uint32_t WaitSignalActive; /*!< Specifies if the wait signal is asserted by the memory one
mbed_official 235:685d5f11838f 102 clock cycle before the wait state or during the wait state,
mbed_official 235:685d5f11838f 103 valid only when accessing memories in burst mode.
mbed_official 235:685d5f11838f 104 This parameter can be a value of @ref FSMC_Wait_Timing */
mbed_official 235:685d5f11838f 105
mbed_official 235:685d5f11838f 106 uint32_t WriteOperation; /*!< Enables or disables the write operation in the selected device by the FSMC.
mbed_official 235:685d5f11838f 107 This parameter can be a value of @ref FSMC_Write_Operation */
mbed_official 235:685d5f11838f 108
mbed_official 235:685d5f11838f 109 uint32_t WaitSignal; /*!< Enables or disables the wait state insertion via wait
mbed_official 235:685d5f11838f 110 signal, valid for Flash memory access in burst mode.
mbed_official 235:685d5f11838f 111 This parameter can be a value of @ref FSMC_Wait_Signal */
mbed_official 235:685d5f11838f 112
mbed_official 235:685d5f11838f 113 uint32_t ExtendedMode; /*!< Enables or disables the extended mode.
mbed_official 235:685d5f11838f 114 This parameter can be a value of @ref FSMC_Extended_Mode */
mbed_official 235:685d5f11838f 115
mbed_official 235:685d5f11838f 116 uint32_t AsynchronousWait; /*!< Enables or disables wait signal during asynchronous transfers,
mbed_official 235:685d5f11838f 117 valid only with asynchronous Flash memories.
mbed_official 235:685d5f11838f 118 This parameter can be a value of @ref FSMC_AsynchronousWait */
mbed_official 235:685d5f11838f 119
mbed_official 235:685d5f11838f 120 uint32_t WriteBurst; /*!< Enables or disables the write burst operation.
mbed_official 235:685d5f11838f 121 This parameter can be a value of @ref FSMC_Write_Burst */
mbed_official 235:685d5f11838f 122
mbed_official 235:685d5f11838f 123 }FSMC_NORSRAM_InitTypeDef;
mbed_official 235:685d5f11838f 124
mbed_official 235:685d5f11838f 125 /**
mbed_official 235:685d5f11838f 126 * @brief FSMC_NORSRAM Timing parameters structure definition
mbed_official 235:685d5f11838f 127 */
mbed_official 235:685d5f11838f 128 typedef struct
mbed_official 235:685d5f11838f 129 {
mbed_official 235:685d5f11838f 130 uint32_t AddressSetupTime; /*!< Defines the number of HCLK cycles to configure
mbed_official 235:685d5f11838f 131 the duration of the address setup time.
mbed_official 235:685d5f11838f 132 This parameter can be a value between Min_Data = 0 and Max_Data = 15.
mbed_official 235:685d5f11838f 133 @note This parameter is not used with synchronous NOR Flash memories. */
mbed_official 235:685d5f11838f 134
mbed_official 235:685d5f11838f 135 uint32_t AddressHoldTime; /*!< Defines the number of HCLK cycles to configure
mbed_official 235:685d5f11838f 136 the duration of the address hold time.
mbed_official 235:685d5f11838f 137 This parameter can be a value between Min_Data = 1 and Max_Data = 15.
mbed_official 235:685d5f11838f 138 @note This parameter is not used with synchronous NOR Flash memories. */
mbed_official 235:685d5f11838f 139
mbed_official 235:685d5f11838f 140 uint32_t DataSetupTime; /*!< Defines the number of HCLK cycles to configure
mbed_official 235:685d5f11838f 141 the duration of the data setup time.
mbed_official 235:685d5f11838f 142 This parameter can be a value between Min_Data = 1 and Max_Data = 255.
mbed_official 235:685d5f11838f 143 @note This parameter is used for SRAMs, ROMs and asynchronous multiplexed
mbed_official 235:685d5f11838f 144 NOR Flash memories. */
mbed_official 235:685d5f11838f 145
mbed_official 235:685d5f11838f 146 uint32_t BusTurnAroundDuration; /*!< Defines the number of HCLK cycles to configure
mbed_official 235:685d5f11838f 147 the duration of the bus turnaround.
mbed_official 235:685d5f11838f 148 This parameter can be a value between Min_Data = 0 and Max_Data = 15.
mbed_official 235:685d5f11838f 149 @note This parameter is only used for multiplexed NOR Flash memories. */
mbed_official 235:685d5f11838f 150
mbed_official 235:685d5f11838f 151 uint32_t CLKDivision; /*!< Defines the period of CLK clock output signal, expressed in number of
mbed_official 235:685d5f11838f 152 HCLK cycles. This parameter can be a value between Min_Data = 2 and Max_Data = 16.
mbed_official 235:685d5f11838f 153 @note This parameter is not used for asynchronous NOR Flash, SRAM or ROM
mbed_official 235:685d5f11838f 154 accesses. */
mbed_official 235:685d5f11838f 155
mbed_official 235:685d5f11838f 156 uint32_t DataLatency; /*!< Defines the number of memory clock cycles to issue
mbed_official 235:685d5f11838f 157 to the memory before getting the first data.
mbed_official 235:685d5f11838f 158 The parameter value depends on the memory type as shown below:
mbed_official 235:685d5f11838f 159 - It must be set to 0 in case of a CRAM
mbed_official 235:685d5f11838f 160 - It is don't care in asynchronous NOR, SRAM or ROM accesses
mbed_official 235:685d5f11838f 161 - It may assume a value between Min_Data = 2 and Max_Data = 17 in NOR Flash memories
mbed_official 235:685d5f11838f 162 with synchronous burst mode enable */
mbed_official 235:685d5f11838f 163
mbed_official 235:685d5f11838f 164 uint32_t AccessMode; /*!< Specifies the asynchronous access mode.
mbed_official 235:685d5f11838f 165 This parameter can be a value of @ref FSMC_Access_Mode */
mbed_official 235:685d5f11838f 166
mbed_official 235:685d5f11838f 167 }FSMC_NORSRAM_TimingTypeDef;
mbed_official 235:685d5f11838f 168
mbed_official 235:685d5f11838f 169 /**
mbed_official 235:685d5f11838f 170 * @brief FSMC_NAND Configuration Structure definition
mbed_official 235:685d5f11838f 171 */
mbed_official 235:685d5f11838f 172 typedef struct
mbed_official 235:685d5f11838f 173 {
mbed_official 235:685d5f11838f 174 uint32_t NandBank; /*!< Specifies the NAND memory device that will be used.
mbed_official 235:685d5f11838f 175 This parameter can be a value of @ref FSMC_NAND_Bank */
mbed_official 235:685d5f11838f 176
mbed_official 235:685d5f11838f 177 uint32_t Waitfeature; /*!< Enables or disables the Wait feature for the NAND Memory device.
mbed_official 235:685d5f11838f 178 This parameter can be any value of @ref FSMC_Wait_feature */
mbed_official 235:685d5f11838f 179
mbed_official 235:685d5f11838f 180 uint32_t MemoryDataWidth; /*!< Specifies the external memory device width.
mbed_official 235:685d5f11838f 181 This parameter can be any value of @ref FSMC_NAND_Data_Width */
mbed_official 235:685d5f11838f 182
mbed_official 235:685d5f11838f 183 uint32_t EccComputation; /*!< Enables or disables the ECC computation.
mbed_official 235:685d5f11838f 184 This parameter can be any value of @ref FSMC_ECC */
mbed_official 235:685d5f11838f 185
mbed_official 235:685d5f11838f 186 uint32_t ECCPageSize; /*!< Defines the page size for the extended ECC.
mbed_official 235:685d5f11838f 187 This parameter can be any value of @ref FSMC_ECC_Page_Size */
mbed_official 235:685d5f11838f 188
mbed_official 235:685d5f11838f 189 uint32_t TCLRSetupTime; /*!< Defines the number of HCLK cycles to configure the
mbed_official 235:685d5f11838f 190 delay between CLE low and RE low.
mbed_official 235:685d5f11838f 191 This parameter can be a value between Min_Data = 0 and Max_Data = 255 */
mbed_official 235:685d5f11838f 192
mbed_official 235:685d5f11838f 193 uint32_t TARSetupTime; /*!< Defines the number of HCLK cycles to configure the
mbed_official 235:685d5f11838f 194 delay between ALE low and RE low.
mbed_official 235:685d5f11838f 195 This parameter can be a number between Min_Data = 0 and Max_Data = 255 */
mbed_official 235:685d5f11838f 196
mbed_official 235:685d5f11838f 197 }FSMC_NAND_InitTypeDef;
mbed_official 235:685d5f11838f 198
mbed_official 235:685d5f11838f 199 /**
mbed_official 235:685d5f11838f 200 * @brief FSMC_NAND_PCCARD Timing parameters structure definition
mbed_official 235:685d5f11838f 201 */
mbed_official 235:685d5f11838f 202 typedef struct
mbed_official 235:685d5f11838f 203 {
mbed_official 235:685d5f11838f 204 uint32_t SetupTime; /*!< Defines the number of HCLK cycles to setup address before
mbed_official 235:685d5f11838f 205 the command assertion for NAND-Flash read or write access
mbed_official 235:685d5f11838f 206 to common/Attribute or I/O memory space (depending on
mbed_official 235:685d5f11838f 207 the memory space timing to be configured).
mbed_official 235:685d5f11838f 208 This parameter can be a value between Min_Data = 0 and Max_Data = 255 */
mbed_official 235:685d5f11838f 209
mbed_official 235:685d5f11838f 210 uint32_t WaitSetupTime; /*!< Defines the minimum number of HCLK cycles to assert the
mbed_official 235:685d5f11838f 211 command for NAND-Flash read or write access to
mbed_official 235:685d5f11838f 212 common/Attribute or I/O memory space (depending on the
mbed_official 235:685d5f11838f 213 memory space timing to be configured).
mbed_official 235:685d5f11838f 214 This parameter can be a number between Min_Data = 0 and Max_Data = 255 */
mbed_official 235:685d5f11838f 215
mbed_official 235:685d5f11838f 216 uint32_t HoldSetupTime; /*!< Defines the number of HCLK clock cycles to hold address
mbed_official 235:685d5f11838f 217 (and data for write access) after the command de-assertion
mbed_official 235:685d5f11838f 218 for NAND-Flash read or write access to common/Attribute
mbed_official 235:685d5f11838f 219 or I/O memory space (depending on the memory space timing
mbed_official 235:685d5f11838f 220 to be configured).
mbed_official 235:685d5f11838f 221 This parameter can be a number between Min_Data = 0 and Max_Data = 255 */
mbed_official 235:685d5f11838f 222
mbed_official 235:685d5f11838f 223 uint32_t HiZSetupTime; /*!< Defines the number of HCLK clock cycles during which the
mbed_official 235:685d5f11838f 224 data bus is kept in HiZ after the start of a NAND-Flash
mbed_official 235:685d5f11838f 225 write access to common/Attribute or I/O memory space (depending
mbed_official 235:685d5f11838f 226 on the memory space timing to be configured).
mbed_official 235:685d5f11838f 227 This parameter can be a number between Min_Data = 0 and Max_Data = 255 */
mbed_official 235:685d5f11838f 228
mbed_official 235:685d5f11838f 229 }FSMC_NAND_PCC_TimingTypeDef;
mbed_official 235:685d5f11838f 230
mbed_official 235:685d5f11838f 231 /**
mbed_official 235:685d5f11838f 232 * @brief FSMC_NAND Configuration Structure definition
mbed_official 235:685d5f11838f 233 */
mbed_official 235:685d5f11838f 234 typedef struct
mbed_official 235:685d5f11838f 235 {
mbed_official 235:685d5f11838f 236 uint32_t Waitfeature; /*!< Enables or disables the Wait feature for the PCCARD Memory device.
mbed_official 235:685d5f11838f 237 This parameter can be any value of @ref FSMC_Wait_feature */
mbed_official 235:685d5f11838f 238
mbed_official 235:685d5f11838f 239 uint32_t TCLRSetupTime; /*!< Defines the number of HCLK cycles to configure the
mbed_official 235:685d5f11838f 240 delay between CLE low and RE low.
mbed_official 235:685d5f11838f 241 This parameter can be a value between Min_Data = 0 and Max_Data = 255 */
mbed_official 235:685d5f11838f 242
mbed_official 235:685d5f11838f 243 uint32_t TARSetupTime; /*!< Defines the number of HCLK cycles to configure the
mbed_official 235:685d5f11838f 244 delay between ALE low and RE low.
mbed_official 235:685d5f11838f 245 This parameter can be a number between Min_Data = 0 and Max_Data = 255 */
mbed_official 235:685d5f11838f 246
mbed_official 235:685d5f11838f 247 }FSMC_PCCARD_InitTypeDef;
mbed_official 235:685d5f11838f 248
mbed_official 235:685d5f11838f 249 /* Exported constants --------------------------------------------------------*/
mbed_official 235:685d5f11838f 250
mbed_official 235:685d5f11838f 251 /** @defgroup FSMC_NOR_SRAM_Controller
mbed_official 235:685d5f11838f 252 * @{
mbed_official 235:685d5f11838f 253 */
mbed_official 235:685d5f11838f 254
mbed_official 235:685d5f11838f 255 /** @defgroup FSMC_NORSRAM_Bank
mbed_official 235:685d5f11838f 256 * @{
mbed_official 235:685d5f11838f 257 */
mbed_official 235:685d5f11838f 258 #define FSMC_NORSRAM_BANK1 ((uint32_t)0x00000000)
mbed_official 235:685d5f11838f 259 #define FSMC_NORSRAM_BANK2 ((uint32_t)0x00000002)
mbed_official 235:685d5f11838f 260 #define FSMC_NORSRAM_BANK3 ((uint32_t)0x00000004)
mbed_official 235:685d5f11838f 261 #define FSMC_NORSRAM_BANK4 ((uint32_t)0x00000006)
mbed_official 235:685d5f11838f 262
mbed_official 235:685d5f11838f 263 #define IS_FSMC_NORSRAM_BANK(BANK) (((BANK) == FSMC_NORSRAM_BANK1) || \
mbed_official 235:685d5f11838f 264 ((BANK) == FSMC_NORSRAM_BANK2) || \
mbed_official 235:685d5f11838f 265 ((BANK) == FSMC_NORSRAM_BANK3) || \
mbed_official 235:685d5f11838f 266 ((BANK) == FSMC_NORSRAM_BANK4))
mbed_official 235:685d5f11838f 267 /**
mbed_official 235:685d5f11838f 268 * @}
mbed_official 235:685d5f11838f 269 */
mbed_official 235:685d5f11838f 270
mbed_official 235:685d5f11838f 271 /** @defgroup FSMC_Data_Address_Bus_Multiplexing
mbed_official 235:685d5f11838f 272 * @{
mbed_official 235:685d5f11838f 273 */
mbed_official 235:685d5f11838f 274
mbed_official 235:685d5f11838f 275 #define FSMC_DATA_ADDRESS_MUX_DISABLE ((uint32_t)0x00000000)
mbed_official 235:685d5f11838f 276 #define FSMC_DATA_ADDRESS_MUX_ENABLE ((uint32_t)0x00000002)
mbed_official 235:685d5f11838f 277
mbed_official 235:685d5f11838f 278 #define IS_FSMC_MUX(MUX) (((MUX) == FSMC_DATA_ADDRESS_MUX_DISABLE) || \
mbed_official 235:685d5f11838f 279 ((MUX) == FSMC_DATA_ADDRESS_MUX_ENABLE))
mbed_official 235:685d5f11838f 280 /**
mbed_official 235:685d5f11838f 281 * @}
mbed_official 235:685d5f11838f 282 */
mbed_official 235:685d5f11838f 283
mbed_official 235:685d5f11838f 284 /** @defgroup FSMC_Memory_Type
mbed_official 235:685d5f11838f 285 * @{
mbed_official 235:685d5f11838f 286 */
mbed_official 235:685d5f11838f 287
mbed_official 235:685d5f11838f 288 #define FSMC_MEMORY_TYPE_SRAM ((uint32_t)0x00000000)
mbed_official 235:685d5f11838f 289 #define FSMC_MEMORY_TYPE_PSRAM ((uint32_t)0x00000004)
mbed_official 235:685d5f11838f 290 #define FSMC_MEMORY_TYPE_NOR ((uint32_t)0x00000008)
mbed_official 235:685d5f11838f 291
mbed_official 235:685d5f11838f 292
mbed_official 235:685d5f11838f 293 #define IS_FSMC_MEMORY(MEMORY) (((MEMORY) == FSMC_MEMORY_TYPE_SRAM) || \
mbed_official 235:685d5f11838f 294 ((MEMORY) == FSMC_MEMORY_TYPE_PSRAM)|| \
mbed_official 235:685d5f11838f 295 ((MEMORY) == FSMC_MEMORY_TYPE_NOR))
mbed_official 235:685d5f11838f 296 /**
mbed_official 235:685d5f11838f 297 * @}
mbed_official 235:685d5f11838f 298 */
mbed_official 235:685d5f11838f 299
mbed_official 235:685d5f11838f 300 /** @defgroup FSMC_NORSRAM_Data_Width
mbed_official 235:685d5f11838f 301 * @{
mbed_official 235:685d5f11838f 302 */
mbed_official 235:685d5f11838f 303
mbed_official 235:685d5f11838f 304 #define FSMC_NORSRAM_MEM_BUS_WIDTH_8 ((uint32_t)0x00000000)
mbed_official 235:685d5f11838f 305 #define FSMC_NORSRAM_MEM_BUS_WIDTH_16 ((uint32_t)0x00000010)
mbed_official 235:685d5f11838f 306 #define FSMC_NORSRAM_MEM_BUS_WIDTH_32 ((uint32_t)0x00000020)
mbed_official 235:685d5f11838f 307
mbed_official 235:685d5f11838f 308 #define IS_FSMC_NORSRAM_MEMORY_WIDTH(WIDTH) (((WIDTH) == FSMC_NORSRAM_MEM_BUS_WIDTH_8) || \
mbed_official 235:685d5f11838f 309 ((WIDTH) == FSMC_NORSRAM_MEM_BUS_WIDTH_16) || \
mbed_official 235:685d5f11838f 310 ((WIDTH) == FSMC_NORSRAM_MEM_BUS_WIDTH_32))
mbed_official 235:685d5f11838f 311 /**
mbed_official 235:685d5f11838f 312 * @}
mbed_official 235:685d5f11838f 313 */
mbed_official 235:685d5f11838f 314
mbed_official 235:685d5f11838f 315 /** @defgroup FSMC_NORSRAM_Flash_Access
mbed_official 235:685d5f11838f 316 * @{
mbed_official 235:685d5f11838f 317 */
mbed_official 235:685d5f11838f 318 #define FSMC_NORSRAM_FLASH_ACCESS_ENABLE ((uint32_t)0x00000040)
mbed_official 235:685d5f11838f 319 #define FSMC_NORSRAM_FLASH_ACCESS_DISABLE ((uint32_t)0x00000000)
mbed_official 235:685d5f11838f 320 /**
mbed_official 235:685d5f11838f 321 * @}
mbed_official 235:685d5f11838f 322 */
mbed_official 235:685d5f11838f 323
mbed_official 235:685d5f11838f 324 /** @defgroup FSMC_Burst_Access_Mode
mbed_official 235:685d5f11838f 325 * @{
mbed_official 235:685d5f11838f 326 */
mbed_official 235:685d5f11838f 327
mbed_official 235:685d5f11838f 328 #define FSMC_BURST_ACCESS_MODE_DISABLE ((uint32_t)0x00000000)
mbed_official 235:685d5f11838f 329 #define FSMC_BURST_ACCESS_MODE_ENABLE ((uint32_t)0x00000100)
mbed_official 235:685d5f11838f 330
mbed_official 235:685d5f11838f 331 #define IS_FSMC_BURSTMODE(STATE) (((STATE) == FSMC_BURST_ACCESS_MODE_DISABLE) || \
mbed_official 235:685d5f11838f 332 ((STATE) == FSMC_BURST_ACCESS_MODE_ENABLE))
mbed_official 235:685d5f11838f 333 /**
mbed_official 235:685d5f11838f 334 * @}
mbed_official 235:685d5f11838f 335 */
mbed_official 235:685d5f11838f 336
mbed_official 235:685d5f11838f 337
mbed_official 235:685d5f11838f 338 /** @defgroup FSMC_Wait_Signal_Polarity
mbed_official 235:685d5f11838f 339 * @{
mbed_official 235:685d5f11838f 340 */
mbed_official 235:685d5f11838f 341 #define FSMC_WAIT_SIGNAL_POLARITY_LOW ((uint32_t)0x00000000)
mbed_official 235:685d5f11838f 342 #define FSMC_WAIT_SIGNAL_POLARITY_HIGH ((uint32_t)0x00000200)
mbed_official 235:685d5f11838f 343
mbed_official 235:685d5f11838f 344 #define IS_FSMC_WAIT_POLARITY(POLARITY) (((POLARITY) == FSMC_WAIT_SIGNAL_POLARITY_LOW) || \
mbed_official 235:685d5f11838f 345 ((POLARITY) == FSMC_WAIT_SIGNAL_POLARITY_HIGH))
mbed_official 235:685d5f11838f 346 /**
mbed_official 235:685d5f11838f 347 * @}
mbed_official 235:685d5f11838f 348 */
mbed_official 235:685d5f11838f 349
mbed_official 235:685d5f11838f 350 /** @defgroup FSMC_Wrap_Mode
mbed_official 235:685d5f11838f 351 * @{
mbed_official 235:685d5f11838f 352 */
mbed_official 235:685d5f11838f 353 #define FSMC_WRAP_MODE_DISABLE ((uint32_t)0x00000000)
mbed_official 235:685d5f11838f 354 #define FSMC_WRAP_MODE_ENABLE ((uint32_t)0x00000400)
mbed_official 235:685d5f11838f 355
mbed_official 235:685d5f11838f 356 #define IS_FSMC_WRAP_MODE(MODE) (((MODE) == FSMC_WRAP_MODE_DISABLE) || \
mbed_official 235:685d5f11838f 357 ((MODE) == FSMC_WRAP_MODE_ENABLE))
mbed_official 235:685d5f11838f 358 /**
mbed_official 235:685d5f11838f 359 * @}
mbed_official 235:685d5f11838f 360 */
mbed_official 235:685d5f11838f 361
mbed_official 235:685d5f11838f 362 /** @defgroup FSMC_Wait_Timing
mbed_official 235:685d5f11838f 363 * @{
mbed_official 235:685d5f11838f 364 */
mbed_official 235:685d5f11838f 365 #define FSMC_WAIT_TIMING_BEFORE_WS ((uint32_t)0x00000000)
mbed_official 235:685d5f11838f 366 #define FSMC_WAIT_TIMING_DURING_WS ((uint32_t)0x00000800)
mbed_official 235:685d5f11838f 367
mbed_official 235:685d5f11838f 368 #define IS_FSMC_WAIT_SIGNAL_ACTIVE(ACTIVE) (((ACTIVE) == FSMC_WAIT_TIMING_BEFORE_WS) || \
mbed_official 235:685d5f11838f 369 ((ACTIVE) == FSMC_WAIT_TIMING_DURING_WS))
mbed_official 235:685d5f11838f 370 /**
mbed_official 235:685d5f11838f 371 * @}
mbed_official 235:685d5f11838f 372 */
mbed_official 235:685d5f11838f 373
mbed_official 235:685d5f11838f 374 /** @defgroup FSMC_Write_Operation
mbed_official 235:685d5f11838f 375 * @{
mbed_official 235:685d5f11838f 376 */
mbed_official 235:685d5f11838f 377 #define FSMC_WRITE_OPERATION_DISABLE ((uint32_t)0x00000000)
mbed_official 235:685d5f11838f 378 #define FSMC_WRITE_OPERATION_ENABLE ((uint32_t)0x00001000)
mbed_official 235:685d5f11838f 379
mbed_official 235:685d5f11838f 380 #define IS_FSMC_WRITE_OPERATION(OPERATION) (((OPERATION) == FSMC_WRITE_OPERATION_DISABLE) || \
mbed_official 235:685d5f11838f 381 ((OPERATION) == FSMC_WRITE_OPERATION_ENABLE))
mbed_official 235:685d5f11838f 382 /**
mbed_official 235:685d5f11838f 383 * @}
mbed_official 235:685d5f11838f 384 */
mbed_official 235:685d5f11838f 385
mbed_official 235:685d5f11838f 386 /** @defgroup FSMC_Wait_Signal
mbed_official 235:685d5f11838f 387 * @{
mbed_official 235:685d5f11838f 388 */
mbed_official 235:685d5f11838f 389 #define FSMC_WAIT_SIGNAL_DISABLE ((uint32_t)0x00000000)
mbed_official 235:685d5f11838f 390 #define FSMC_WAIT_SIGNAL_ENABLE ((uint32_t)0x00002000)
mbed_official 235:685d5f11838f 391
mbed_official 235:685d5f11838f 392 #define IS_FSMC_WAITE_SIGNAL(SIGNAL) (((SIGNAL) == FSMC_WAIT_SIGNAL_DISABLE) || \
mbed_official 235:685d5f11838f 393 ((SIGNAL) == FSMC_WAIT_SIGNAL_ENABLE))
mbed_official 235:685d5f11838f 394
mbed_official 235:685d5f11838f 395 /**
mbed_official 235:685d5f11838f 396 * @}
mbed_official 235:685d5f11838f 397 */
mbed_official 235:685d5f11838f 398
mbed_official 235:685d5f11838f 399 /** @defgroup FSMC_Extended_Mode
mbed_official 235:685d5f11838f 400 * @{
mbed_official 235:685d5f11838f 401 */
mbed_official 235:685d5f11838f 402 #define FSMC_EXTENDED_MODE_DISABLE ((uint32_t)0x00000000)
mbed_official 235:685d5f11838f 403 #define FSMC_EXTENDED_MODE_ENABLE ((uint32_t)0x00004000)
mbed_official 235:685d5f11838f 404
mbed_official 235:685d5f11838f 405 #define IS_FSMC_EXTENDED_MODE(MODE) (((MODE) == FSMC_EXTENDED_MODE_DISABLE) || \
mbed_official 235:685d5f11838f 406 ((MODE) == FSMC_EXTENDED_MODE_ENABLE))
mbed_official 235:685d5f11838f 407 /**
mbed_official 235:685d5f11838f 408 * @}
mbed_official 235:685d5f11838f 409 */
mbed_official 235:685d5f11838f 410
mbed_official 235:685d5f11838f 411 /** @defgroup FSMC_AsynchronousWait
mbed_official 235:685d5f11838f 412 * @{
mbed_official 235:685d5f11838f 413 */
mbed_official 235:685d5f11838f 414 #define FSMC_ASYNCHRONOUS_WAIT_DISABLE ((uint32_t)0x00000000)
mbed_official 235:685d5f11838f 415 #define FSMC_ASYNCHRONOUS_WAIT_ENABLE ((uint32_t)0x00008000)
mbed_official 235:685d5f11838f 416
mbed_official 235:685d5f11838f 417 #define IS_FSMC_ASYNWAIT(STATE) (((STATE) == FSMC_ASYNCHRONOUS_WAIT_DISABLE) || \
mbed_official 235:685d5f11838f 418 ((STATE) == FSMC_ASYNCHRONOUS_WAIT_ENABLE))
mbed_official 235:685d5f11838f 419
mbed_official 235:685d5f11838f 420 /**
mbed_official 235:685d5f11838f 421 * @}
mbed_official 235:685d5f11838f 422 */
mbed_official 235:685d5f11838f 423
mbed_official 235:685d5f11838f 424 /** @defgroup FSMC_Write_Burst
mbed_official 235:685d5f11838f 425 * @{
mbed_official 235:685d5f11838f 426 */
mbed_official 235:685d5f11838f 427
mbed_official 235:685d5f11838f 428 #define FSMC_WRITE_BURST_DISABLE ((uint32_t)0x00000000)
mbed_official 235:685d5f11838f 429 #define FSMC_WRITE_BURST_ENABLE ((uint32_t)0x00080000)
mbed_official 235:685d5f11838f 430
mbed_official 235:685d5f11838f 431 #define IS_FSMC_WRITE_BURST(BURST) (((BURST) == FSMC_WRITE_BURST_DISABLE) || \
mbed_official 235:685d5f11838f 432 ((BURST) == FSMC_WRITE_BURST_ENABLE))
mbed_official 235:685d5f11838f 433
mbed_official 235:685d5f11838f 434 /**
mbed_official 235:685d5f11838f 435 * @}
mbed_official 235:685d5f11838f 436 */
mbed_official 235:685d5f11838f 437
mbed_official 235:685d5f11838f 438 /** @defgroup FSMC_Continous_Clock
mbed_official 235:685d5f11838f 439 * @{
mbed_official 235:685d5f11838f 440 */
mbed_official 235:685d5f11838f 441
mbed_official 235:685d5f11838f 442 #define FSMC_CONTINUOUS_CLOCK_SYNC_ONLY ((uint32_t)0x00000000)
mbed_official 235:685d5f11838f 443 #define FSMC_CONTINUOUS_CLOCK_SYNC_ASYNC ((uint32_t)0x00100000)
mbed_official 235:685d5f11838f 444
mbed_official 235:685d5f11838f 445 #define IS_FSMC_CONTINOUS_CLOCK(CCLOCK) (((CCLOCK) == FSMC_CONTINUOUS_CLOCK_SYNC_ONLY) || \
mbed_official 235:685d5f11838f 446 ((CCLOCK) == FSMC_CONTINUOUS_CLOCK_SYNC_ASYNC))
mbed_official 235:685d5f11838f 447
mbed_official 235:685d5f11838f 448 /**
mbed_official 235:685d5f11838f 449 * @}
mbed_official 235:685d5f11838f 450 */
mbed_official 235:685d5f11838f 451
mbed_official 235:685d5f11838f 452 /** @defgroup FSMC_Address_Setup_Time
mbed_official 235:685d5f11838f 453 * @{
mbed_official 235:685d5f11838f 454 */
mbed_official 235:685d5f11838f 455 #define IS_FSMC_ADDRESS_SETUP_TIME(TIME) ((TIME) <= 15)
mbed_official 235:685d5f11838f 456 /**
mbed_official 235:685d5f11838f 457 * @}
mbed_official 235:685d5f11838f 458 */
mbed_official 235:685d5f11838f 459
mbed_official 235:685d5f11838f 460 /** @defgroup FSMC_Address_Hold_Time
mbed_official 235:685d5f11838f 461 * @{
mbed_official 235:685d5f11838f 462 */
mbed_official 235:685d5f11838f 463 #define IS_FSMC_ADDRESS_HOLD_TIME(TIME) (((TIME) > 0) && ((TIME) <= 15))
mbed_official 235:685d5f11838f 464 /**
mbed_official 235:685d5f11838f 465 * @}
mbed_official 235:685d5f11838f 466 */
mbed_official 235:685d5f11838f 467
mbed_official 235:685d5f11838f 468 /** @defgroup FSMC_Data_Setup_Time
mbed_official 235:685d5f11838f 469 * @{
mbed_official 235:685d5f11838f 470 */
mbed_official 235:685d5f11838f 471 #define IS_FSMC_DATASETUP_TIME(TIME) (((TIME) > 0) && ((TIME) <= 255))
mbed_official 235:685d5f11838f 472 /**
mbed_official 235:685d5f11838f 473 * @}
mbed_official 235:685d5f11838f 474 */
mbed_official 235:685d5f11838f 475
mbed_official 235:685d5f11838f 476 /** @defgroup FSMC_Bus_Turn_around_Duration
mbed_official 235:685d5f11838f 477 * @{
mbed_official 235:685d5f11838f 478 */
mbed_official 235:685d5f11838f 479 #define IS_FSMC_TURNAROUND_TIME(TIME) ((TIME) <= 15)
mbed_official 235:685d5f11838f 480 /**
mbed_official 235:685d5f11838f 481 * @}
mbed_official 235:685d5f11838f 482 */
mbed_official 235:685d5f11838f 483
mbed_official 235:685d5f11838f 484 /** @defgroup FSMC_CLK_Division
mbed_official 235:685d5f11838f 485 * @{
mbed_official 235:685d5f11838f 486 */
mbed_official 235:685d5f11838f 487 #define IS_FSMC_CLK_DIV(DIV) (((DIV) > 1) && ((DIV) <= 16))
mbed_official 235:685d5f11838f 488 /**
mbed_official 235:685d5f11838f 489 * @}
mbed_official 235:685d5f11838f 490 */
mbed_official 235:685d5f11838f 491
mbed_official 235:685d5f11838f 492 /** @defgroup FSMC_Data_Latency
mbed_official 235:685d5f11838f 493 * @{
mbed_official 235:685d5f11838f 494 */
mbed_official 235:685d5f11838f 495 #define IS_FSMC_DATA_LATENCY(LATENCY) (((LATENCY) > 1) && ((LATENCY) <= 17))
mbed_official 235:685d5f11838f 496 /**
mbed_official 235:685d5f11838f 497 * @}
mbed_official 235:685d5f11838f 498 */
mbed_official 235:685d5f11838f 499
mbed_official 235:685d5f11838f 500 /** @defgroup FSMC_Access_Mode
mbed_official 235:685d5f11838f 501 * @{
mbed_official 235:685d5f11838f 502 */
mbed_official 235:685d5f11838f 503 #define FSMC_ACCESS_MODE_A ((uint32_t)0x00000000)
mbed_official 235:685d5f11838f 504 #define FSMC_ACCESS_MODE_B ((uint32_t)0x10000000)
mbed_official 235:685d5f11838f 505 #define FSMC_ACCESS_MODE_C ((uint32_t)0x20000000)
mbed_official 235:685d5f11838f 506 #define FSMC_ACCESS_MODE_D ((uint32_t)0x30000000)
mbed_official 235:685d5f11838f 507
mbed_official 235:685d5f11838f 508 #define IS_FSMC_ACCESS_MODE(MODE) (((MODE) == FSMC_ACCESS_MODE_A) || \
mbed_official 235:685d5f11838f 509 ((MODE) == FSMC_ACCESS_MODE_B) || \
mbed_official 235:685d5f11838f 510 ((MODE) == FSMC_ACCESS_MODE_C) || \
mbed_official 235:685d5f11838f 511 ((MODE) == FSMC_ACCESS_MODE_D))
mbed_official 235:685d5f11838f 512 /**
mbed_official 235:685d5f11838f 513 * @}
mbed_official 235:685d5f11838f 514 */
mbed_official 235:685d5f11838f 515
mbed_official 235:685d5f11838f 516 /**
mbed_official 235:685d5f11838f 517 * @}
mbed_official 235:685d5f11838f 518 */
mbed_official 235:685d5f11838f 519
mbed_official 235:685d5f11838f 520 /** @defgroup FSMC_NAND_Controller
mbed_official 235:685d5f11838f 521 * @{
mbed_official 235:685d5f11838f 522 */
mbed_official 235:685d5f11838f 523
mbed_official 235:685d5f11838f 524 /** @defgroup FSMC_NAND_Bank
mbed_official 235:685d5f11838f 525 * @{
mbed_official 235:685d5f11838f 526 */
mbed_official 235:685d5f11838f 527 #define FSMC_NAND_BANK2 ((uint32_t)0x00000010)
mbed_official 235:685d5f11838f 528 #define FSMC_NAND_BANK3 ((uint32_t)0x00000100)
mbed_official 235:685d5f11838f 529
mbed_official 235:685d5f11838f 530 #define IS_FSMC_NAND_BANK(BANK) (((BANK) == FSMC_NAND_BANK2) || \
mbed_official 235:685d5f11838f 531 ((BANK) == FSMC_NAND_BANK3))
mbed_official 235:685d5f11838f 532
mbed_official 235:685d5f11838f 533 /**
mbed_official 235:685d5f11838f 534 * @}
mbed_official 235:685d5f11838f 535 */
mbed_official 235:685d5f11838f 536
mbed_official 235:685d5f11838f 537 /** @defgroup FSMC_Wait_feature
mbed_official 235:685d5f11838f 538 * @{
mbed_official 235:685d5f11838f 539 */
mbed_official 235:685d5f11838f 540 #define FSMC_NAND_PCC_WAIT_FEATURE_DISABLE ((uint32_t)0x00000000)
mbed_official 235:685d5f11838f 541 #define FSMC_NAND_PCC_WAIT_FEATURE_ENABLE ((uint32_t)0x00000002)
mbed_official 235:685d5f11838f 542
mbed_official 235:685d5f11838f 543 #define IS_FSMC_WAIT_FEATURE(FEATURE) (((FEATURE) == FSMC_NAND_PCC_WAIT_FEATURE_DISABLE) || \
mbed_official 235:685d5f11838f 544 ((FEATURE) == FSMC_NAND_PCC_WAIT_FEATURE_ENABLE))
mbed_official 235:685d5f11838f 545 /**
mbed_official 235:685d5f11838f 546 * @}
mbed_official 235:685d5f11838f 547 */
mbed_official 235:685d5f11838f 548
mbed_official 235:685d5f11838f 549 /** @defgroup FSMC_PCR_Memory_Type
mbed_official 235:685d5f11838f 550 * @{
mbed_official 235:685d5f11838f 551 */
mbed_official 235:685d5f11838f 552 #define FSMC_PCR_MEMORY_TYPE_PCCARD ((uint32_t)0x00000000)
mbed_official 235:685d5f11838f 553 #define FSMC_PCR_MEMORY_TYPE_NAND ((uint32_t)0x00000008)
mbed_official 235:685d5f11838f 554 /**
mbed_official 235:685d5f11838f 555 * @}
mbed_official 235:685d5f11838f 556 */
mbed_official 235:685d5f11838f 557
mbed_official 235:685d5f11838f 558 /** @defgroup FSMC_NAND_Data_Width
mbed_official 235:685d5f11838f 559 * @{
mbed_official 235:685d5f11838f 560 */
mbed_official 235:685d5f11838f 561 #define FSMC_NAND_PCC_MEM_BUS_WIDTH_8 ((uint32_t)0x00000000)
mbed_official 235:685d5f11838f 562 #define FSMC_NAND_PCC_MEM_BUS_WIDTH_16 ((uint32_t)0x00000010)
mbed_official 235:685d5f11838f 563
mbed_official 235:685d5f11838f 564 #define IS_FSMC_NAND_MEMORY_WIDTH(WIDTH) (((WIDTH) == FSMC_NAND_PCC_MEM_BUS_WIDTH_8) || \
mbed_official 235:685d5f11838f 565 ((WIDTH) == FSMC_NAND_PCC_MEM_BUS_WIDTH_16))
mbed_official 235:685d5f11838f 566 /**
mbed_official 235:685d5f11838f 567 * @}
mbed_official 235:685d5f11838f 568 */
mbed_official 235:685d5f11838f 569
mbed_official 235:685d5f11838f 570 /** @defgroup FSMC_ECC
mbed_official 235:685d5f11838f 571 * @{
mbed_official 235:685d5f11838f 572 */
mbed_official 235:685d5f11838f 573 #define FSMC_NAND_ECC_DISABLE ((uint32_t)0x00000000)
mbed_official 235:685d5f11838f 574 #define FSMC_NAND_ECC_ENABLE ((uint32_t)0x00000040)
mbed_official 235:685d5f11838f 575
mbed_official 235:685d5f11838f 576 #define IS_FSMC_ECC_STATE(STATE) (((STATE) == FSMC_NAND_ECC_DISABLE) || \
mbed_official 235:685d5f11838f 577 ((STATE) == FSMC_NAND_ECC_ENABLE))
mbed_official 235:685d5f11838f 578 /**
mbed_official 235:685d5f11838f 579 * @}
mbed_official 235:685d5f11838f 580 */
mbed_official 235:685d5f11838f 581
mbed_official 235:685d5f11838f 582 /** @defgroup FSMC_ECC_Page_Size
mbed_official 235:685d5f11838f 583 * @{
mbed_official 235:685d5f11838f 584 */
mbed_official 235:685d5f11838f 585 #define FSMC_NAND_ECC_PAGE_SIZE_256BYTE ((uint32_t)0x00000000)
mbed_official 235:685d5f11838f 586 #define FSMC_NAND_ECC_PAGE_SIZE_512BYTE ((uint32_t)0x00020000)
mbed_official 235:685d5f11838f 587 #define FSMC_NAND_ECC_PAGE_SIZE_1024BYTE ((uint32_t)0x00040000)
mbed_official 235:685d5f11838f 588 #define FSMC_NAND_ECC_PAGE_SIZE_2048BYTE ((uint32_t)0x00060000)
mbed_official 235:685d5f11838f 589 #define FSMC_NAND_ECC_PAGE_SIZE_4096BYTE ((uint32_t)0x00080000)
mbed_official 235:685d5f11838f 590 #define FSMC_NAND_ECC_PAGE_SIZE_8192BYTE ((uint32_t)0x000A0000)
mbed_official 235:685d5f11838f 591
mbed_official 235:685d5f11838f 592 #define IS_FSMC_ECCPAGE_SIZE(SIZE) (((SIZE) == FSMC_NAND_ECC_PAGE_SIZE_256BYTE) || \
mbed_official 235:685d5f11838f 593 ((SIZE) == FSMC_NAND_ECC_PAGE_SIZE_512BYTE) || \
mbed_official 235:685d5f11838f 594 ((SIZE) == FSMC_NAND_ECC_PAGE_SIZE_1024BYTE) || \
mbed_official 235:685d5f11838f 595 ((SIZE) == FSMC_NAND_ECC_PAGE_SIZE_2048BYTE) || \
mbed_official 235:685d5f11838f 596 ((SIZE) == FSMC_NAND_ECC_PAGE_SIZE_4096BYTE) || \
mbed_official 235:685d5f11838f 597 ((SIZE) == FSMC_NAND_ECC_PAGE_SIZE_8192BYTE))
mbed_official 235:685d5f11838f 598 /**
mbed_official 235:685d5f11838f 599 * @}
mbed_official 235:685d5f11838f 600 */
mbed_official 235:685d5f11838f 601
mbed_official 235:685d5f11838f 602 /** @defgroup FSMC_TCLR_Setup_Time
mbed_official 235:685d5f11838f 603 * @{
mbed_official 235:685d5f11838f 604 */
mbed_official 235:685d5f11838f 605 #define IS_FSMC_TCLR_TIME(TIME) ((TIME) <= 255)
mbed_official 235:685d5f11838f 606 /**
mbed_official 235:685d5f11838f 607 * @}
mbed_official 235:685d5f11838f 608 */
mbed_official 235:685d5f11838f 609
mbed_official 235:685d5f11838f 610 /** @defgroup FSMC_TAR_Setup_Time
mbed_official 235:685d5f11838f 611 * @{
mbed_official 235:685d5f11838f 612 */
mbed_official 235:685d5f11838f 613 #define IS_FSMC_TAR_TIME(TIME) ((TIME) <= 255)
mbed_official 235:685d5f11838f 614 /**
mbed_official 235:685d5f11838f 615 * @}
mbed_official 235:685d5f11838f 616 */
mbed_official 235:685d5f11838f 617
mbed_official 235:685d5f11838f 618 /** @defgroup FSMC_Setup_Time
mbed_official 235:685d5f11838f 619 * @{
mbed_official 235:685d5f11838f 620 */
mbed_official 235:685d5f11838f 621 #define IS_FSMC_SETUP_TIME(TIME) ((TIME) <= 255)
mbed_official 235:685d5f11838f 622 /**
mbed_official 235:685d5f11838f 623 * @}
mbed_official 235:685d5f11838f 624 */
mbed_official 235:685d5f11838f 625
mbed_official 235:685d5f11838f 626 /** @defgroup FSMC_Wait_Setup_Time
mbed_official 235:685d5f11838f 627 * @{
mbed_official 235:685d5f11838f 628 */
mbed_official 235:685d5f11838f 629 #define IS_FSMC_WAIT_TIME(TIME) ((TIME) <= 255)
mbed_official 235:685d5f11838f 630 /**
mbed_official 235:685d5f11838f 631 * @}
mbed_official 235:685d5f11838f 632 */
mbed_official 235:685d5f11838f 633
mbed_official 235:685d5f11838f 634 /** @defgroup FSMC_Hold_Setup_Time
mbed_official 235:685d5f11838f 635 * @{
mbed_official 235:685d5f11838f 636 */
mbed_official 235:685d5f11838f 637 #define IS_FSMC_HOLD_TIME(TIME) ((TIME) <= 255)
mbed_official 235:685d5f11838f 638 /**
mbed_official 235:685d5f11838f 639 * @}
mbed_official 235:685d5f11838f 640 */
mbed_official 235:685d5f11838f 641
mbed_official 235:685d5f11838f 642 /** @defgroup FSMC_HiZ_Setup_Time
mbed_official 235:685d5f11838f 643 * @{
mbed_official 235:685d5f11838f 644 */
mbed_official 235:685d5f11838f 645 #define IS_FSMC_HIZ_TIME(TIME) ((TIME) <= 255)
mbed_official 235:685d5f11838f 646 /**
mbed_official 235:685d5f11838f 647 * @}
mbed_official 235:685d5f11838f 648 */
mbed_official 235:685d5f11838f 649
mbed_official 235:685d5f11838f 650 /**
mbed_official 235:685d5f11838f 651 * @}
mbed_official 235:685d5f11838f 652 */
mbed_official 235:685d5f11838f 653
mbed_official 235:685d5f11838f 654
mbed_official 235:685d5f11838f 655 /** @defgroup FSMC_NORSRAM_Device_Instance
mbed_official 235:685d5f11838f 656 * @{
mbed_official 235:685d5f11838f 657 */
mbed_official 235:685d5f11838f 658 #define IS_FSMC_NORSRAM_DEVICE(INSTANCE) ((INSTANCE) == FSMC_NORSRAM_DEVICE)
mbed_official 235:685d5f11838f 659
mbed_official 235:685d5f11838f 660 /**
mbed_official 235:685d5f11838f 661 * @}
mbed_official 235:685d5f11838f 662 */
mbed_official 235:685d5f11838f 663
mbed_official 235:685d5f11838f 664 /** @defgroup FSMC_NORSRAM_EXTENDED_Device_Instance
mbed_official 235:685d5f11838f 665 * @{
mbed_official 235:685d5f11838f 666 */
mbed_official 235:685d5f11838f 667 #define IS_FSMC_NORSRAM_EXTENDED_DEVICE(INSTANCE) ((INSTANCE) == FSMC_NORSRAM_EXTENDED_DEVICE)
mbed_official 235:685d5f11838f 668
mbed_official 235:685d5f11838f 669 /**
mbed_official 235:685d5f11838f 670 * @}
mbed_official 235:685d5f11838f 671 */
mbed_official 235:685d5f11838f 672
mbed_official 235:685d5f11838f 673 /** @defgroup FSMC_NAND_Device_Instance
mbed_official 235:685d5f11838f 674 * @{
mbed_official 235:685d5f11838f 675 */
mbed_official 235:685d5f11838f 676 #define IS_FSMC_NAND_DEVICE(INSTANCE) ((INSTANCE) == FSMC_NAND_DEVICE)
mbed_official 235:685d5f11838f 677
mbed_official 235:685d5f11838f 678 /**
mbed_official 235:685d5f11838f 679 * @}
mbed_official 235:685d5f11838f 680 */
mbed_official 235:685d5f11838f 681
mbed_official 235:685d5f11838f 682 /** @defgroup FSMC_PCCARD_Device_Instance
mbed_official 235:685d5f11838f 683 * @{
mbed_official 235:685d5f11838f 684 */
mbed_official 235:685d5f11838f 685 #define IS_FSMC_PCCARD_DEVICE(INSTANCE) ((INSTANCE) == FSMC_PCCARD_DEVICE)
mbed_official 235:685d5f11838f 686
mbed_official 235:685d5f11838f 687 /**
mbed_official 235:685d5f11838f 688 * @}
mbed_official 235:685d5f11838f 689 */
mbed_official 235:685d5f11838f 690
mbed_official 235:685d5f11838f 691 /** @defgroup FSMC_Interrupt_definition
mbed_official 235:685d5f11838f 692 * @brief FSMC Interrupt definition
mbed_official 235:685d5f11838f 693 * @{
mbed_official 235:685d5f11838f 694 */
mbed_official 235:685d5f11838f 695 #define FSMC_IT_RISING_EDGE ((uint32_t)0x00000008)
mbed_official 235:685d5f11838f 696 #define FSMC_IT_LEVEL ((uint32_t)0x00000010)
mbed_official 235:685d5f11838f 697 #define FSMC_IT_FALLING_EDGE ((uint32_t)0x00000020)
mbed_official 235:685d5f11838f 698 #define FSMC_IT_REFRESH_ERROR ((uint32_t)0x00004000)
mbed_official 235:685d5f11838f 699
mbed_official 235:685d5f11838f 700 #define IS_FSMC_IT(IT) ((((IT) & (uint32_t)0xFFFFBFC7) == 0x00000000) && ((IT) != 0x00000000))
mbed_official 235:685d5f11838f 701 #define IS_FSMC_GET_IT(IT) (((IT) == FSMC_IT_RISING_EDGE) || \
mbed_official 235:685d5f11838f 702 ((IT) == FSMC_IT_LEVEL) || \
mbed_official 235:685d5f11838f 703 ((IT) == FSMC_IT_FALLING_EDGE) || \
mbed_official 235:685d5f11838f 704 ((IT) == FSMC_IT_REFRESH_ERROR))
mbed_official 235:685d5f11838f 705 /**
mbed_official 235:685d5f11838f 706 * @}
mbed_official 235:685d5f11838f 707 */
mbed_official 235:685d5f11838f 708
mbed_official 235:685d5f11838f 709 /** @defgroup FSMC_Flag_definition
mbed_official 235:685d5f11838f 710 * @brief FSMC Flag definition
mbed_official 235:685d5f11838f 711 * @{
mbed_official 235:685d5f11838f 712 */
mbed_official 235:685d5f11838f 713 #define FSMC_FLAG_RISING_EDGE ((uint32_t)0x00000001)
mbed_official 235:685d5f11838f 714 #define FSMC_FLAG_LEVEL ((uint32_t)0x00000002)
mbed_official 235:685d5f11838f 715 #define FSMC_FLAG_FALLING_EDGE ((uint32_t)0x00000004)
mbed_official 235:685d5f11838f 716 #define FSMC_FLAG_FEMPT ((uint32_t)0x00000040)
mbed_official 235:685d5f11838f 717
mbed_official 235:685d5f11838f 718 #define IS_FSMC_GET_FLAG(FLAG) (((FLAG) == FSMC_FLAG_RISING_EDGE) || \
mbed_official 235:685d5f11838f 719 ((FLAG) == FSMC_FLAG_LEVEL) || \
mbed_official 235:685d5f11838f 720 ((FLAG) == FSMC_FLAG_FALLING_EDGE) || \
mbed_official 235:685d5f11838f 721 ((FLAG) == FSMC_FLAG_FEMPT))
mbed_official 235:685d5f11838f 722
mbed_official 235:685d5f11838f 723 #define IS_FSMC_CLEAR_FLAG(FLAG) ((((FLAG) & (uint32_t)0xFFFFFFF8) == 0x00000000) && ((FLAG) != 0x00000000))
mbed_official 235:685d5f11838f 724
mbed_official 235:685d5f11838f 725
mbed_official 235:685d5f11838f 726 /**
mbed_official 235:685d5f11838f 727 * @}
mbed_official 235:685d5f11838f 728 */
mbed_official 235:685d5f11838f 729
mbed_official 235:685d5f11838f 730
mbed_official 235:685d5f11838f 731 /* Exported macro ------------------------------------------------------------*/
mbed_official 235:685d5f11838f 732
mbed_official 235:685d5f11838f 733
mbed_official 235:685d5f11838f 734 /** @defgroup FSMC_NOR_Macros
mbed_official 235:685d5f11838f 735 * @brief macros to handle NOR device enable/disable and read/write operations
mbed_official 235:685d5f11838f 736 * @{
mbed_official 235:685d5f11838f 737 */
mbed_official 235:685d5f11838f 738
mbed_official 235:685d5f11838f 739 /**
mbed_official 235:685d5f11838f 740 * @brief Enable the NORSRAM device access.
mbed_official 235:685d5f11838f 741 * @param __INSTANCE__: FSMC_NORSRAM Instance
mbed_official 235:685d5f11838f 742 * @param __BANK__: FSMC_NORSRAM Bank
mbed_official 235:685d5f11838f 743 * @retval none
mbed_official 235:685d5f11838f 744 */
mbed_official 235:685d5f11838f 745 #define __FSMC_NORSRAM_ENABLE(__INSTANCE__, __BANK__) ((__INSTANCE__)->BTCR[(__BANK__)] |= FSMC_BCR1_MBKEN)
mbed_official 235:685d5f11838f 746
mbed_official 235:685d5f11838f 747 /**
mbed_official 235:685d5f11838f 748 * @brief Disable the NORSRAM device access.
mbed_official 235:685d5f11838f 749 * @param __INSTANCE__: FSMC_NORSRAM Instance
mbed_official 235:685d5f11838f 750 * @param __BANK__: FSMC_NORSRAM Bank
mbed_official 235:685d5f11838f 751 * @retval none
mbed_official 235:685d5f11838f 752 */
mbed_official 235:685d5f11838f 753 #define __FSMC_NORSRAM_DISABLE(__INSTANCE__, __BANK__) ((__INSTANCE__)->BTCR[(__BANK__)] &= ~FSMC_BCR1_MBKEN)
mbed_official 235:685d5f11838f 754
mbed_official 235:685d5f11838f 755 /**
mbed_official 235:685d5f11838f 756 * @}
mbed_official 235:685d5f11838f 757 */
mbed_official 235:685d5f11838f 758
mbed_official 235:685d5f11838f 759
mbed_official 235:685d5f11838f 760 /** @defgroup FSMC_NAND_Macros
mbed_official 235:685d5f11838f 761 * @brief macros to handle NAND device enable/disable
mbed_official 235:685d5f11838f 762 * @{
mbed_official 235:685d5f11838f 763 */
mbed_official 235:685d5f11838f 764
mbed_official 235:685d5f11838f 765 /**
mbed_official 235:685d5f11838f 766 * @brief Enable the NAND device access.
mbed_official 235:685d5f11838f 767 * @param __INSTANCE__: FSMC_NAND Instance
mbed_official 235:685d5f11838f 768 * @param __BANK__: FSMC_NAND Bank
mbed_official 235:685d5f11838f 769 * @retval none
mbed_official 235:685d5f11838f 770 */
mbed_official 235:685d5f11838f 771 #define __FSMC_NAND_ENABLE(__INSTANCE__, __BANK__) (((__BANK__) == FSMC_NAND_BANK2)? ((__INSTANCE__)->PCR2 |= FSMC_PCR2_PBKEN): \
mbed_official 235:685d5f11838f 772 ((__INSTANCE__)->PCR3 |= FSMC_PCR3_PBKEN))
mbed_official 235:685d5f11838f 773
mbed_official 235:685d5f11838f 774
mbed_official 235:685d5f11838f 775 /**
mbed_official 235:685d5f11838f 776 * @brief Disable the NAND device access.
mbed_official 235:685d5f11838f 777 * @param __INSTANCE__: FSMC_NAND Instance
mbed_official 235:685d5f11838f 778 * @param __BANK__: FSMC_NAND Bank
mbed_official 235:685d5f11838f 779 * @retval none
mbed_official 235:685d5f11838f 780 */
mbed_official 235:685d5f11838f 781 #define __FSMC_NAND_DISABLE(__INSTANCE__, __BANK__) (((__BANK__) == FSMC_NAND_BANK2)? ((__INSTANCE__)->PCR2 &= ~FSMC_PCR2_PBKEN): \
mbed_official 235:685d5f11838f 782 ((__INSTANCE__)->PCR3 &= ~FSMC_PCR3_PBKEN))
mbed_official 235:685d5f11838f 783
mbed_official 235:685d5f11838f 784
mbed_official 235:685d5f11838f 785 /**
mbed_official 235:685d5f11838f 786 * @}
mbed_official 235:685d5f11838f 787 */
mbed_official 235:685d5f11838f 788
mbed_official 235:685d5f11838f 789 /** @defgroup FSMC_PCCARD_Macros
mbed_official 235:685d5f11838f 790 * @brief macros to handle SRAM read/write operations
mbed_official 235:685d5f11838f 791 * @{
mbed_official 235:685d5f11838f 792 */
mbed_official 235:685d5f11838f 793
mbed_official 235:685d5f11838f 794 /**
mbed_official 235:685d5f11838f 795 * @brief Enable the PCCARD device access.
mbed_official 235:685d5f11838f 796 * @param __INSTANCE__: FSMC_PCCARD Instance
mbed_official 235:685d5f11838f 797 * @retval none
mbed_official 235:685d5f11838f 798 */
mbed_official 235:685d5f11838f 799 #define __FSMC_PCCARD_ENABLE(__INSTANCE__) ((__INSTANCE__)->PCR4 |= FSMC_PCR4_PBKEN)
mbed_official 235:685d5f11838f 800
mbed_official 235:685d5f11838f 801 /**
mbed_official 235:685d5f11838f 802 * @brief Disable the PCCARD device access.
mbed_official 235:685d5f11838f 803 * @param __INSTANCE__: FSMC_PCCARD Instance
mbed_official 235:685d5f11838f 804 * @retval none
mbed_official 235:685d5f11838f 805 */
mbed_official 235:685d5f11838f 806 #define __FSMC_PCCARD_DISABLE(__INSTANCE__) ((__INSTANCE__)->PCR4 &= ~FSMC_PCR4_PBKEN)
mbed_official 235:685d5f11838f 807
mbed_official 235:685d5f11838f 808 /**
mbed_official 235:685d5f11838f 809 * @}
mbed_official 235:685d5f11838f 810 */
mbed_official 235:685d5f11838f 811
mbed_official 235:685d5f11838f 812 /** @defgroup FSMC_Interrupt
mbed_official 235:685d5f11838f 813 * @brief macros to handle FSMC interrupts
mbed_official 235:685d5f11838f 814 * @{
mbed_official 235:685d5f11838f 815 */
mbed_official 235:685d5f11838f 816
mbed_official 235:685d5f11838f 817 /**
mbed_official 235:685d5f11838f 818 * @brief Enable the NAND device interrupt.
mbed_official 235:685d5f11838f 819 * @param __INSTANCE__: FSMC_NAND Instance
mbed_official 235:685d5f11838f 820 * @param __BANK__: FSMC_NAND Bank
mbed_official 235:685d5f11838f 821 * @param __INTERRUPT__: FSMC_NAND interrupt
mbed_official 235:685d5f11838f 822 * This parameter can be any combination of the following values:
mbed_official 235:685d5f11838f 823 * @arg FSMC_IT_RISING_EDGE: Interrupt rising edge.
mbed_official 235:685d5f11838f 824 * @arg FSMC_IT_LEVEL: Interrupt level.
mbed_official 235:685d5f11838f 825 * @arg FSMC_IT_FALLING_EDGE: Interrupt falling edge.
mbed_official 235:685d5f11838f 826 * @retval None
mbed_official 235:685d5f11838f 827 */
mbed_official 235:685d5f11838f 828 #define __FSMC_NAND_ENABLE_IT(__INSTANCE__, __BANK__, __INTERRUPT__) (((__BANK__) == FSMC_NAND_BANK2)? ((__INSTANCE__)->SR2 |= (__INTERRUPT__)): \
mbed_official 235:685d5f11838f 829 ((__INSTANCE__)->SR3 |= (__INTERRUPT__)))
mbed_official 235:685d5f11838f 830
mbed_official 235:685d5f11838f 831 /**
mbed_official 235:685d5f11838f 832 * @brief Disable the NAND device interrupt.
mbed_official 235:685d5f11838f 833 * @param __INSTANCE__: FSMC_NAND Instance
mbed_official 235:685d5f11838f 834 * @param __BANK__: FSMC_NAND Bank
mbed_official 235:685d5f11838f 835 * @param __INTERRUPT__: FSMC_NAND interrupt
mbed_official 235:685d5f11838f 836 * This parameter can be any combination of the following values:
mbed_official 235:685d5f11838f 837 * @arg FSMC_IT_RISING_EDGE: Interrupt rising edge.
mbed_official 235:685d5f11838f 838 * @arg FSMC_IT_LEVEL: Interrupt level.
mbed_official 235:685d5f11838f 839 * @arg FSMC_IT_FALLING_EDGE: Interrupt falling edge.
mbed_official 235:685d5f11838f 840 * @retval None
mbed_official 235:685d5f11838f 841 */
mbed_official 235:685d5f11838f 842 #define __FSMC_NAND_DISABLE_IT(__INSTANCE__, __BANK__, __INTERRUPT__) (((__BANK__) == FSMC_NAND_BANK2)? ((__INSTANCE__)->SR2 &= ~(__INTERRUPT__)): \
mbed_official 235:685d5f11838f 843 ((__INSTANCE__)->SR3 &= ~(__INTERRUPT__)))
mbed_official 235:685d5f11838f 844
mbed_official 235:685d5f11838f 845 /**
mbed_official 235:685d5f11838f 846 * @brief Get flag status of the NAND device.
mbed_official 235:685d5f11838f 847 * @param __INSTANCE__: FSMC_NAND Instance
mbed_official 235:685d5f11838f 848 * @param __BANK__: FSMC_NAND Bank
mbed_official 235:685d5f11838f 849 * @param __FLAG__: FSMC_NAND flag
mbed_official 235:685d5f11838f 850 * This parameter can be any combination of the following values:
mbed_official 235:685d5f11838f 851 * @arg FSMC_FLAG_RISING_EDGE: Interrupt rising edge flag.
mbed_official 235:685d5f11838f 852 * @arg FSMC_FLAG_LEVEL: Interrupt level edge flag.
mbed_official 235:685d5f11838f 853 * @arg FSMC_FLAG_FALLING_EDGE: Interrupt falling edge flag.
mbed_official 235:685d5f11838f 854 * @arg FSMC_FLAG_FEMPT: FIFO empty flag.
mbed_official 235:685d5f11838f 855 * @retval The state of FLAG (SET or RESET).
mbed_official 235:685d5f11838f 856 */
mbed_official 235:685d5f11838f 857 #define __FSMC_NAND_GET_FLAG(__INSTANCE__, __BANK__, __FLAG__) (((__BANK__) == FSMC_NAND_BANK2)? (((__INSTANCE__)->SR2 &(__FLAG__)) == (__FLAG__)): \
mbed_official 235:685d5f11838f 858 (((__INSTANCE__)->SR3 &(__FLAG__)) == (__FLAG__)))
mbed_official 235:685d5f11838f 859 /**
mbed_official 235:685d5f11838f 860 * @brief Clear flag status of the NAND device.
mbed_official 235:685d5f11838f 861 * @param __INSTANCE__: FSMC_NAND Instance
mbed_official 235:685d5f11838f 862 * @param __BANK__: FSMC_NAND Bank
mbed_official 235:685d5f11838f 863 * @param __FLAG__: FSMC_NAND flag
mbed_official 235:685d5f11838f 864 * This parameter can be any combination of the following values:
mbed_official 235:685d5f11838f 865 * @arg FSMC_FLAG_RISING_EDGE: Interrupt rising edge flag.
mbed_official 235:685d5f11838f 866 * @arg FSMC_FLAG_LEVEL: Interrupt level edge flag.
mbed_official 235:685d5f11838f 867 * @arg FSMC_FLAG_FALLING_EDGE: Interrupt falling edge flag.
mbed_official 235:685d5f11838f 868 * @arg FSMC_FLAG_FEMPT: FIFO empty flag.
mbed_official 235:685d5f11838f 869 * @retval None
mbed_official 235:685d5f11838f 870 */
mbed_official 235:685d5f11838f 871 #define __FSMC_NAND_CLEAR_FLAG(__INSTANCE__, __BANK__, __FLAG__) (((__BANK__) == FSMC_NAND_BANK2)? ((__INSTANCE__)->SR2 &= ~(__FLAG__)): \
mbed_official 235:685d5f11838f 872 ((__INSTANCE__)->SR3 &= ~(__FLAG__)))
mbed_official 235:685d5f11838f 873 /**
mbed_official 235:685d5f11838f 874 * @brief Enable the PCCARD device interrupt.
mbed_official 235:685d5f11838f 875 * @param __INSTANCE__: FSMC_PCCARD Instance
mbed_official 235:685d5f11838f 876 * @param __INTERRUPT__: FSMC_PCCARD interrupt
mbed_official 235:685d5f11838f 877 * This parameter can be any combination of the following values:
mbed_official 235:685d5f11838f 878 * @arg FSMC_IT_RISING_EDGE: Interrupt rising edge.
mbed_official 235:685d5f11838f 879 * @arg FSMC_IT_LEVEL: Interrupt level.
mbed_official 235:685d5f11838f 880 * @arg FSMC_IT_FALLING_EDGE: Interrupt falling edge.
mbed_official 235:685d5f11838f 881 * @retval None
mbed_official 235:685d5f11838f 882 */
mbed_official 235:685d5f11838f 883 #define __FSMC_PCCARD_ENABLE_IT(__INSTANCE__, __INTERRUPT__) ((__INSTANCE__)->SR4 |= (__INTERRUPT__))
mbed_official 235:685d5f11838f 884
mbed_official 235:685d5f11838f 885 /**
mbed_official 235:685d5f11838f 886 * @brief Disable the PCCARD device interrupt.
mbed_official 235:685d5f11838f 887 * @param __INSTANCE__: FSMC_PCCARD Instance
mbed_official 235:685d5f11838f 888 * @param __INTERRUPT__: FSMC_PCCARD interrupt
mbed_official 235:685d5f11838f 889 * This parameter can be any combination of the following values:
mbed_official 235:685d5f11838f 890 * @arg FSMC_IT_RISING_EDGE: Interrupt rising edge.
mbed_official 235:685d5f11838f 891 * @arg FSMC_IT_LEVEL: Interrupt level.
mbed_official 235:685d5f11838f 892 * @arg FSMC_IT_FALLING_EDGE: Interrupt falling edge.
mbed_official 235:685d5f11838f 893 * @retval None
mbed_official 235:685d5f11838f 894 */
mbed_official 235:685d5f11838f 895 #define __FSMC_PCCARD_DISABLE_IT(__INSTANCE__, __INTERRUPT__) ((__INSTANCE__)->SR4 &= ~(__INTERRUPT__))
mbed_official 235:685d5f11838f 896
mbed_official 235:685d5f11838f 897 /**
mbed_official 235:685d5f11838f 898 * @brief Get flag status of the PCCARD device.
mbed_official 235:685d5f11838f 899 * @param __INSTANCE__: FSMC_PCCARD Instance
mbed_official 235:685d5f11838f 900 * @param __FLAG__: FSMC_PCCARD flag
mbed_official 235:685d5f11838f 901 * This parameter can be any combination of the following values:
mbed_official 235:685d5f11838f 902 * @arg FSMC_FLAG_RISING_EDGE: Interrupt rising edge flag.
mbed_official 235:685d5f11838f 903 * @arg FSMC_FLAG_LEVEL: Interrupt level edge flag.
mbed_official 235:685d5f11838f 904 * @arg FSMC_FLAG_FALLING_EDGE: Interrupt falling edge flag.
mbed_official 235:685d5f11838f 905 * @arg FSMC_FLAG_FEMPT: FIFO empty flag.
mbed_official 235:685d5f11838f 906 * @retval The state of FLAG (SET or RESET).
mbed_official 235:685d5f11838f 907 */
mbed_official 235:685d5f11838f 908 #define __FSMC_PCCARD_GET_FLAG(__INSTANCE__, __FLAG__) (((__INSTANCE__)->SR4 &(__FLAG__)) == (__FLAG__))
mbed_official 235:685d5f11838f 909
mbed_official 235:685d5f11838f 910 /**
mbed_official 235:685d5f11838f 911 * @brief Clear flag status of the PCCARD device.
mbed_official 235:685d5f11838f 912 * @param __INSTANCE__: FSMC_PCCARD Instance
mbed_official 235:685d5f11838f 913 * @param __FLAG__: FSMC_PCCARD flag
mbed_official 235:685d5f11838f 914 * This parameter can be any combination of the following values:
mbed_official 235:685d5f11838f 915 * @arg FSMC_FLAG_RISING_EDGE: Interrupt rising edge flag.
mbed_official 235:685d5f11838f 916 * @arg FSMC_FLAG_LEVEL: Interrupt level edge flag.
mbed_official 235:685d5f11838f 917 * @arg FSMC_FLAG_FALLING_EDGE: Interrupt falling edge flag.
mbed_official 235:685d5f11838f 918 * @arg FSMC_FLAG_FEMPT: FIFO empty flag.
mbed_official 235:685d5f11838f 919 * @retval None
mbed_official 235:685d5f11838f 920 */
mbed_official 235:685d5f11838f 921 #define __FSMC_PCCARD_CLEAR_FLAG(__INSTANCE__, __FLAG__) ((__INSTANCE__)->SR4 &= ~(__FLAG__))
mbed_official 235:685d5f11838f 922
mbed_official 235:685d5f11838f 923 /**
mbed_official 235:685d5f11838f 924 * @}
mbed_official 235:685d5f11838f 925 */
mbed_official 235:685d5f11838f 926
mbed_official 235:685d5f11838f 927 /* Exported functions --------------------------------------------------------*/
mbed_official 235:685d5f11838f 928
mbed_official 235:685d5f11838f 929 /* FSMC_NORSRAM Controller functions ******************************************/
mbed_official 235:685d5f11838f 930 /* Initialization/de-initialization functions */
mbed_official 235:685d5f11838f 931 HAL_StatusTypeDef FSMC_NORSRAM_Init(FSMC_NORSRAM_TypeDef *Device, FSMC_NORSRAM_InitTypeDef *Init);
mbed_official 235:685d5f11838f 932 HAL_StatusTypeDef FSMC_NORSRAM_Timing_Init(FSMC_NORSRAM_TypeDef *Device, FSMC_NORSRAM_TimingTypeDef *Timing, uint32_t Bank);
mbed_official 235:685d5f11838f 933 HAL_StatusTypeDef FSMC_NORSRAM_Extended_Timing_Init(FSMC_NORSRAM_EXTENDED_TypeDef *Device, FSMC_NORSRAM_TimingTypeDef *Timing, uint32_t Bank, uint32_t ExtendedMode);
mbed_official 235:685d5f11838f 934 HAL_StatusTypeDef FSMC_NORSRAM_DeInit(FSMC_NORSRAM_TypeDef *Device, FSMC_NORSRAM_EXTENDED_TypeDef *ExDevice, uint32_t Bank);
mbed_official 235:685d5f11838f 935
mbed_official 235:685d5f11838f 936 /* FSMC_NORSRAM Control functions */
mbed_official 235:685d5f11838f 937 HAL_StatusTypeDef FSMC_NORSRAM_WriteOperation_Enable(FSMC_NORSRAM_TypeDef *Device, uint32_t Bank);
mbed_official 235:685d5f11838f 938 HAL_StatusTypeDef FSMC_NORSRAM_WriteOperation_Disable(FSMC_NORSRAM_TypeDef *Device, uint32_t Bank);
mbed_official 235:685d5f11838f 939
mbed_official 235:685d5f11838f 940 /* FSMC_NAND Controller functions *********************************************/
mbed_official 235:685d5f11838f 941 /* Initialization/de-initialization functions */
mbed_official 235:685d5f11838f 942 HAL_StatusTypeDef FSMC_NAND_Init(FSMC_NAND_TypeDef *Device, FSMC_NAND_InitTypeDef *Init);
mbed_official 235:685d5f11838f 943 HAL_StatusTypeDef FSMC_NAND_CommonSpace_Timing_Init(FSMC_NAND_TypeDef *Device, FSMC_NAND_PCC_TimingTypeDef *Timing, uint32_t Bank);
mbed_official 235:685d5f11838f 944 HAL_StatusTypeDef FSMC_NAND_AttributeSpace_Timing_Init(FSMC_NAND_TypeDef *Device, FSMC_NAND_PCC_TimingTypeDef *Timing, uint32_t Bank);
mbed_official 235:685d5f11838f 945 HAL_StatusTypeDef FSMC_NAND_DeInit(FSMC_NAND_TypeDef *Device, uint32_t Bank);
mbed_official 235:685d5f11838f 946
mbed_official 235:685d5f11838f 947 /* FSMC_NAND Control functions */
mbed_official 235:685d5f11838f 948 HAL_StatusTypeDef FSMC_NAND_ECC_Enable(FSMC_NAND_TypeDef *Device, uint32_t Bank);
mbed_official 235:685d5f11838f 949 HAL_StatusTypeDef FSMC_NAND_ECC_Disable(FSMC_NAND_TypeDef *Device, uint32_t Bank);
mbed_official 235:685d5f11838f 950 HAL_StatusTypeDef FSMC_NAND_GetECC(FSMC_NAND_TypeDef *Device, uint32_t *ECCval, uint32_t Bank, uint32_t Timeout);
mbed_official 235:685d5f11838f 951
mbed_official 235:685d5f11838f 952 /* FSMC_PCCARD Controller functions *******************************************/
mbed_official 235:685d5f11838f 953 /* Initialization/de-initialization functions */
mbed_official 235:685d5f11838f 954 HAL_StatusTypeDef FSMC_PCCARD_Init(FSMC_PCCARD_TypeDef *Device, FSMC_PCCARD_InitTypeDef *Init);
mbed_official 235:685d5f11838f 955 HAL_StatusTypeDef FSMC_PCCARD_CommonSpace_Timing_Init(FSMC_PCCARD_TypeDef *Device, FSMC_NAND_PCC_TimingTypeDef *Timing);
mbed_official 235:685d5f11838f 956 HAL_StatusTypeDef FSMC_PCCARD_AttributeSpace_Timing_Init(FSMC_PCCARD_TypeDef *Device, FSMC_NAND_PCC_TimingTypeDef *Timing);
mbed_official 235:685d5f11838f 957 HAL_StatusTypeDef FSMC_PCCARD_IOSpace_Timing_Init(FSMC_PCCARD_TypeDef *Device, FSMC_NAND_PCC_TimingTypeDef *Timing);
mbed_official 235:685d5f11838f 958 HAL_StatusTypeDef FSMC_PCCARD_DeInit(FSMC_PCCARD_TypeDef *Device);
mbed_official 235:685d5f11838f 959
mbed_official 235:685d5f11838f 960 /* FSMC APIs, macros and typedefs redefinition */
mbed_official 235:685d5f11838f 961 #define FMC_NORSRAM_TypeDef FSMC_NORSRAM_TypeDef
mbed_official 235:685d5f11838f 962 #define FMC_NORSRAM_EXTENDED_TypeDef FSMC_NORSRAM_EXTENDED_TypeDef
mbed_official 235:685d5f11838f 963 #define FMC_NORSRAM_InitTypeDef FSMC_NORSRAM_InitTypeDef
mbed_official 235:685d5f11838f 964 #define FMC_NORSRAM_TimingTypeDef FSMC_NORSRAM_TimingTypeDef
mbed_official 235:685d5f11838f 965
mbed_official 235:685d5f11838f 966 #define FMC_NORSRAM_Init FSMC_NORSRAM_Init
mbed_official 235:685d5f11838f 967 #define FMC_NORSRAM_Timing_Init FSMC_NORSRAM_Timing_Init
mbed_official 235:685d5f11838f 968 #define FMC_NORSRAM_Extended_Timing_Init FSMC_NORSRAM_Extended_Timing_Init
mbed_official 235:685d5f11838f 969 #define FMC_NORSRAM_DeInit FSMC_NORSRAM_DeInit
mbed_official 235:685d5f11838f 970 #define FMC_NORSRAM_WriteOperation_Enable FSMC_NORSRAM_WriteOperation_Enable
mbed_official 235:685d5f11838f 971 #define FMC_NORSRAM_WriteOperation_Disable FSMC_NORSRAM_WriteOperation_Disable
mbed_official 235:685d5f11838f 972
mbed_official 235:685d5f11838f 973 #define __FMC_NORSRAM_ENABLE __FSMC_NORSRAM_ENABLE
mbed_official 235:685d5f11838f 974 #define __FMC_NORSRAM_DISABLE __FSMC_NORSRAM_DISABLE
mbed_official 235:685d5f11838f 975
mbed_official 235:685d5f11838f 976 #define FMC_NAND_InitTypeDef FSMC_NAND_InitTypeDef
mbed_official 235:685d5f11838f 977 #define FMC_PCCARD_InitTypeDef FSMC_PCCARD_InitTypeDef
mbed_official 235:685d5f11838f 978 #define FMC_NAND_PCC_TimingTypeDef FSMC_NAND_PCC_TimingTypeDef
mbed_official 235:685d5f11838f 979
mbed_official 235:685d5f11838f 980 #define FMC_NAND_Init FSMC_NAND_Init
mbed_official 235:685d5f11838f 981 #define FMC_NAND_CommonSpace_Timing_Init FSMC_NAND_CommonSpace_Timing_Init
mbed_official 235:685d5f11838f 982 #define FMC_NAND_AttributeSpace_Timing_Init FSMC_NAND_AttributeSpace_Timing_Init
mbed_official 235:685d5f11838f 983 #define FMC_NAND_DeInit FSMC_NAND_DeInit
mbed_official 235:685d5f11838f 984 #define FMC_NAND_ECC_Enable FSMC_NAND_ECC_Enable
mbed_official 235:685d5f11838f 985 #define FMC_NAND_ECC_Disable FSMC_NAND_ECC_Disable
mbed_official 235:685d5f11838f 986 #define FMC_NAND_GetECC FSMC_NAND_GetECC
mbed_official 235:685d5f11838f 987 #define FMC_PCCARD_Init FSMC_PCCARD_Init
mbed_official 235:685d5f11838f 988 #define FMC_PCCARD_CommonSpace_Timing_Init FSMC_PCCARD_CommonSpace_Timing_Init
mbed_official 235:685d5f11838f 989 #define FMC_PCCARD_AttributeSpace_Timing_Init FSMC_PCCARD_AttributeSpace_Timing_Init
mbed_official 235:685d5f11838f 990 #define FMC_PCCARD_IOSpace_Timing_Init FSMC_PCCARD_IOSpace_Timing_Init
mbed_official 235:685d5f11838f 991 #define FMC_PCCARD_DeInit FSMC_PCCARD_DeInit
mbed_official 235:685d5f11838f 992
mbed_official 235:685d5f11838f 993 #define __FMC_NAND_ENABLE __FSMC_NAND_ENABLE
mbed_official 235:685d5f11838f 994 #define __FMC_NAND_DISABLE __FSMC_NAND_DISABLE
mbed_official 235:685d5f11838f 995 #define __FMC_PCCARD_ENABLE __FSMC_PCCARD_ENABLE
mbed_official 235:685d5f11838f 996 #define __FMC_PCCARD_DISABLE __FSMC_PCCARD_DISABLE
mbed_official 235:685d5f11838f 997 #define __FMC_NAND_ENABLE_IT __FSMC_NAND_ENABLE_IT
mbed_official 235:685d5f11838f 998 #define __FMC_NAND_DISABLE_IT __FSMC_NAND_DISABLE_IT
mbed_official 235:685d5f11838f 999 #define __FMC_NAND_GET_FLAG __FSMC_NAND_GET_FLAG
mbed_official 235:685d5f11838f 1000 #define __FMC_NAND_CLEAR_FLAG __FSMC_NAND_CLEAR_FLAG
mbed_official 235:685d5f11838f 1001 #define __FMC_PCCARD_ENABLE_IT __FSMC_PCCARD_ENABLE_IT
mbed_official 235:685d5f11838f 1002 #define __FMC_PCCARD_DISABLE_IT __FSMC_PCCARD_DISABLE_IT
mbed_official 235:685d5f11838f 1003 #define __FMC_PCCARD_GET_FLAG __FSMC_PCCARD_GET_FLAG
mbed_official 235:685d5f11838f 1004 #define __FMC_PCCARD_CLEAR_FLAG __FSMC_PCCARD_CLEAR_FLAG
mbed_official 235:685d5f11838f 1005
mbed_official 235:685d5f11838f 1006 #define FMC_NORSRAM_TypeDef FSMC_NORSRAM_TypeDef
mbed_official 235:685d5f11838f 1007 #define FMC_NORSRAM_EXTENDED_TypeDef FSMC_NORSRAM_EXTENDED_TypeDef
mbed_official 235:685d5f11838f 1008 #define FMC_NAND_TypeDef FSMC_NAND_TypeDef
mbed_official 235:685d5f11838f 1009 #define FMC_PCCARD_TypeDef FSMC_PCCARD_TypeDef
mbed_official 235:685d5f11838f 1010
mbed_official 235:685d5f11838f 1011 #define FMC_NORSRAM_DEVICE FSMC_NORSRAM_DEVICE
mbed_official 235:685d5f11838f 1012 #define FMC_NORSRAM_EXTENDED_DEVICE FSMC_NORSRAM_EXTENDED_DEVICE
mbed_official 235:685d5f11838f 1013 #define FMC_NAND_DEVICE FSMC_NAND_DEVICE
mbed_official 235:685d5f11838f 1014 #define FMC_PCCARD_DEVICE FSMC_PCCARD_DEVICE
mbed_official 235:685d5f11838f 1015
mbed_official 235:685d5f11838f 1016 #define FMC_NAND_BANK2 FSMC_NAND_BANK2
mbed_official 235:685d5f11838f 1017
mbed_official 235:685d5f11838f 1018 #define FMC_NORSRAM_BANK1 FSMC_NORSRAM_BANK1
mbed_official 235:685d5f11838f 1019 #define FMC_NORSRAM_BANK2 FSMC_NORSRAM_BANK2
mbed_official 235:685d5f11838f 1020 #define FMC_NORSRAM_BANK3 FSMC_NORSRAM_BANK3
mbed_official 235:685d5f11838f 1021
mbed_official 235:685d5f11838f 1022 #define FMC_IT_RISING_EDGE FSMC_IT_RISING_EDGE
mbed_official 235:685d5f11838f 1023 #define FMC_IT_LEVEL FSMC_IT_LEVEL
mbed_official 235:685d5f11838f 1024 #define FMC_IT_FALLING_EDGE FSMC_IT_FALLING_EDGE
mbed_official 235:685d5f11838f 1025 #define FMC_IT_REFRESH_ERROR FSMC_IT_REFRESH_ERROR
mbed_official 235:685d5f11838f 1026
mbed_official 235:685d5f11838f 1027 #define FMC_FLAG_RISING_EDGE FSMC_FLAG_RISING_EDGE
mbed_official 235:685d5f11838f 1028 #define FMC_FLAG_LEVEL FSMC_FLAG_LEVEL
mbed_official 235:685d5f11838f 1029 #define FMC_FLAG_FALLING_EDGE FSMC_FLAG_FALLING_EDGE
mbed_official 235:685d5f11838f 1030 #define FMC_FLAG_FEMPT FSMC_FLAG_FEMPT
mbed_official 235:685d5f11838f 1031
mbed_official 235:685d5f11838f 1032 #endif /* STM32F405xx || STM32F415xx || STM32F407xx || STM32F417xx */
mbed_official 235:685d5f11838f 1033
mbed_official 235:685d5f11838f 1034 /**
mbed_official 235:685d5f11838f 1035 * @}
mbed_official 235:685d5f11838f 1036 */
mbed_official 235:685d5f11838f 1037
mbed_official 235:685d5f11838f 1038 /**
mbed_official 235:685d5f11838f 1039 * @}
mbed_official 235:685d5f11838f 1040 */
mbed_official 235:685d5f11838f 1041
mbed_official 235:685d5f11838f 1042 #ifdef __cplusplus
mbed_official 235:685d5f11838f 1043 }
mbed_official 235:685d5f11838f 1044 #endif
mbed_official 235:685d5f11838f 1045
mbed_official 235:685d5f11838f 1046 #endif /* __STM32F4xx_LL_FSMC_H */
mbed_official 235:685d5f11838f 1047
mbed_official 235:685d5f11838f 1048 /************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/