hal_flash.h 509 B

123456789101112131415161718192021222324
  1. #ifndef __HAL_FLASH_H__
  2. #define __HAL_FLASH_H__
  3. #include "sys.h"
  4. #include "stdint.h"
  5. enum
  6. {
  7. FLASHIF_OK = 0,
  8. FLASHIF_ERASEKO,
  9. FLASHIF_WRITINGCTRL_ERROR,
  10. FLASHIF_WRITING_ERROR,
  11. FLASHIF_CHECK_ERRROR
  12. };
  13. extern void FLASH_PageErase(uint32_t PageAddress);
  14. uint8_t HAL_FlashInit(void *args);
  15. uint8_t HAL_FlashSectorErase( uint32_t addr);
  16. uint8_t HAL_FlashWriteBytes(uint32_t addr, uint8_t* buf, uint16_t size);
  17. uint8_t HAL_FlashReadBytes(uint32_t addr, uint8_t* buf, uint16_t size);
  18. #endif