Choco OS  V.0.16.9.0
Join to the chocolate world
oc_flashfs.h
Go to the documentation of this file.
1 
28 #ifndef SYSTEM_CORE_INC_FS_FLASHFS_OC_FLASHFS_H_
29 #define SYSTEM_CORE_INC_FS_FLASHFS_OC_FLASHFS_H_
30 
31 
32 #include <oc_fs.h>
33 #include <oc_memory.h>
34 
40 #define _________________________________________TYPES_SECTION______________________________________________________________________________
41 
44 typedef struct Context_t * oC_FlashFs_Context_t;
45 
46 typedef struct
47 {
48  const char * Name;
49  const uint8_t * Data;
50  oC_MemorySize_t Size;
52 
53 #undef _________________________________________TYPES_SECTION______________________________________________________________________________
54 
61 #define _________________________________________FUNCTIONS_SECTION__________________________________________________________________________
62 
65 extern oC_ErrorCode_t oC_FlashFs_init ( oC_FlashFs_Context_t * outContext );
66 extern oC_ErrorCode_t oC_FlashFs_deinit ( oC_FlashFs_Context_t Context );
67 extern oC_ErrorCode_t oC_FlashFs_fopen ( oC_FlashFs_Context_t Context , oC_File_t * outFile , const char * Path , oC_FileSystem_ModeFlags_t Mode , oC_FileSystem_FileAttributes_t Attributes );
68 extern oC_ErrorCode_t oC_FlashFs_fclose ( oC_FlashFs_Context_t Context , oC_File_t File );
69 extern oC_ErrorCode_t oC_FlashFs_fread ( oC_FlashFs_Context_t Context , oC_File_t File , void * outBuffer , uint32_t * Size );
70 extern oC_ErrorCode_t oC_FlashFs_fwrite ( oC_FlashFs_Context_t Context , oC_File_t File , const void * Buffer , uint32_t * Size );
71 extern oC_ErrorCode_t oC_FlashFs_lseek ( oC_FlashFs_Context_t Context , oC_File_t File , uint32_t Offset );
72 extern oC_ErrorCode_t oC_FlashFs_ioctl ( oC_FlashFs_Context_t Context , oC_File_t File , oC_Ioctl_Command_t Command , void * Pointer);
73 extern oC_ErrorCode_t oC_FlashFs_sync ( oC_FlashFs_Context_t Context , oC_File_t File );
74 extern oC_ErrorCode_t oC_FlashFs_getc ( oC_FlashFs_Context_t Context , char * outCharacter , oC_File_t File );
75 extern oC_ErrorCode_t oC_FlashFs_putc ( oC_FlashFs_Context_t Context , char Character , oC_File_t File );
76 extern int32_t oC_FlashFs_tell ( oC_FlashFs_Context_t Context , oC_File_t File );
77 extern bool oC_FlashFs_eof ( oC_FlashFs_Context_t Context , oC_File_t File );
78 extern uint32_t oC_FlashFs_size ( oC_FlashFs_Context_t Context , oC_File_t File );
79 
80 extern oC_ErrorCode_t oC_FlashFs_opendir ( oC_FlashFs_Context_t Context , oC_Dir_t * outDir , const char * Path );
81 extern oC_ErrorCode_t oC_FlashFs_closedir ( oC_FlashFs_Context_t Context , oC_Dir_t Dir );
82 extern oC_ErrorCode_t oC_FlashFs_readdir ( oC_FlashFs_Context_t Context , oC_Dir_t Dir , oC_FileInfo_t * outFileInfo );
83 
84 extern oC_ErrorCode_t oC_FlashFs_stat ( oC_FlashFs_Context_t Context , const char * Path , oC_FileInfo_t * outFileInfo);
85 extern oC_ErrorCode_t oC_FlashFs_unlink ( oC_FlashFs_Context_t Context , const char * Path);
86 extern oC_ErrorCode_t oC_FlashFs_rename ( oC_FlashFs_Context_t Context , const char * OldName , const char * NewName);
87 extern oC_ErrorCode_t oC_FlashFs_chmod ( oC_FlashFs_Context_t Context , const char * Path, oC_FileSystem_FileAttributes_t Attributes , oC_FileSystem_FileAttributes_t Mask);
88 extern oC_ErrorCode_t oC_FlashFs_utime ( oC_FlashFs_Context_t Context , const char * Path , oC_Timestamp_t Timestamp );
89 extern oC_ErrorCode_t oC_FlashFs_mkdir ( oC_FlashFs_Context_t Context , const char * Path);
90 extern bool oC_FlashFs_DirExists ( oC_FlashFs_Context_t Context , const char * Path);
91 
92 #undef _________________________________________FUNCTIONS_SECTION__________________________________________________________________________
93 
100 #define _________________________________________VARIABLES_SECTION__________________________________________________________________________
101 
102 extern const oC_FileSystem_Registration_t FlashFs;
103 extern const oC_FlashFs_FileDefinition_t oC_FlashFs_FileDefinitions[];
104 extern const uint32_t oC_FlashFs_NumberOfFiles;
105 
106 #undef _________________________________________VARIABLES_SECTION__________________________________________________________________________
107 
108 
109 
110 #endif /* SYSTEM_CORE_INC_FS_FLASHFS_OC_FLASHFS_H_ */
The file with interface for the GPIO driver.
oC_FileSystem_ModeFlags_t
Definition: oc_fs.h:54
The file with interface for file systems.
stores ETH context
Definition: oc_eth.c:97
Definition: oc_devfs.c:60