#ifndef _FM_SAMSUNG_H_
#define _FM_SAMSUNG_H_

#include "hardware.h"

//#ifdef FM_K9F2808
#define	BYTES_PER_PAGE		512
#define	PAGES_PER_BLOCK		32
#define	BLOCKS_PER_DEIVCE	1024
//#endif

#define	BYTES_PER_PAGE_1G		2048//	2048
#define	PAGES_PER_BLOCK_1G		64
#define	BLOCKS_PER_DEIVCE_1G		1024

#define	BYTES_PER_BLOCK			(BYTES_PER_PAGE * PAGES_PER_BLOCK)

#define FLASH_TYPE_128M			1								
#define FLASH_TYPE_1G				0xF1

/* Flash Memory Functions */
void FlashReset(void);
void FlashMarkInvalidBlock(int block);
int FlashCheckInvalidBlock(int block);
unsigned char FlashReadStatus(void);
unsigned char FlashReadProductId(void);
int FlashEraseBlock(int block);
int FlashReadPage(unsigned char *dst, int page, int count);
int FlashWritePage(unsigned char *Write_Data, int page, int count);

#endif

