NetBurner 3.1
examples/SSH/SecureSerToEthFactoryApp/effsstd.h
1 /* Revision: 2.8.7 */
2 
3 /******************************************************************************
4 * Copyright 1998-2018 NetBurner, Inc. ALL RIGHTS RESERVED
5 *
6 * Permission is hereby granted to purchasers of NetBurner Hardware to use or
7 * modify this computer program for any use as long as the resultant program
8 * is only executed on NetBurner provided hardware.
9 *
10 * No other rights to use this program or its derivatives in part or in
11 * whole are granted.
12 *
13 * It may be possible to license this or other NetBurner software for use on
14 * non-NetBurner Hardware. Contact sales@Netburner.com for more information.
15 *
16 * NetBurner makes no representation or warranties with respect to the
17 * performance of this computer program, and specifically disclaims any
18 * responsibility for any damages, special or consequential, connected with
19 * the use of this program.
20 *
21 * NetBurner
22 * 5405 Morehouse Dr.
23 * San Diego, CA 92121
24 * www.netburner.com
25 ******************************************************************************/
26 
27 
28 /*
29  *-------------------------------------------------------------------
30  * Embedded Flash File System for on-chip flash memory (EFFS-STD)
31  * configuration file for common parameters.
32  * This file is part of an example that allocates flash space
33  * to the file system, and the rest to the application.
34  *
35  * Note:
36  * COMPCODEFLAGS contain starting and ending addresses
37  * of application. To add file system you must modify the ending
38  * address to provide for the flash used. Not to do so will result
39  * in unpredictable results.
40  *
41  * See"
42  * "NetBurner Embedded Flash File System, Hardware and Software
43  * Guide" for detailed information.
44  *
45  *-------------------------------------------------------------------
46  */
47 
48 /****************************************************************************
49  *
50  * Copyright (c) 2003 by HCC Embedded
51  *
52  * This software is copyrighted by and is the sole property of
53  * HCC. All rights, title, ownership, or other interests
54  * in the software remain the property of HCC. This
55  * software may only be used in accordance with the corresponding
56  * license agreement. Any unauthorized use, duplication, transmission,
57  * distribution, or disclosure of this software is expressly forbidden.
58  *
59  * This Copyright notice may not be removed or modified without prior
60  * written consent of HCC.
61  *
62  * HCC reserves the right to modify this software without notice.
63  *
64  * HCC Embedded
65  * Budapest 1132
66  * Victor Hugo Utca 11-15
67  * Hungary
68  *
69  * Tel: +36 (1) 450 1302
70  * Fax: +36 (1) 450 1303
71  * http: www.hcc-embedded.com
72  * email: info@hcc-embedded.com
73  *
74  ***************************************************************************/
75 #ifndef _EFFSSTD_H_
76 #define _EFFSSTD_H_
77 
78 /*
79  ******************************************************************************
80  *
81  * Definitions
82  *
83  ******************************************************************************
84  */
85 /* On-chip Flash NOR */
86 #define USE_NOR
87 
88 /* Drive numbers */
89 #define NOR_DRV_NUM 0
90 #define STDRAM_DRV_NUM 1
91 #define MMC_DRV_NUM 2
92 #define CFC_DRV_NUM 3
93 #define HDD_DRV_NUM 3
94 #define FATRAM_DRV_NUM 4
95 
96 /* System type settings */
97 #if ((defined USE_NOR) | (defined USE_STDRAM)) & \
98  ((defined USE_CFC) | (defined USE_HDD) | (defined USE_MMC) | \
99  (defined USE_FATRAM))
100 #define FS_WRAPPER
101 #elif (defined USE_NOR) | (defined USE_STDRAM)
102 #define FS_STD
103 #elif (defined USE_CFC) | (defined USE_HDD) | (defined USE_MMC) | \
104  (defined USE_FATRAM)
105 #define FS_FAT
106 #endif
107 
108 /* Routine definitions */
109 #include <file/fsf.h>
110 
111 /* FAT-32 routine redefined as flash file system routines */
112 #define fd_mountstd fs_mountdrive
113 #define fd_format(d,t) fs_format(d)
114 #define fd_hardformat(d,t) fs_format(d)
115 #define fd_getdrive fs_getdrive
116 #define fd_chdrive fs_chdrive
117 #define fd_getcwd fs_getcwd
118 #define fd_chdir fs_chdir
119 #define fd_mkdir fs_mkdir
120 #define fd_rmdir fs_rmdir
121 #define fd_getfreespace fs_getfreespace
122 #define fd_findfirst fs_findfirst
123 #define fd_findnext fs_findnext
124 #define fd_filelength fs_filelength
125 #define fd_delete fs_delete
126 #define fd_rename fs_rename
127 #define fd_open fs_open
128 #define fd_close fs_close
129 #define fd_read fs_read
130 #define fd_write fs_write
131 #define FD_FIND FS_FIND
132 #define FD_FILE FS_FILE
133 #define FD_SPACE FS_SPACE
134 #define FD_ATTR_DIR FS_ATTR_DIR
135 
136 /*
137  ******************************************************************************
138  *
139  * Functions
140  *
141  ******************************************************************************
142  */
143 /*
144  ******************************************************************************
145  *
146  * "C" Routines
147  *
148  ******************************************************************************
149  */
150 #ifdef __cplusplus
151 extern "C" {
152 #endif
153 
154 /*
155  ******************************************************************************
156 
157  Start EFFS
158 
159  Parameters:
160  deviceNamePtr - Device name
161 
162  Return:
163  None
164 
165  Notes:
166  Starts EFFS-STD file system, formats if necessary.
167 
168  ******************************************************************************
169  */
170 void EffsStart( char* deviceNamePtr );
171 
172 /*
173  ******************************************************************************
174 
175  Lists files and directories starting with the current directory
176 
177  Parameters:
178  deviceNamePtr - Device name
179 
180  Return:
181  None
182 
183  Notes:
184  None
185 
186  ******************************************************************************
187  */
188 void EffsListCurrentDirectory( char* deviceNamePtr );
189 
190 /*
191  ******************************************************************************
192 
193  Display space used, total and bad
194 
195  Parameters:
196  deviceNamePtr - Device name
197 
198  Return:
199  None
200 
201  Notes:
202  None
203 
204  ******************************************************************************
205  */
206 void EffsDisplayStatistics( char* deviceNamePtr );
207 
208 
209 
210 /* Format the EFFS Flash file system */
211 BYTE EffsFormat();
212 
213 
214 
215 #ifdef __cplusplus
216 };
217 #endif
218 
219 #endif /* #ifndef _EFFSSTD_H_ */
220 
Embedded Flash File System API - STD.