Simple RAM file system.
Dependents: modem_ref_helper_for_v5_3_217 modem_ref_helper
Diff: ram_fs.h
- Revision:
- 0:befc17558de9
- Child:
- 5:d2b8d685f86f
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/ram_fs.h Thu May 04 13:15:20 2017 +0000 @@ -0,0 +1,19 @@ +#ifndef _FS_H_ +#define _FS_H_ + +#include "mbed.h" + +typedef struct { + uint8_t file_id; + uint8_t* header; + uint8_t* data; + void* next; +} ram_fs_file_t; + +void ram_fs_new(uint8_t file_id, uint8_t* header, uint8_t* data); +bool ram_fs_delete(uint8_t file_id); +bool ram_fs_write(uint8_t file_id, uint16_t offset, uint16_t size, uint8_t* content); +bool ram_fs_read(uint8_t file_id, uint16_t offset, uint16_t size, uint8_t* buf); +void* ram_fs_get_header(uint8_t file_id); + +#endif // _FS_H_