Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
ffsformat.h@0:6339b3e34014, 2017-07-29 (annotated)
- Committer:
 - WiredHome
 - Date:
 - Sat Jul 29 12:45:09 2017 +0000
 - Revision:
 - 0:6339b3e34014
 
FlashFileSystem - Read-only, but super fast. Requires external tool to prepare the data.
Who changed what in which revision?
| User | Revision | Line number | New contents of line | 
|---|---|---|---|
| WiredHome | 0:6339b3e34014 | 1 | /* Copyright 2011 Adam Green (http://mbed.org/users/AdamGreen/) | 
| WiredHome | 0:6339b3e34014 | 2 | |
| WiredHome | 0:6339b3e34014 | 3 | Licensed under the Apache License, Version 2.0 (the "License"); | 
| WiredHome | 0:6339b3e34014 | 4 | you may not use this file except in compliance with the License. | 
| WiredHome | 0:6339b3e34014 | 5 | You may obtain a copy of the License at | 
| WiredHome | 0:6339b3e34014 | 6 | |
| WiredHome | 0:6339b3e34014 | 7 | http://www.apache.org/licenses/LICENSE-2.0 | 
| WiredHome | 0:6339b3e34014 | 8 | |
| WiredHome | 0:6339b3e34014 | 9 | Unless required by applicable law or agreed to in writing, software | 
| WiredHome | 0:6339b3e34014 | 10 | distributed under the License is distributed on an "AS IS" BASIS, | 
| WiredHome | 0:6339b3e34014 | 11 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | 
| WiredHome | 0:6339b3e34014 | 12 | See the License for the specific language governing permissions and | 
| WiredHome | 0:6339b3e34014 | 13 | limitations under the License. | 
| WiredHome | 0:6339b3e34014 | 14 | */ | 
| WiredHome | 0:6339b3e34014 | 15 | /* Specifies constants and structures used within the FLASH File System. The | 
| WiredHome | 0:6339b3e34014 | 16 | header is used by both the runtime and the tool which builds the image on | 
| WiredHome | 0:6339b3e34014 | 17 | the PC. | 
| WiredHome | 0:6339b3e34014 | 18 | */ | 
| WiredHome | 0:6339b3e34014 | 19 | #ifndef _FFSFORMAT_H_ | 
| WiredHome | 0:6339b3e34014 | 20 | #define _FFSFORMAT_H_ | 
| WiredHome | 0:6339b3e34014 | 21 | |
| WiredHome | 0:6339b3e34014 | 22 | |
| WiredHome | 0:6339b3e34014 | 23 | /* The signature to be placed in SFileSystemHeader::FileSystemSignature. | 
| WiredHome | 0:6339b3e34014 | 24 | Only the first 8 bytes are used and the NULL terminator discarded. */ | 
| WiredHome | 0:6339b3e34014 | 25 | #define FILE_SYSTEM_SIGNATURE "FFileSys" | 
| WiredHome | 0:6339b3e34014 | 26 | |
| WiredHome | 0:6339b3e34014 | 27 | /* Header stored at the beginning of the file system image. */ | 
| WiredHome | 0:6339b3e34014 | 28 | typedef struct _SFileSystemHeader | 
| WiredHome | 0:6339b3e34014 | 29 | { | 
| WiredHome | 0:6339b3e34014 | 30 | /* Signature should be set to FILE_SYSTEM_SIGNATURE. */ | 
| WiredHome | 0:6339b3e34014 | 31 | char FileSystemSignature[8]; | 
| WiredHome | 0:6339b3e34014 | 32 | /* Number of entries in this file system image. */ | 
| WiredHome | 0:6339b3e34014 | 33 | unsigned int FileCount; | 
| WiredHome | 0:6339b3e34014 | 34 | /* The SFileSystemEntry[SFileSystemHeader::FileCount] array will start here. | 
| WiredHome | 0:6339b3e34014 | 35 | These entries are to be sorted so that a binary search can be performed | 
| WiredHome | 0:6339b3e34014 | 36 | at file open time. */ | 
| WiredHome | 0:6339b3e34014 | 37 | } SFileSystemHeader; | 
| WiredHome | 0:6339b3e34014 | 38 | |
| WiredHome | 0:6339b3e34014 | 39 | /* Information about each file added to the file system image. */ | 
| WiredHome | 0:6339b3e34014 | 40 | typedef struct _SFileSystemEntry | 
| WiredHome | 0:6339b3e34014 | 41 | { | 
| WiredHome | 0:6339b3e34014 | 42 | /* The 2 following offsets are relative to the beginning of the file | 
| WiredHome | 0:6339b3e34014 | 43 | image. */ | 
| WiredHome | 0:6339b3e34014 | 44 | unsigned int FilenameOffset; | 
| WiredHome | 0:6339b3e34014 | 45 | unsigned int FileBinaryOffset; | 
| WiredHome | 0:6339b3e34014 | 46 | unsigned int FileBinarySize; | 
| WiredHome | 0:6339b3e34014 | 47 | } SFileSystemEntry; | 
| WiredHome | 0:6339b3e34014 | 48 | |
| WiredHome | 0:6339b3e34014 | 49 | |
| WiredHome | 0:6339b3e34014 | 50 | #endif /* _FFSFORMAT_H_ */ |