libdragon
dfsinternal.h
Go to the documentation of this file.
00001 
00006 #ifndef __LIBDRAGON_DFSINTERNAL_H
00007 #define __LIBDRAGON_DFSINTERNAL_H
00008 
00015 #define FLAGS_ID        0xFFFFFFFF
00016 
00017 #define NEXTENTRY_ID    0xDEADBEEF
00018 
00020 #define SECTOR_SIZE     256
00021 
00022 #define SECTOR_PAYLOAD  252
00023 
00025 struct directory_entry
00026 {
00028     uint32_t flags;
00030     uint32_t next_entry;
00032     char path[MAX_FILENAME_LEN+1];
00034     uint32_t file_pointer;
00035 } __attribute__((__packed__));
00036 
00038 typedef struct directory_entry directory_entry_t;
00039 
00041 struct file_entry
00042 {
00044     uint32_t next_sector;
00046     uint8_t data[SECTOR_PAYLOAD];
00047 } __attribute__((__packed__));
00048 
00050 typedef struct file_entry file_entry_t;
00051 
00053 typedef struct open_file
00054 {
00056     file_entry_t cur_sector;
00058     file_entry_t *start_sector;
00060     uint32_t handle;
00062     uint32_t size;
00064     uint32_t loc;
00066     uint32_t sector_number;
00074     uint8_t padding[236];
00075 } open_file_t;
00076  /* dfs */
00078 
00079 #endif
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Defines