#ifndef __FLASHWRITE_H_
#define __FLASHWRITE_H_

#define USERCODEADDRESS 0X3F00

typedef struct
{	
	uint8   FlashRead;
	uint8   FlashWrite;
	uint16  FlashRead2Byte;
	uint16  FlashWrite2Byte;
    uint32  FlashRead4Byte;
	uint32  FlashWrite4Byte;
} MCUFlash;

extern MCUFlash xdata FlashTest;

extern uint16 Get2ByteFromFlash(uint8 xdata *BlockStartAddr);
extern uint8 Write2Byte2Flash(uint8 xdata *BlockStartAddr,uint16 NewData2Flash);
extern void WriteOrReadFlashTest(uint8 xdata *BlockStartAddr,uint16 NewData2Flash);

#endif
