39 lines
860 B
C
Executable File
39 lines
860 B
C
Executable File
#ifndef __HAL_FLASH_H__
|
|
#define __HAL_FLASH_H__
|
|
#include "hal.h"
|
|
|
|
#ifdef __cplusplus
|
|
extern "C"
|
|
{
|
|
#endif /* __cplusplus */
|
|
|
|
|
|
////////////////////////////////////////////////////////////
|
|
//
|
|
// 数据类型定义
|
|
//
|
|
////////////////////////////////////////////////////////////
|
|
|
|
/*flash init interface define,should be implement if needed*/
|
|
uint32_t hal_flash_init();
|
|
|
|
/*flash deinit interface define,should be implement if needed*/
|
|
uint32_t hal_flash_deinit();
|
|
|
|
// path can be file, return size has been writed
|
|
uint32_t hal_flash_write(const int8_t *path, int8_t *data, uint32_t size);
|
|
|
|
// path can be file, return size has been read
|
|
uint32_t hal_flash_read(const int8_t *path, int8_t *data, uint32_t size);
|
|
|
|
uint32_t hal_flash_format(const int8_t *path);
|
|
|
|
uint32_t hal_flash_test();
|
|
|
|
|
|
#ifdef __cplusplus
|
|
}
|
|
#endif /* __cplusplus */
|
|
|
|
#endif /* __HAL_FLASH_H__ */
|