Simple RAM file system.

Dependents:   modem_ref_helper

Embed: (wiki syntax)

« Back to documentation index

Show/hide line numbers ram_fs.h Source File

ram_fs.h

00001 #ifndef _FS_H_
00002 #define _FS_H_
00003 
00004 #include "mbed.h"
00005 
00006 typedef struct {
00007     uint8_t file_id;
00008     uint8_t* header;
00009     uint8_t* data;
00010     void* next;
00011 } ram_fs_file_t;
00012 
00013 void ram_fs_new(uint8_t file_id, uint8_t* header, uint8_t* data);
00014 bool ram_fs_delete(uint8_t file_id);
00015 bool ram_fs_write(uint8_t file_id, uint16_t offset, uint16_t size, uint8_t* content);
00016 bool ram_fs_read(uint8_t file_id, uint16_t offset, uint16_t size, uint8_t* buf);
00017 void* ram_fs_get_header(uint8_t file_id);
00018 void* ram_fs_get_data(uint8_t file_id);
00019 
00020 #endif // _FS_H_