blob: a64937f153ae0c48383bdc2fd2438f49b61e7564 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
|
/*
* This file is subject to the terms of the GFX License. If a copy of
* the license was not distributed with this file, you can obtain one at:
*
* http://ugfx.org/license.html
*/
/**
* @file include/gfile/options.h
* @brief GFILE - File IO options header file.
*
* @addtogroup GFILE
* @{
*/
#ifndef _GFILE_OPTIONS_H
#define _GFILE_OPTIONS_H
/**
* @name GFILE Functionality to be included
* @{
*/
/**
* @brief Include printg, fprintg etc functions
* @details Defaults to FALSE
*/
#ifndef GFILE_NEED_PRINTG
#define GFILE_NEED_PRINTG FALSE
#endif
/**
* @brief Include scang, fscang etc functions
* @details Defaults to FALSE
*/
#ifndef GFILE_NEED_SCANG
#define GFILE_NEED_SCANG FALSE
#endif
/**
* @brief Include the string sprintg/sscang functions
* @details Defaults to FALSE
* @pre To get sprintg functions you also need to define @p GFILE_NEED_PRINTG
* @pre To get sscang functions you also need to define @p GFILE_NEED_SCANG
*/
#ifndef GFILE_NEED_STRINGS
#define GFILE_NEED_STRINGS FALSE
#endif
/**
* @brief Include scang, fscang, sscang etc functions
* @details Defaults to FALSE
*/
#ifndef GFILE_NEED_SCANG
#define GFILE_NEED_SCANG FALSE
#endif
/**
* @brief Map many stdio functions to their GFILE equivalent
* @details Defaults to FALSE
* @note This replaces the functions in stdio.h with equivalents
* - Do not include stdio.h as it has different conflicting definitions.
*/
#ifndef GFILE_NEED_STDIO
#define GFILE_NEED_STDIO FALSE
#endif
/**
* @brief Include the ROM file system
* @details Defaults to FALSE
* @note If GFILE_ALLOW_DEVICESPECIFIC is on then you can ensure that you are
* opening a file on the ROM file system by prefixing
* its name with "S|" (the letter 'S', followed by a vertical bar).
* @note This requires a file called romfs_files.h to be included in the
* users project. This file includes all the files converted to .h files
* using the file2c utility using the "-r" flag.
*/
#ifndef GFILE_NEED_ROMFS
#define GFILE_NEED_ROMFS FALSE
#endif
/**
* @brief Include the RAM file system
* @details Defaults to FALSE
* @note If GFILE_ALLOW_DEVICESPECIFIC is on then you can ensure that you are
* opening a file on the RAM file system by prefixing
* its name with "R|" (the letter 'R', followed by a vertical bar).
* @note You must also define GFILE_RAMFS_SIZE with the size of the file system
* to be allocated in RAM.
*/
#ifndef GFILE_NEED_RAMFS
#define GFILE_NEED_RAMFS FALSE
#endif
/**
* @brief Include the FAT file system driver
* @details Defaults to FALSE
* @note If GFILE_ALLOW_DEVICESPECIFIC is on then you can ensure that you are
* opening a file on the FAT file system by prefixing
* its name with "F|" (the letter 'F', followed by a vertical bar).
* @note You must separately include the FATFS library and code.
*/
#ifndef GFILE_NEED_FATFS
#define GFILE_NEED_FATFS FALSE
#endif
/**
* @brief Include the operating system's native file system
* @details Defaults to FALSE
* @note If GFILE_ALLOW_DEVICESPECIFIC is on then you can ensure that you are
* opening a file on the native file system by prefixing
* its name with "N|" (the letter 'N', followed by a vertical bar).
* @note If defined then the gfileStdOut and gfileStdErr handles
* use the operating system equivalent stdio and stderr.
* If it is not defined the gfileStdOut and gfileStdErr io is discarded.
*/
#ifndef GFILE_NEED_NATIVEFS
#define GFILE_NEED_NATIVEFS FALSE
#endif
/**
* @}
*
* @name GFILE Optional Parameters
* @{
*/
/**
* @brief Add floating point support to printg/scang etc.
*/
#ifndef GFILE_ALLOW_FLOATS
#define GFILE_ALLOW_FLOATS
#endif
/**
* @brief Can the device be specified as part of the file name.
* @note If this is on then a device letter and a vertical bar can be
* prefixed on a file name to specify that it must be on a
* specific device.
*/
#ifndef GFILE_ALLOW_DEVICESPECIFIC
#define GFILE_ALLOW_DEVICESPECIFIC FALSE
#endif
/**
* @brief The maximum number of open files
* @note This count excludes gfileStdIn, gfileStdOut and gfileStdErr
* (if open by default).
*/
#ifndef GFILE_MAX_GFILES
#define GFILE_MAX_GFILES 3
#endif
/**
* @brief The size in bytes of the RAM file system
*/
#ifndef GFILE_RAMFS_SIZE
#define GFILE_RAMFS_SIZE 0
#endif
/** @} */
#endif /* _GFILE_OPTIONS_H */
/** @} */
|