drv_flash.h 565 B

123456789101112131415161718192021222324
  1. /*
  2. * Copyright (c) 2019 Winner Microelectronics Co., Ltd.
  3. *
  4. * SPDX-License-Identifier: Apache-2.0
  5. *
  6. * Change Logs:
  7. * Date Author Notes
  8. * 2019-04-04 tyx 1st version
  9. */
  10. #ifndef __DRV_FLASH_H__
  11. #define __DRV_FLASH_H__
  12. #include <rtthread.h>
  13. int wm_flash_read(long offset, void *data, int size);
  14. int wm_flash_write(long offset, void *data, int size);
  15. int wm_flash_erase(long offset, int size);
  16. int wm_flash_init(void);
  17. rt_uint32_t wm_flash_total(void);
  18. rt_uint32_t wm_flash_addr(void);
  19. rt_uint32_t wm_flash_blksize(void);
  20. #endif