#ifndef _FLASH_H
#define _FLASH_H

#include "includes.h"


#define  FLASH_PAGE_SIZE	     			((uint32_t)0x00000800)   /* FLASH Page Size */
#define  FLASH_USER_START_ADDR			((uint32_t)0x08000000)   /* Start @ of user Flash area */

uint8_t Flash_RangeErase(uint32_t FlashAddress, uint32_t Size);
uint8_t Flash_PageErase(uint8_t _PageNumber);
uint8_t Flash_BufferWrite(uint32_t address, uint32_t *p_buffer, uint32_t len);
void Flash_BufferRead(uint32_t address, uint8_t *buffer, uint32_t len);
uint32_t Flash_DatalenRead(uint32_t address,uint32_t len);

//uint8_t Flash_PageErase(uint8_t _PageNumber);
//uint8_t Flash_BufferWrite(uint8_t _PageNumber,uint32_t *pBuffer,uint16_t Num);
//void 		Flash_BufferRead(uint8_t _PageNumber,uint8_t *pBuffer,uint16_t Num);
//void 		Flash_BufferRead (uint8_t _PageNumber,uint32_t *pBuffer,uint16_t Num);

#endif
