Select one of the symbols to view example projects that use it.
 
Outline
...
...
...
...
#define FX_SOURCE_CODE
#define FX_SYSTEM_INIT
#include "fx_api.h"
#include "fx_system.h"
...
...
_fx_system_initialize()
Files
loading...
CodeScopeSTM32 Libraries and Samplesfilexcommon/src/fx_system_initialize.c
 
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
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
/**************************************************************************/ /* */ /* Copyright (c) Microsoft Corporation. All rights reserved. */ /* */ /* This software is licensed under the Microsoft Software License */ /* Terms for Microsoft Azure RTOS. Full text of the license can be */ /* found in the LICENSE file at https://aka.ms/AzureRTOS_EULA */ /* and in the root directory of this software. */ /* */... /**************************************************************************/ ... /**************************************************************************/ /**************************************************************************/ /** */ /** FileX Component */ /** */ /** System */ /** */... /**************************************************************************/ /**************************************************************************/ #define FX_SOURCE_CODE /* Locate FileX control component data in this file. */ #define FX_SYSTEM_INIT /* Include necessary system files. */ #include "fx_api.h" #include "fx_system.h" ... /**************************************************************************/ /* */ /* FUNCTION RELEASE */ /* */ /* _fx_system_initialize PORTABLE C */ /* 6.1 */ /* AUTHOR */ /* */ /* William E. Lamie, Microsoft Corporation */ /* */ /* DESCRIPTION */ /* */ /* This function initializes the various control data structures for */ /* the FileX System component. */ /* */ /* INPUT */ /* */ /* None */ /* */ /* OUTPUT */ /* */ /* None */ /* */ /* CALLS */ /* */ /* tx_timer_create Create system timer */ /* */ /* CALLED BY */ /* */ /* Application Initialization */ /* */ /* RELEASE HISTORY */ /* */ /* DATE NAME DESCRIPTION */ /* */ /* 05-19-2020 William E. Lamie Initial Version 6.0 */ /* 09-30-2020 William E. Lamie Modified comment(s), and */ /* added conditional to */ /* disable build options, */ /* resulting in version 6.1 */ /* */... /**************************************************************************/ VOID _fx_system_initialize(VOID) { /* If trace is enabled, insert this event into the trace buffer. */ FX_TRACE_IN_LINE_INSERT(FX_TRACE_SYSTEM_INITIALIZE, 0, 0, 0, 0, FX_TRACE_INTERNAL_EVENTS, 0, 0) /* Initialize the head pointer of the opened media list and the number of opened media. *//* ... */ _fx_system_media_opened_ptr = FX_NULL; _fx_system_media_opened_count = 0; /* Initialize the time and date fields with their default values. */ _fx_system_date = FX_INITIAL_DATE; _fx_system_time = FX_INITIAL_TIME; /* Initialize the sector and FAT cache sizes. */ _fx_system_media_max_sector_cache = FX_MAX_SECTOR_CACHE; _fx_system_media_max_fat_cache = FX_MAX_FAT_CACHE; /* Create the FileX system timer. This is responsible for updating the specified date and time at the rate specified by FX_UPDATE_RATE_IN_TICKS. Note that the timer is not necessary for regular FileX operation - it is only needed for accurate system date and time stamps on files. *//* ... */ #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 /* Setup the build options variables. */ /* Setup the first build options variable. */ 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 /* Setup the second build options variable. */ 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 { ... } /* Setup the third build options variable. */ 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 /* FX_DISABLE_BUILD_OPTIONS */ }{ ... }