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