#ifndef __HAL_FLASH_H__
#define __HAL_FLASH_H__

 
#include "hc32_ll_fcg.h"
#include "hc32_ll_efm.h"
 
 
 
 
 
/* Flash definitions */
#define FLASH_BASE                      (EFM_START_ADDR)
#define FLASH_SIZE                      (EFM_END_ADDR + 1U)
#define FLASH_SECTOR_SIZE               (SECTOR_SIZE)
#define FLASH_SECTOR0_NUM               (0U)
#define FLASH_SECTOR_NUM                (32U)

/* SRAM definitions */
#define SRAM_SIZE                       (0x010000UL)
/* Vector table */
#define VECT_TAB_STEP                   (0x400UL)

 
 
int32_t hc32_flash_read(uint32_t u32Addr, uint8_t *pu8Buff, uint32_t u32Len);
int32_t hc32_flash_write(uint32_t write_addr,uint8_t *buffer,uint32_t number);
#endif