//system_defines.h
#include "Cyclone_Device.h"

#define FLASH_CONFIG (0)

#define min(a,b)					(((a)>(b)) ? (b):(a))



//==========================================================================================
// Memory allocation constants
//==========================================================================================
// ****VOYAGER#define MFBALR2_HALF0_DATA_FLASH_BASE_ADDRESS 0x8800

// This limitation check is required because the flash access routines in flash.c make the
// assumption that the size of the segments of the data flash are an integral power of two.
#if (DATA_FLASH_SEGMENT_SIZE & (DATA_FLASH_SEGMENT_SIZE - 1)) != 0
#error "DATA_FLASH_SEGMENT_SIZE must be defined as an integral power of two"
#endif
	

#define MFBALR2_HALF0_DATA_FLASH_BASE_ADDRESS (0x8800)
#define MFBALRX_BYTE0_BLOCK_SIZE_2K     	(0x20) 		
#define MFBALRX_BYTE0_RONLY					(0x02)		   //Read-only protection
#define MFBALRX_BYTE0_BLOCK_SIZE_32K    	(0x60)


// Flash Error codes
#define FLASH_SUCCESS 				(0)
#define FLASH_INVALID_SEGMENT 		(1)
#define	FLASH_INVALID_ADDRESS		(2)
#define	FLASH_MISCOMPARE			(3)

#define NULL						(0)
#define ROM_PASSWORD_BYTES      (4)
#define NUMBER_OF_FAULTY_TRIALS (5) // Number of time wrog password may be entered

#define DCDC_PAGE_NUMS (1)




