@@ -38,6 +38,7 @@ extern "C" {
3838/** @addtogroup FMC_LL_Private_Macros
3939 * @{
4040 */
41+ #if defined(FMC_BANK1 )
4142
4243#define IS_FMC_NORSRAM_BANK (__BANK__ ) (((__BANK__) == FMC_NORSRAM_BANK1) || \
4344 ((__BANK__) == FMC_NORSRAM_BANK2) || \
@@ -95,6 +96,8 @@ extern "C" {
9596#define IS_FMC_NORSRAM_EXTENDED_DEVICE (__INSTANCE__ ) ((__INSTANCE__) == FMC_NORSRAM_EXTENDED_DEVICE)
9697#define IS_FMC_MAX_CHIP_SELECT_PULSE_TIME (__TIME__ ) (((__TIME__) >= 1U) && ((__TIME__) <= 65535U))
9798
99+ #endif /* FMC_BANK1 */
100+ #if defined(FMC_BANK3 )
98101
99102#define IS_FMC_NAND_BANK (__BANK__ ) ((__BANK__) == FMC_NAND_BANK3)
100103#define IS_FMC_WAIT_FEATURE (__FEATURE__ ) (((__FEATURE__) == FMC_NAND_WAIT_FEATURE_DISABLE) || \
@@ -118,6 +121,7 @@ extern "C" {
118121#define IS_FMC_HIZ_TIME (__TIME__ ) ((__TIME__) <= 254U)
119122#define IS_FMC_NAND_DEVICE (__INSTANCE__ ) ((__INSTANCE__) == FMC_NAND_DEVICE)
120123
124+ #endif /* FMC_BANK3 */
121125
122126/**
123127 * @}
@@ -129,14 +133,23 @@ extern "C" {
129133 * @{
130134 */
131135
136+ #if defined(FMC_BANK1 )
132137#define FMC_NORSRAM_TypeDef FMC_Bank1_TypeDef
133138#define FMC_NORSRAM_EXTENDED_TypeDef FMC_Bank1E_TypeDef
139+ #endif /* FMC_BANK1 */
140+ #if defined(FMC_BANK3 )
134141#define FMC_NAND_TypeDef FMC_Bank3_TypeDef
142+ #endif /* FMC_BANK3 */
135143
144+ #if defined(FMC_BANK1 )
136145#define FMC_NORSRAM_DEVICE FMC_Bank1_R
137146#define FMC_NORSRAM_EXTENDED_DEVICE FMC_Bank1E_R
147+ #endif /* FMC_BANK1 */
148+ #if defined(FMC_BANK3 )
138149#define FMC_NAND_DEVICE FMC_Bank3_R
150+ #endif /* FMC_BANK3 */
139151
152+ #if defined(FMC_BANK1 )
140153/**
141154 * @brief FMC NORSRAM Configuration Structure definition
142155 */
@@ -261,7 +274,9 @@ typedef struct
261274 uint32_t AccessMode ; /*!< Specifies the asynchronous access mode.
262275 This parameter can be a value of @ref FMC_Access_Mode */
263276} FMC_NORSRAM_TimingTypeDef ;
277+ #endif /* FMC_BANK1 */
264278
279+ #if defined(FMC_BANK3 )
265280/**
266281 * @brief FMC NAND Configuration Structure definition
267282 */
@@ -290,7 +305,9 @@ typedef struct
290305 delay between ALE low and RE low.
291306 This parameter can be a number between Min_Data = 0 and Max_Data = 255 */
292307} FMC_NAND_InitTypeDef ;
308+ #endif /* FMC_BANK3 */
293309
310+ #if defined(FMC_BANK3 )
294311/**
295312 * @brief FMC NAND Timing parameters structure definition
296313 */
@@ -321,6 +338,7 @@ typedef struct
321338 on the memory space timing to be configured).
322339 This parameter can be a number between Min_Data = 0 and Max_Data = 254 */
323340} FMC_NAND_PCC_TimingTypeDef ;
341+ #endif /* FMC_BANK3 */
324342
325343
326344/**
@@ -331,6 +349,7 @@ typedef struct
331349/** @addtogroup FMC_LL_Exported_Constants FMC Low Layer Exported Constants
332350 * @{
333351 */
352+ #if defined(FMC_BANK1 )
334353
335354/** @defgroup FMC_LL_NOR_SRAM_Controller FMC NOR/SRAM Controller
336355 * @{
@@ -515,7 +534,9 @@ typedef struct
515534/**
516535 * @}
517536 */
537+ #endif /* FMC_BANK1 */
518538
539+ #if defined(FMC_BANK3 )
519540
520541/** @defgroup FMC_LL_NAND_Controller FMC NAND Controller
521542 * @{
@@ -579,25 +600,30 @@ typedef struct
579600/**
580601 * @}
581602 */
603+ #endif /* FMC_BANK3 */
582604
583605
584606/** @defgroup FMC_LL_Interrupt_definition FMC Low Layer Interrupt definition
585607 * @{
586608 */
609+ #if defined(FMC_BANK3 )
587610#define FMC_IT_RISING_EDGE (0x00000008U)
588611#define FMC_IT_LEVEL (0x00000010U)
589612#define FMC_IT_FALLING_EDGE (0x00000020U)
613+ #endif /* FMC_BANK3 */
590614/**
591615 * @}
592616 */
593617
594618/** @defgroup FMC_LL_Flag_definition FMC Low Layer Flag definition
595619 * @{
596620 */
621+ #if defined(FMC_BANK3 )
597622#define FMC_FLAG_RISING_EDGE (0x00000001U)
598623#define FMC_FLAG_LEVEL (0x00000002U)
599624#define FMC_FLAG_FALLING_EDGE (0x00000004U)
600625#define FMC_FLAG_FEMPT (0x00000040U)
626+ #endif /* FMC_BANK3 */
601627/**
602628 * @}
603629 */
@@ -614,6 +640,12 @@ typedef struct
614640/** @defgroup FMC_LL_Private_Macros FMC_LL Private Macros
615641 * @{
616642 */
643+ #if defined(FMC_BANK1 )
644+ /** @defgroup FMC_LL_NOR_Macros FMC NOR/SRAM Macros
645+ * @brief macros to handle NOR device enable/disable and read/write operations
646+ * @{
647+ */
648+
617649/**
618650 * @brief Enable the FMC Peripheral.
619651 * @retval None
@@ -651,7 +683,9 @@ typedef struct
651683/**
652684 * @}
653685 */
686+ #endif /* FMC_BANK1 */
654687
688+ #if defined(FMC_BANK3 )
655689/** @defgroup FMC_LL_NAND_Macros FMC NAND Macros
656690 * @brief macros to handle NAND device enable/disable
657691 * @{
@@ -675,7 +709,9 @@ typedef struct
675709/**
676710 * @}
677711 */
712+ #endif /* FMC_BANK3 */
678713
714+ #if defined(FMC_BANK3 )
679715/** @defgroup FMC_LL_NAND_Interrupt FMC NAND Interrupt
680716 * @brief macros to handle NAND interrupts
681717 * @{
@@ -735,6 +771,7 @@ typedef struct
735771/**
736772 * @}
737773 */
774+ #endif /* FMC_BANK3 */
738775
739776
740777/**
@@ -750,6 +787,7 @@ typedef struct
750787 * @{
751788 */
752789
790+ #if defined(FMC_BANK1 )
753791/** @defgroup FMC_LL_NORSRAM NOR SRAM
754792 * @{
755793 */
@@ -780,7 +818,9 @@ HAL_StatusTypeDef FMC_NORSRAM_WriteOperation_Disable(FMC_NORSRAM_TypeDef *Devic
780818/**
781819 * @}
782820 */
821+ #endif /* FMC_BANK1 */
783822
823+ #if defined(FMC_BANK3 )
784824/** @defgroup FMC_LL_NAND NAND
785825 * @{
786826 */
@@ -810,6 +850,7 @@ HAL_StatusTypeDef FMC_NAND_GetECC(FMC_NAND_TypeDef *Device, uint32_t *ECCval, u
810850/**
811851 * @}
812852 */
853+ #endif /* FMC_BANK3 */
813854
814855
815856
0 commit comments