Embedded TCP/IP stack: fnet_fs_rom.h Source File

FNET

fnet_fs_rom.h
1 /**************************************************************************
2 *
3 * Copyright 2011-2017 by Andrey Butok. FNET Community.
4 * Copyright 2008-2010 by Andrey Butok. Freescale Semiconductor, Inc.
5 *
6 ***************************************************************************
7 *
8 * Licensed under the Apache License, Version 2.0 (the "License"); you may
9 * not use this file except in compliance with the License.
10 * You may obtain a copy of the License at
11 *
12 * http://www.apache.org/licenses/LICENSE-2.0
13 *
14 * Unless required by applicable law or agreed to in writing, software
15 * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
16 * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
17 * See the License for the specific language governing permissions and
18 * limitations under the License.
19 *
20 ***************************************************************************
21 *
22 * FNET ROM FS API.
23 *
24 ***************************************************************************/
25 #ifndef _FNET_FS_ROM_H_
26 
27 #define _FNET_FS_ROM_H_
28 
29 #if (FNET_CFG_FS && FNET_CFG_FS_ROM) || defined(__DOXYGEN__)
30 
31 #include "fnet_fs.h"
32 
102 /**************************************************************************/
108 {
109  const fnet_char_t *name;
111  const fnet_uint8_t *data;
120 };
121 
122 /**************************************************************************/
126 {
127  const fnet_char_t *name;
129  fnet_uint32_t version;
131  const struct fnet_fs_rom_node *nodes;
136 };
137 
138 /**************************************************************************/
141 #define FNET_FS_ROM_NAME "fnet_rom"
142 
143 /**************************************************************************/
146 #define FNET_FS_ROM_VERSION (2u)
147 
148 #if defined(__cplusplus)
149 extern "C" {
150 #endif
151 
152 /***************************************************************************/
163 void fnet_fs_rom_register(void);
164 
165 /***************************************************************************/
176 void fnet_fs_rom_unregister(void);
177 
178 #if defined(__cplusplus)
179 }
180 #endif
181 
184 #endif /* FNET_CFG_FS && FNET_CFG_FS_ROM */
185 
186 
187 #endif /* _FNET_FS_ROM_H_ */
FNET ROM file-system image.
Definition: fnet_fs_rom.h:125
const struct fnet_fs_rom_node * nodes
Array of file-system nodes. The last node element must have all fields set to zero as the end-of-arr...
Definition: fnet_fs_rom.h:131
fnet_size_t data_size
Size of the file buffer pointed to by the data field. For a directory this field must be set to 0...
Definition: fnet_fs_rom.h:113
void fnet_fs_rom_unregister(void)
Unregisters the FNET ROM file system.
unsigned long fnet_size_t
Unsigned integer type representing the size in bytes.
Definition: fnet_stdlib.h:56
const fnet_uint8_t * data
Pointer to a file-content buffer. For a directory this field must be set to 0.
Definition: fnet_fs_rom.h:111
const fnet_char_t * name
Name of a file or directory (null-terminated string).
Definition: fnet_fs_rom.h:109
fnet_uint32_t version
File-system version the FS image was generated for.
Definition: fnet_fs_rom.h:129
void fnet_fs_rom_register(void)
Registers the FNET ROM file system.
const fnet_char_t * name
File-system name (null-terminated string). Should be set to the FNET_FS_ROM_NAME. ...
Definition: fnet_fs_rom.h:127
char fnet_char_t
Type representing the charecter.
Definition: fnet_stdlib.h:76
FNET ROM file-system node. The node represents a file or a directory.
Definition: fnet_fs_rom.h:107
const struct fnet_fs_rom_node * parent_node
Pointer to the parent directory. For the root directory this field must be set to 0...
Definition: fnet_fs_rom.h:116

© 2005-2018 by Andrey Butok. http://fnet.sourceforge.net