#ifndef  __API_FLASH_H
#define __API_FLASH_H




#define OK          			    0x00
#define ERASED      			    0x01
#define NON_ERASED  			    0x02
#define MISALIGNED_ADDRESS  	0x03
#define ACCESS_ERROR        	0x04       
#define VERIFICATION_FAILED 	0x05
#define LENGTH_OUT_OF_RANGE 	0x06

#define D_Flash_Block_1 	        0x100000           //
#define D_Flash_Block_2 	        0x100000 + 256     //им?Boot
#define D_Flash_Block_3 	        0x100000 + 512     //27
#define D_Flash_Block_4 	        0x100000 + 768     //boot ?ив
#define D_Flash_Block_5 	        0x100000 + 1024    //2E
#define D_Flash_Block_6 	        0x100000 + 1280    //
#define D_Flash_Block_7 	        0x100000 + 1536    //
#define D_Flash_Block_8 	        0x100000 + 1792    //







 INT16U PFlash_Read (INT32U ADDR32);
INT32U PFlash_Near_Read (INT32U ADDR32);
uint8_t DFLASH_Read_Word(uint32_t Adrr, uint8_t *Data,uint8_t len);
INT8U DFLASH_Erase_Sector(INT32U address);
 INT8U DFLASH_N_Program(INT32U address, INT8U *ptr, INT8U number_of_words);
 uint8_t Write_Base_DATA_FROM_FLASH(uint32_t Adrr, uint8_t *Data,uint8_t len);




#endif

