@@ -38,6 +38,7 @@ extern "C" {
38
38
/** @addtogroup FMC_LL_Private_Macros
39
39
* @{
40
40
*/
41
+ #if defined(FMC_BANK1 )
41
42
42
43
#define IS_FMC_NORSRAM_BANK (__BANK__ ) (((__BANK__) == FMC_NORSRAM_BANK1) || \
43
44
((__BANK__) == FMC_NORSRAM_BANK2) || \
@@ -95,6 +96,8 @@ extern "C" {
95
96
#define IS_FMC_NORSRAM_EXTENDED_DEVICE (__INSTANCE__ ) ((__INSTANCE__) == FMC_NORSRAM_EXTENDED_DEVICE)
96
97
#define IS_FMC_MAX_CHIP_SELECT_PULSE_TIME (__TIME__ ) (((__TIME__) >= 1U) && ((__TIME__) <= 65535U))
97
98
99
+ #endif /* FMC_BANK1 */
100
+ #if defined(FMC_BANK3 )
98
101
99
102
#define IS_FMC_NAND_BANK (__BANK__ ) ((__BANK__) == FMC_NAND_BANK3)
100
103
#define IS_FMC_WAIT_FEATURE (__FEATURE__ ) (((__FEATURE__) == FMC_NAND_WAIT_FEATURE_DISABLE) || \
@@ -118,6 +121,7 @@ extern "C" {
118
121
#define IS_FMC_HIZ_TIME (__TIME__ ) ((__TIME__) <= 254U)
119
122
#define IS_FMC_NAND_DEVICE (__INSTANCE__ ) ((__INSTANCE__) == FMC_NAND_DEVICE)
120
123
124
+ #endif /* FMC_BANK3 */
121
125
122
126
/**
123
127
* @}
@@ -129,14 +133,23 @@ extern "C" {
129
133
* @{
130
134
*/
131
135
136
+ #if defined(FMC_BANK1 )
132
137
#define FMC_NORSRAM_TypeDef FMC_Bank1_TypeDef
133
138
#define FMC_NORSRAM_EXTENDED_TypeDef FMC_Bank1E_TypeDef
139
+ #endif /* FMC_BANK1 */
140
+ #if defined(FMC_BANK3 )
134
141
#define FMC_NAND_TypeDef FMC_Bank3_TypeDef
142
+ #endif /* FMC_BANK3 */
135
143
144
+ #if defined(FMC_BANK1 )
136
145
#define FMC_NORSRAM_DEVICE FMC_Bank1_R
137
146
#define FMC_NORSRAM_EXTENDED_DEVICE FMC_Bank1E_R
147
+ #endif /* FMC_BANK1 */
148
+ #if defined(FMC_BANK3 )
138
149
#define FMC_NAND_DEVICE FMC_Bank3_R
150
+ #endif /* FMC_BANK3 */
139
151
152
+ #if defined(FMC_BANK1 )
140
153
/**
141
154
* @brief FMC NORSRAM Configuration Structure definition
142
155
*/
@@ -261,7 +274,9 @@ typedef struct
261
274
uint32_t AccessMode ; /*!< Specifies the asynchronous access mode.
262
275
This parameter can be a value of @ref FMC_Access_Mode */
263
276
} FMC_NORSRAM_TimingTypeDef ;
277
+ #endif /* FMC_BANK1 */
264
278
279
+ #if defined(FMC_BANK3 )
265
280
/**
266
281
* @brief FMC NAND Configuration Structure definition
267
282
*/
@@ -290,7 +305,9 @@ typedef struct
290
305
delay between ALE low and RE low.
291
306
This parameter can be a number between Min_Data = 0 and Max_Data = 255 */
292
307
} FMC_NAND_InitTypeDef ;
308
+ #endif /* FMC_BANK3 */
293
309
310
+ #if defined(FMC_BANK3 )
294
311
/**
295
312
* @brief FMC NAND Timing parameters structure definition
296
313
*/
@@ -321,6 +338,7 @@ typedef struct
321
338
on the memory space timing to be configured).
322
339
This parameter can be a number between Min_Data = 0 and Max_Data = 254 */
323
340
} FMC_NAND_PCC_TimingTypeDef ;
341
+ #endif /* FMC_BANK3 */
324
342
325
343
326
344
/**
@@ -331,6 +349,7 @@ typedef struct
331
349
/** @addtogroup FMC_LL_Exported_Constants FMC Low Layer Exported Constants
332
350
* @{
333
351
*/
352
+ #if defined(FMC_BANK1 )
334
353
335
354
/** @defgroup FMC_LL_NOR_SRAM_Controller FMC NOR/SRAM Controller
336
355
* @{
@@ -515,7 +534,9 @@ typedef struct
515
534
/**
516
535
* @}
517
536
*/
537
+ #endif /* FMC_BANK1 */
518
538
539
+ #if defined(FMC_BANK3 )
519
540
520
541
/** @defgroup FMC_LL_NAND_Controller FMC NAND Controller
521
542
* @{
@@ -579,25 +600,30 @@ typedef struct
579
600
/**
580
601
* @}
581
602
*/
603
+ #endif /* FMC_BANK3 */
582
604
583
605
584
606
/** @defgroup FMC_LL_Interrupt_definition FMC Low Layer Interrupt definition
585
607
* @{
586
608
*/
609
+ #if defined(FMC_BANK3 )
587
610
#define FMC_IT_RISING_EDGE (0x00000008U)
588
611
#define FMC_IT_LEVEL (0x00000010U)
589
612
#define FMC_IT_FALLING_EDGE (0x00000020U)
613
+ #endif /* FMC_BANK3 */
590
614
/**
591
615
* @}
592
616
*/
593
617
594
618
/** @defgroup FMC_LL_Flag_definition FMC Low Layer Flag definition
595
619
* @{
596
620
*/
621
+ #if defined(FMC_BANK3 )
597
622
#define FMC_FLAG_RISING_EDGE (0x00000001U)
598
623
#define FMC_FLAG_LEVEL (0x00000002U)
599
624
#define FMC_FLAG_FALLING_EDGE (0x00000004U)
600
625
#define FMC_FLAG_FEMPT (0x00000040U)
626
+ #endif /* FMC_BANK3 */
601
627
/**
602
628
* @}
603
629
*/
@@ -614,6 +640,12 @@ typedef struct
614
640
/** @defgroup FMC_LL_Private_Macros FMC_LL Private Macros
615
641
* @{
616
642
*/
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
+
617
649
/**
618
650
* @brief Enable the FMC Peripheral.
619
651
* @retval None
@@ -651,7 +683,9 @@ typedef struct
651
683
/**
652
684
* @}
653
685
*/
686
+ #endif /* FMC_BANK1 */
654
687
688
+ #if defined(FMC_BANK3 )
655
689
/** @defgroup FMC_LL_NAND_Macros FMC NAND Macros
656
690
* @brief macros to handle NAND device enable/disable
657
691
* @{
@@ -675,7 +709,9 @@ typedef struct
675
709
/**
676
710
* @}
677
711
*/
712
+ #endif /* FMC_BANK3 */
678
713
714
+ #if defined(FMC_BANK3 )
679
715
/** @defgroup FMC_LL_NAND_Interrupt FMC NAND Interrupt
680
716
* @brief macros to handle NAND interrupts
681
717
* @{
@@ -735,6 +771,7 @@ typedef struct
735
771
/**
736
772
* @}
737
773
*/
774
+ #endif /* FMC_BANK3 */
738
775
739
776
740
777
/**
@@ -750,6 +787,7 @@ typedef struct
750
787
* @{
751
788
*/
752
789
790
+ #if defined(FMC_BANK1 )
753
791
/** @defgroup FMC_LL_NORSRAM NOR SRAM
754
792
* @{
755
793
*/
@@ -780,7 +818,9 @@ HAL_StatusTypeDef FMC_NORSRAM_WriteOperation_Disable(FMC_NORSRAM_TypeDef *Devic
780
818
/**
781
819
* @}
782
820
*/
821
+ #endif /* FMC_BANK1 */
783
822
823
+ #if defined(FMC_BANK3 )
784
824
/** @defgroup FMC_LL_NAND NAND
785
825
* @{
786
826
*/
@@ -810,6 +850,7 @@ HAL_StatusTypeDef FMC_NAND_GetECC(FMC_NAND_TypeDef *Device, uint32_t *ECCval, u
810
850
/**
811
851
* @}
812
852
*/
853
+ #endif /* FMC_BANK3 */
813
854
814
855
815
856
0 commit comments