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 11 #ifndef __DRV_FLASH_H__ 12 #define __DRV_FLASH_H__ 13 14 #include <rtthread.h> 15 #include "rtdevice.h" 16 #include <rthw.h> 17 #include <drv_common.h> 18 19 #ifdef __cplusplus 20 extern "C" { 21 #endif 22 23 int apm32_flash_read(rt_uint32_t addr, rt_uint8_t *buf, size_t size); 24 int apm32_flash_write(rt_uint32_t addr, const rt_uint8_t *buf, size_t size); 25 int apm32_flash_erase(rt_uint32_t addr, size_t size); 26 27 #ifdef __cplusplus 28 } 29 #endif 30 31 #endif /* __DRV_FLASH_H__ */ 32