drv_flash.h 663 B

1234567891011121314151617181920212223242526272829303132
  1. /*
  2. * Copyright (c) 2006-2023, RT-Thread Development Team
  3. *
  4. * SPDX-License-Identifier: Apache-2.0
  5. *
  6. * Change Logs:
  7. * Date Author Notes
  8. * 2023-03-16 luobeihai 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 <stddef.h>
  16. #include <drv_common.h>
  17. #ifdef __cplusplus
  18. extern "C" {
  19. #endif
  20. int apm32_flash_read(rt_uint32_t addr, rt_uint8_t *buf, size_t size);
  21. int apm32_flash_write(rt_uint32_t addr, const rt_uint8_t *buf, size_t size);
  22. int apm32_flash_erase(rt_uint32_t addr, size_t size);
  23. #ifdef __cplusplus
  24. }
  25. #endif
  26. #endif /* __DRV_FLASH_H__ */