#ifndef __FLASH_H
#define __FLASH_H

#define	SECTOR_SIZE		0x1000
#define	FlashSector(addr)	((addr)&~(SECTOR_SIZE-1))

unsigned int GetFlashID(void);
void GetFlashCFI(unsigned short *DataPtr);
//void ChipErase(void);
//void SectorErase(unsigned int sector);
//void FlashProg(unsigned int ProgStart, unsigned short *DataPtr, unsigned int Size);
void FlashRead(unsigned int ReadStart, unsigned short *DataPtr, unsigned int Size);
int SectorProg(unsigned int begin, unsigned short *data, unsigned int size);

#endif