@@ -156,7 +156,7 @@ const uint8_t *currentOperatingData;
156
156
#define OPTIMAL_PROGRAM_UNIT (1024UL)
157
157
#define PROGRAM_PHRASE_SIZEOF_INLINE_DATA (8)
158
158
#define SIZEOF_DOUBLE_PHRASE (FSL_FEATURE_FLASH_PFLASH_SECTION_CMD_ADDRESS_ALIGMENT)
159
- #else
159
+ #else /* ifdef USING_KSDK2 */
160
160
#define ERASE_UNIT (4096)
161
161
#define BLOCK1_START_ADDR (0x80000UL)
162
162
#define BLOCK1_SIZE (0x80000UL)
@@ -288,9 +288,9 @@ static inline bool failedWithAccessError(void)
288
288
289
289
/* checking access error */
290
290
return registerValue & FTFx_FSTAT_ACCERR_MASK ;
291
- #else
291
+ #else /* ifdef USING_KSDK2 */
292
292
return BR_FTFE_FSTAT_ACCERR (FTFE );
293
- #endif
293
+ #endif /* ifdef USING_KSDK2 */
294
294
}
295
295
296
296
static inline bool failedWithProtectionError ()
@@ -301,9 +301,9 @@ static inline bool failedWithProtectionError()
301
301
302
302
/* checking protection error */
303
303
return registerValue & FTFx_FSTAT_FPVIOL_MASK ;
304
- #else
304
+ #else /* ifdef USING_KSDK2 */
305
305
return BR_FTFE_FSTAT_FPVIOL (FTFE );
306
- #endif
306
+ #endif /* ifdef USING_KSDK2 */
307
307
}
308
308
309
309
static inline bool failedWithRunTimeError ()
@@ -314,9 +314,9 @@ static inline bool failedWithRunTimeError()
314
314
315
315
/* checking MGSTAT0 non-correctable error */
316
316
return registerValue & FTFx_FSTAT_MGSTAT0_MASK ;
317
- #else
317
+ #else /* ifdef USING_KSDK2 */
318
318
return BR_FTFE_FSTAT_MGSTAT0 (FTFE );
319
- #endif
319
+ #endif /* ifdef USING_KSDK2 */
320
320
}
321
321
322
322
static inline void clearAccessError (void )
@@ -415,7 +415,7 @@ static inline void setupAddressInCCOB123(uint64_t addr)
415
415
BW_FTFE_FCCOB2_CCOBn ((uintptr_t )FTFE , (addr >> 8 ) & 0xFFUL ); /* bits [15:8] of the address. */
416
416
BW_FTFE_FCCOB3_CCOBn ((uintptr_t )FTFE , (addr >> 0 ) & 0xFFUL ); /* bits [7:0] of the address. */
417
417
}
418
- #endif
418
+ #endif /* ifndef USING_KSDK2 */
419
419
420
420
static inline void setupEraseSector (uint64_t addr )
421
421
{
@@ -446,7 +446,7 @@ static inline void setup8ByteWrite(uint64_t addr, const void *data)
446
446
/* Program 8 bytes of data into FCCOB(4..11)_CCOBn */
447
447
kFCCOBx [1 ] = ((const uint32_t * )data )[0 ];
448
448
kFCCOBx [2 ] = ((const uint32_t * )data )[1 ];
449
- #else
449
+ #else /* ifdef USING_KSDK2 */
450
450
BW_FTFE_FCCOB0_CCOBn ((uintptr_t )FTFE , PGM8 );
451
451
setupAddressInCCOB123 (addr );
452
452
@@ -458,7 +458,7 @@ static inline void setup8ByteWrite(uint64_t addr, const void *data)
458
458
BW_FTFE_FCCOB9_CCOBn ((uintptr_t )FTFE , ((const uint8_t * )data )[6 ]); /* byte 6 of program value. */
459
459
BW_FTFE_FCCOBA_CCOBn ((uintptr_t )FTFE , ((const uint8_t * )data )[5 ]); /* byte 5 of program value. */
460
460
BW_FTFE_FCCOBB_CCOBn ((uintptr_t )FTFE , ((const uint8_t * )data )[4 ]); /* byte 4 of program value. */
461
- #endif
461
+ #endif /* ifdef USING_KSDK2 */
462
462
}
463
463
464
464
static inline void setupProgramSection (uint64_t addr , const void * data , size_t cnt )
@@ -469,7 +469,7 @@ static inline void setupProgramSection(uint64_t addr, const void *data, size_t c
469
469
470
470
kFCCOBx [0 ] = BYTES_JOIN_TO_WORD_1_3 (PGMSEC , addr );
471
471
kFCCOBx [1 ] = BYTES_JOIN_TO_WORD_2_2 (cnt >> 4 , 0xFFFFU );
472
- #else
472
+ #else /* ifdef USING_KSDK2 */
473
473
static const uintptr_t FlexRAMBase = 0x14000000 ;
474
474
memcpy ((void * )FlexRAMBase , (const uint8_t * )data , cnt );
475
475
@@ -478,7 +478,7 @@ static inline void setupProgramSection(uint64_t addr, const void *data, size_t c
478
478
479
479
BW_FTFE_FCCOB4_CCOBn ((uintptr_t )FTFE , ((((uint32_t )(cnt >> 4 )) & (0x0000FF00 )) >> 8 )); /* number of 128-bits to program [15:8] */
480
480
BW_FTFE_FCCOB5_CCOBn ((uintptr_t )FTFE , (((uint32_t )(cnt >> 4 )) & (0x000000FF ))); /* number of 128-bits to program [7:0] */
481
- #endif
481
+ #endif /* ifdef USING_KSDK2 */
482
482
}
483
483
484
484
/**
@@ -760,7 +760,7 @@ static int32_t initialize(ARM_Storage_Callback_t callback)
760
760
if (rc != kStatus_FLASH_Success ) {
761
761
return ARM_DRIVER_ERROR ;
762
762
}
763
- #endif
763
+ #endif /* ifdef USING_KSDK2 */
764
764
765
765
if (controllerCurrentlyBusy ()) {
766
766
/* The user cannot initiate any further FTFE commands until notified that the
0 commit comments