1
10
13
14
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
87
88
89
90
91
92
93
94
95
96
97
98
103
104
105
107
108
109
110
111
112
113
117
121
125
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
167
171
175
179
183
187
188
189
193
197
201
205
206
207
...
...
...
#define FX_SOURCE_CODE
#define FX_SYSTEM_INIT
#include "fx_api.h"
#include "fx_system.h"
...
...
VOID _fx_system_initialize(VOID)
{
FX_TRACE_IN_LINE_INSERT(FX_TRACE_SYSTEM_INITIALIZE, 0, 0, 0, 0, FX_TRACE_INTERNAL_EVENTS, 0, 0)
/* ... */
_fx_system_media_opened_ptr = FX_NULL;
_fx_system_media_opened_count = 0;
_fx_system_date = FX_INITIAL_DATE;
_fx_system_time = FX_INITIAL_TIME;
_fx_system_media_max_sector_cache = FX_MAX_SECTOR_CACHE;
_fx_system_media_max_fat_cache = FX_MAX_FAT_CACHE;
/* ... */
#ifndef FX_NO_TIMER
tx_timer_create(&_fx_system_timer, "FileX System Timer", _fx_system_timer_entry, FX_TIMER_ID,
FX_UPDATE_RATE_IN_TICKS, FX_UPDATE_RATE_IN_TICKS, TX_AUTO_ACTIVATE);/* ... */
#endif
#ifndef FX_DISABLE_BUILD_OPTIONS
if (FX_MAX_LONG_NAME_LEN > 0xFF)
{
_fx_system_build_options_1 = _fx_system_build_options_1 | (((ULONG)0xFF) << 24);
}if (FX_MAX_LONG_NAME_LEN > 0xFF) { ... }
else
{
_fx_system_build_options_1 = _fx_system_build_options_1 | (((ULONG)(FX_MAX_LONG_NAME_LEN & 0xFF)) << 24);
}else { ... }
if (FX_MAX_LAST_NAME_LEN > 0xFF)
{
_fx_system_build_options_1 = _fx_system_build_options_1 | (((ULONG)0xFF) << 16);
}if (FX_MAX_LAST_NAME_LEN > 0xFF) { ... }
else
{
_fx_system_build_options_1 = _fx_system_build_options_1 | (((ULONG)(FX_MAX_LAST_NAME_LEN & 0xFF)) << 24);
}else { ... }
#ifdef FX_NO_TIMER
_fx_system_build_options_1 = _fx_system_build_options_1 | (((ULONG)1) << 10);
#endif
#ifdef FX_SINGLE_THREAD
_fx_system_build_options_1 = _fx_system_build_options_1 | (((ULONG)1) << 9);
#endif
#ifdef FX_DONT_UPDATE_OPEN_FILES
_fx_system_build_options_1 = _fx_system_build_options_1 | (((ULONG)1) << 8);
#endif
#ifdef FX_MEDIA_DISABLE_SEARCH_CACHE
_fx_system_build_options_1 = _fx_system_build_options_1 | (((ULONG)1) << 7);
#endif
#ifdef FX_MEDIA_STATISTICS_DISABLE
_fx_system_build_options_1 = _fx_system_build_options_1 | (((ULONG)1) << 6);
#endif
#ifdef FX_SINGLE_OPEN_LEGACY
_fx_system_build_options_1 = _fx_system_build_options_1 | (((ULONG)1) << 4);
#endif
#ifdef FX_RENAME_PATH_INHERIT
_fx_system_build_options_1 = _fx_system_build_options_1 | (((ULONG)1) << 3);
#endif
#ifdef FX_NO_LOCAL_PATH
_fx_system_build_options_1 = _fx_system_build_options_1 | (((ULONG)1) << 2);
#endif
#ifdef FX_FAULT_TOLERANT_DATA
_fx_system_build_options_1 = _fx_system_build_options_1 | (((ULONG)1) << 1);
#endif
#ifdef FX_FAULT_TOLERANT
_fx_system_build_options_1 = _fx_system_build_options_1 | ((ULONG)1);
#endif
if (FX_MAX_SECTOR_CACHE > ((ULONG)0xFFFF))
{
_fx_system_build_options_2 = _fx_system_build_options_2 | (((ULONG)0xFFFF) << 16);
}if (FX_MAX_SECTOR_CACHE > ((ULONG)0xFFFF)) { ... }
else
{
_fx_system_build_options_2 = _fx_system_build_options_2 | (((ULONG)FX_MAX_SECTOR_CACHE) << 16);
}else { ... }
if (FX_FAT_MAP_SIZE > 0xFF)
{
_fx_system_build_options_2 = _fx_system_build_options_2 | (((ULONG)0xFF) << 8);
}if (FX_FAT_MAP_SIZE > 0xFF) { ... }
else
{
_fx_system_build_options_2 = _fx_system_build_options_2 | (((ULONG)FX_FAT_MAP_SIZE) << 8);
}else { ... }
if (FX_MAX_FAT_CACHE > 0xFF)
{
_fx_system_build_options_2 = _fx_system_build_options_2 | ((ULONG)0xFF);
}if (FX_MAX_FAT_CACHE > 0xFF) { ... }
else
{
_fx_system_build_options_2 = _fx_system_build_options_2 | ((ULONG)FX_MAX_FAT_CACHE);
}else { ... }
if (FX_UPDATE_RATE_IN_SECONDS > 0xFF)
{
_fx_system_build_options_3 = _fx_system_build_options_3 | (((ULONG)0xFF) << 16);
}if (FX_UPDATE_RATE_IN_SECONDS > 0xFF) { ... }
else
{
_fx_system_build_options_3 = _fx_system_build_options_3 | (((ULONG)FX_UPDATE_RATE_IN_SECONDS) << 16);
}else { ... }
if (FX_UPDATE_RATE_IN_TICKS > ((ULONG)0xFFFF))
{
_fx_system_build_options_3 = _fx_system_build_options_3 | ((ULONG)0xFFFF);
}if (FX_UPDATE_RATE_IN_TICKS > ((ULONG)0xFFFF)) { ... }
else
{
_fx_system_build_options_3 = _fx_system_build_options_3 | ((ULONG)FX_UPDATE_RATE_IN_TICKS);
}else { ... }
/* ... */#endif
}{ ... }