#ifndef __HAL_FLASH_H__ #define __HAL_FLASH_H__ #include "sys.h" #include "stdint.h" enum { FLASHIF_OK = 0, FLASHIF_ERASEKO, FLASHIF_WRITINGCTRL_ERROR, FLASHIF_WRITING_ERROR, FLASHIF_CHECK_ERRROR }; extern void FLASH_PageErase(uint32_t PageAddress); uint8_t HAL_FlashInit(void *args); uint8_t HAL_FlashSectorErase( uint32_t addr); uint8_t HAL_FlashWriteBytes(uint32_t addr, uint8_t* buf, uint16_t size); uint8_t HAL_FlashReadBytes(uint32_t addr, uint8_t* buf, uint16_t size); #endif