drv_flash.h 645 B

12345678910111213141516171819202122232425262728293031
  1. /*
  2. * Copyright (C) 2022-2024, Xiaohua Semiconductor Co., Ltd.
  3. *
  4. * SPDX-License-Identifier: Apache-2.0
  5. *
  6. * Change Logs:
  7. * Date Author Notes
  8. * 2022-04-28 CDT first version
  9. */
  10. #ifndef __DRV_FLASH_H__
  11. #define __DRV_FLASH_H__
  12. #include <rtthread.h>
  13. #include "rtdevice.h"
  14. #include <rthw.h>
  15. #include <drv_common.h>
  16. #ifdef __cplusplus
  17. extern "C" {
  18. #endif
  19. int hc32_flash_read(rt_uint32_t addr, rt_uint8_t *buf, size_t size);
  20. int hc32_flash_write(rt_uint32_t addr, const rt_uint8_t *buf, size_t size);
  21. int hc32_flash_erase(rt_uint32_t addr, size_t size);
  22. #ifdef __cplusplus
  23. }
  24. #endif
  25. #endif /* __DRV_FLASH_H__ */