FreeHIL
Loading...
Searching...
No Matches
FH_DI_GetStatus_S.c
Go to the documentation of this file.
1/**
2 * @file
3 * @brief
4 * <b>File Map:</b>\n
5 * <b>FH_Root</b>, Section <b>FH_Perif</b>, <b>FH_DI</b> (Digital Input), <b>Cmd</b> (Command), <b>GetStatus</b>, <b>GetStatus_S</b> (GetStatus Set Address)\n
6 * Functions in this file, set the address of the defined <b>FH_Functions</b>, Section <b>FH_DI</b> (Digital Input), <b>FH_DI_GetStatus_DI01-...</b> to an array of function pointers
7 *
8 * @attention <b>FH</b> user could left this file intact
9 *
10 *******************************************************************************
11 * SPDX-License-Identifier: Apache-2.0
12 *
13 * Copyright 2026 Vahid Hasirchi
14 *
15 * Licensed under the Apache License, Version 2.0 (the "License");
16 * you may not use this file except in compliance with the License.
17 * You may obtain a copy of the License at
18 *
19 * http://www.apache.org/licenses/LICENSE-2.0
20 *
21 * Unless required by applicable law or agreed to in writing, software
22 * distributed under the License is distributed on an "AS IS" BASIS,
23 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
24 * See the License for the specific language governing permissions and
25 * limitations under the License.
26 ********************************************************************************
27
28 *
29 * <b>For more information refer to FreeHIL.com</b>
30 *
31*/
32
33/* Includes ------------------------------------------------------------------*/
34#include "../../../../../../../FH_Embedded/FH_Root/FH_Perif/FH_DI/Cmd/GetStatus/GetStatus_S/FH_DI_GetStatus_S.h"
35
36#include "../../../../../../../FH_Embedded/FH_Root/FH_General/FH_GeneralFunctions/FH_GeneralFunctions.h"
37
38#ifdef FH_DI01
40#endif
41#ifdef FH_DI02
43#endif
44#ifdef FH_DI03
46#endif
47#ifdef FH_DI04
49#endif
50#ifdef FH_DI05
52#endif
53#ifdef FH_DI06
55#endif
56#ifdef FH_DI07
58#endif
59#ifdef FH_DI08
61#endif
62#ifdef FH_DI09
64#endif
65#ifdef FH_DI10
67#endif
68#ifdef FH_DI11
70#endif
71#ifdef FH_DI12
73#endif
74#ifdef FH_DI13
76#endif
77#ifdef FH_DI14
79#endif
80#ifdef FH_DI15
82#endif
83#ifdef FH_DI16
85#endif
86#ifdef FH_DI17
88#endif
89#ifdef FH_DI18
91#endif
92#ifdef FH_DI19
94#endif
95#ifdef FH_DI20
97#endif
98#ifdef FH_DI21
100#endif
101#ifdef FH_DI22
103#endif
104#ifdef FH_DI23
106#endif
107#ifdef FH_DI24
109#endif
110#ifdef FH_DI25
112#endif
113#ifdef FH_DI26
115#endif
116#ifdef FH_DI27
118#endif
119#ifdef FH_DI28
121#endif
122#ifdef FH_DI29
124#endif
125#ifdef FH_DI30
127#endif
128#ifdef FH_DI31
130#endif
131#ifdef FH_DI32
133#endif
134#ifdef FH_DI33
136#endif
137#ifdef FH_DI34
139#endif
140#ifdef FH_DI35
142#endif
143#ifdef FH_DI36
145#endif
146#ifdef FH_DI37
148#endif
149#ifdef FH_DI38
151#endif
152#ifdef FH_DI39
154#endif
155#ifdef FH_DI40
157#endif
158#ifdef FH_DI41
160#endif
161#ifdef FH_DI42
163#endif
164#ifdef FH_DI43
166#endif
167#ifdef FH_DI44
169#endif
170#ifdef FH_DI45
172#endif
173#ifdef FH_DI46
175#endif
176#ifdef FH_DI47
178#endif
179#ifdef FH_DI48
181#endif
182#ifdef FH_DI49
184#endif
185#ifdef FH_DI50
187#endif
188#ifdef FH_DI51
190#endif
191#ifdef FH_DI52
193#endif
194#ifdef FH_DI53
196#endif
197#ifdef FH_DI54
199#endif
200#ifdef FH_DI55
202#endif
203#ifdef FH_DI56
205#endif
206#ifdef FH_DI57
208#endif
209#ifdef FH_DI58
211#endif
212#ifdef FH_DI59
214#endif
215#ifdef FH_DI60
217#endif
218#ifdef FH_DI61
220#endif
221#ifdef FH_DI62
223#endif
224#ifdef FH_DI63
226#endif
227#ifdef FH_DI64
229#endif
230
231#if FH_DI_MaxPeripheralNumber > 0 // It is configurable in FH_DevicePeripherals.h
232
233/**
234 * @brief This function sets the address of the defined <b>FH_Functions</b>, Section <b>FH_DI</b> (Digital Input), <b>FH_DI_GetStatus_DI01-...</b> to an array of function pointers
235 *
236 * @param FH_DI_GetStatus_FuncPtr
237 * An array of function pointers with FH_DI_GetStatus_FuncPtrModel model
238 *
239 * @return None
240 *
241
242*/
243void FH_DI_GetStatus_S(FH_DI_GetStatus_FuncPtrModel *FH_DI_GetStatus_FuncPtr)
244{
245 for (uint8_t i = 0; i < FH_DI_MaxPeripheralNumber; i++) // if FH_DI_MaxPeripheralNumber > 0
246 {
247 FH_DI_GetStatus_FuncPtr[i] = NULL_PTR; // Initialization of the function pointers with null pointer to prevent pointing to undefined addresses
248 }
249
250 #ifdef FH_DI01
251 FH_DI_GetStatus_FuncPtr[0] = FH_DI_GetStatus_DI01; // Set the function pointer address with the related function address
252 #endif
253 #ifdef FH_DI02
254 FH_DI_GetStatus_FuncPtr[1] = FH_DI_GetStatus_DI02; // Set the function pointer address with the related function address
255 #endif
256 #ifdef FH_DI03
257 FH_DI_GetStatus_FuncPtr[2] = FH_DI_GetStatus_DI03; // Set the function pointer address with the related function address
258 #endif
259 #ifdef FH_DI04
260 FH_DI_GetStatus_FuncPtr[3] = FH_DI_GetStatus_DI04; // Set the function pointer address with the related function address
261 #endif
262 #ifdef FH_DI05
263 FH_DI_GetStatus_FuncPtr[4] = FH_DI_GetStatus_DI05; // Set the function pointer address with the related function address
264 #endif
265 #ifdef FH_DI06
266 FH_DI_GetStatus_FuncPtr[5] = FH_DI_GetStatus_DI06; // Set the function pointer address with the related function address
267 #endif
268 #ifdef FH_DI07
269 FH_DI_GetStatus_FuncPtr[6] = FH_DI_GetStatus_DI07; // Set the function pointer address with the related function address
270 #endif
271 #ifdef FH_DI08
272 FH_DI_GetStatus_FuncPtr[7] = FH_DI_GetStatus_DI08; // Set the function pointer address with the related function address
273 #endif
274 #ifdef FH_DI09
275 FH_DI_GetStatus_FuncPtr[8] = FH_DI_GetStatus_DI09; // Set the function pointer address with the related function address
276 #endif
277 #ifdef FH_DI10
278 FH_DI_GetStatus_FuncPtr[9] = FH_DI_GetStatus_DI10; // Set the function pointer address with the related function address
279 #endif
280 #ifdef FH_DI11
281 FH_DI_GetStatus_FuncPtr[10] = FH_DI_GetStatus_DI11; // Set the function pointer address with the related function address
282 #endif
283 #ifdef FH_DI12
284 FH_DI_GetStatus_FuncPtr[11] = FH_DI_GetStatus_DI12; // Set the function pointer address with the related function address
285 #endif
286 #ifdef FH_DI13
287 FH_DI_GetStatus_FuncPtr[12] = FH_DI_GetStatus_DI13; // Set the function pointer address with the related function address
288 #endif
289 #ifdef FH_DI14
290 FH_DI_GetStatus_FuncPtr[13] = FH_DI_GetStatus_DI14; // Set the function pointer address with the related function address
291 #endif
292 #ifdef FH_DI15
293 FH_DI_GetStatus_FuncPtr[14] = FH_DI_GetStatus_DI15; // Set the function pointer address with the related function address
294 #endif
295 #ifdef FH_DI16
296 FH_DI_GetStatus_FuncPtr[15] = FH_DI_GetStatus_DI16; // Set the function pointer address with the related function address
297 #endif
298 #ifdef FH_DI17
299 FH_DI_GetStatus_FuncPtr[16] = FH_DI_GetStatus_DI17; // Set the function pointer address with the related function address
300 #endif
301 #ifdef FH_DI18
302 FH_DI_GetStatus_FuncPtr[17] = FH_DI_GetStatus_DI18; // Set the function pointer address with the related function address
303 #endif
304 #ifdef FH_DI19
305 FH_DI_GetStatus_FuncPtr[18] = FH_DI_GetStatus_DI19; // Set the function pointer address with the related function address
306 #endif
307 #ifdef FH_DI20
308 FH_DI_GetStatus_FuncPtr[19] = FH_DI_GetStatus_DI20; // Set the function pointer address with the related function address
309 #endif
310 #ifdef FH_DI21
311 FH_DI_GetStatus_FuncPtr[20] = FH_DI_GetStatus_DI21; // Set the function pointer address with the related function address
312 #endif
313 #ifdef FH_DI22
314 FH_DI_GetStatus_FuncPtr[21] = FH_DI_GetStatus_DI22; // Set the function pointer address with the related function address
315 #endif
316 #ifdef FH_DI23
317 FH_DI_GetStatus_FuncPtr[22] = FH_DI_GetStatus_DI23; // Set the function pointer address with the related function address
318 #endif
319 #ifdef FH_DI24
320 FH_DI_GetStatus_FuncPtr[23] = FH_DI_GetStatus_DI24; // Set the function pointer address with the related function address
321 #endif
322 #ifdef FH_DI25
323 FH_DI_GetStatus_FuncPtr[24] = FH_DI_GetStatus_DI25; // Set the function pointer address with the related function address
324 #endif
325 #ifdef FH_DI26
326 FH_DI_GetStatus_FuncPtr[25] = FH_DI_GetStatus_DI26; // Set the function pointer address with the related function address
327 #endif
328 #ifdef FH_DI27
329 FH_DI_GetStatus_FuncPtr[26] = FH_DI_GetStatus_DI27; // Set the function pointer address with the related function address
330 #endif
331 #ifdef FH_DI28
332 FH_DI_GetStatus_FuncPtr[27] = FH_DI_GetStatus_DI28; // Set the function pointer address with the related function address
333 #endif
334 #ifdef FH_DI29
335 FH_DI_GetStatus_FuncPtr[28] = FH_DI_GetStatus_DI29; // Set the function pointer address with the related function address
336 #endif
337 #ifdef FH_DI30
338 FH_DI_GetStatus_FuncPtr[29] = FH_DI_GetStatus_DI30; // Set the function pointer address with the related function address
339 #endif
340 #ifdef FH_DI31
341 FH_DI_GetStatus_FuncPtr[30] = FH_DI_GetStatus_DI31; // Set the function pointer address with the related function address
342 #endif
343 #ifdef FH_DI32
344 FH_DI_GetStatus_FuncPtr[31] = FH_DI_GetStatus_DI32; // Set the function pointer address with the related function address
345 #endif
346 #ifdef FH_DI33
347 FH_DI_GetStatus_FuncPtr[32] = FH_DI_GetStatus_DI33; // Set the function pointer address with the related function address
348 #endif
349 #ifdef FH_DI34
350 FH_DI_GetStatus_FuncPtr[33] = FH_DI_GetStatus_DI34; // Set the function pointer address with the related function address
351 #endif
352 #ifdef FH_DI35
353 FH_DI_GetStatus_FuncPtr[34] = FH_DI_GetStatus_DI35; // Set the function pointer address with the related function address
354 #endif
355 #ifdef FH_DI36
356 FH_DI_GetStatus_FuncPtr[35] = FH_DI_GetStatus_DI36; // Set the function pointer address with the related function address
357 #endif
358 #ifdef FH_DI37
359 FH_DI_GetStatus_FuncPtr[36] = FH_DI_GetStatus_DI37; // Set the function pointer address with the related function address
360 #endif
361 #ifdef FH_DI38
362 FH_DI_GetStatus_FuncPtr[37] = FH_DI_GetStatus_DI38; // Set the function pointer address with the related function address
363 #endif
364 #ifdef FH_DI39
365 FH_DI_GetStatus_FuncPtr[38] = FH_DI_GetStatus_DI39; // Set the function pointer address with the related function address
366 #endif
367 #ifdef FH_DI40
368 FH_DI_GetStatus_FuncPtr[39] = FH_DI_GetStatus_DI40; // Set the function pointer address with the related function address
369 #endif
370 #ifdef FH_DI41
371 FH_DI_GetStatus_FuncPtr[40] = FH_DI_GetStatus_DI41; // Set the function pointer address with the related function address
372 #endif
373 #ifdef FH_DI42
374 FH_DI_GetStatus_FuncPtr[41] = FH_DI_GetStatus_DI42; // Set the function pointer address with the related function address
375 #endif
376 #ifdef FH_DI43
377 FH_DI_GetStatus_FuncPtr[42] = FH_DI_GetStatus_DI43; // Set the function pointer address with the related function address
378 #endif
379 #ifdef FH_DI44
380 FH_DI_GetStatus_FuncPtr[43] = FH_DI_GetStatus_DI44; // Set the function pointer address with the related function address
381 #endif
382 #ifdef FH_DI45
383 FH_DI_GetStatus_FuncPtr[44] = FH_DI_GetStatus_DI45; // Set the function pointer address with the related function address
384 #endif
385 #ifdef FH_DI46
386 FH_DI_GetStatus_FuncPtr[45] = FH_DI_GetStatus_DI46; // Set the function pointer address with the related function address
387 #endif
388 #ifdef FH_DI47
389 FH_DI_GetStatus_FuncPtr[46] = FH_DI_GetStatus_DI47; // Set the function pointer address with the related function address
390 #endif
391 #ifdef FH_DI48
392 FH_DI_GetStatus_FuncPtr[47] = FH_DI_GetStatus_DI48; // Set the function pointer address with the related function address
393 #endif
394 #ifdef FH_DI49
395 FH_DI_GetStatus_FuncPtr[48] = FH_DI_GetStatus_DI49; // Set the function pointer address with the related function address
396 #endif
397 #ifdef FH_DI50
398 FH_DI_GetStatus_FuncPtr[49] = FH_DI_GetStatus_DI50; // Set the function pointer address with the related function address
399 #endif
400 #ifdef FH_DI51
401 FH_DI_GetStatus_FuncPtr[50] = FH_DI_GetStatus_DI51; // Set the function pointer address with the related function address
402 #endif
403 #ifdef FH_DI52
404 FH_DI_GetStatus_FuncPtr[51] = FH_DI_GetStatus_DI52; // Set the function pointer address with the related function address
405 #endif
406 #ifdef FH_DI53
407 FH_DI_GetStatus_FuncPtr[52] = FH_DI_GetStatus_DI53; // Set the function pointer address with the related function address
408 #endif
409 #ifdef FH_DI54
410 FH_DI_GetStatus_FuncPtr[53] = FH_DI_GetStatus_DI54; // Set the function pointer address with the related function address
411 #endif
412 #ifdef FH_DI55
413 FH_DI_GetStatus_FuncPtr[54] = FH_DI_GetStatus_DI55; // Set the function pointer address with the related function address
414 #endif
415 #ifdef FH_DI56
416 FH_DI_GetStatus_FuncPtr[55] = FH_DI_GetStatus_DI56; // Set the function pointer address with the related function address
417 #endif
418 #ifdef FH_DI57
419 FH_DI_GetStatus_FuncPtr[56] = FH_DI_GetStatus_DI57; // Set the function pointer address with the related function address
420 #endif
421 #ifdef FH_DI58
422 FH_DI_GetStatus_FuncPtr[57] = FH_DI_GetStatus_DI58; // Set the function pointer address with the related function address
423 #endif
424 #ifdef FH_DI59
425 FH_DI_GetStatus_FuncPtr[58] = FH_DI_GetStatus_DI59; // Set the function pointer address with the related function address
426 #endif
427 #ifdef FH_DI60
428 FH_DI_GetStatus_FuncPtr[59] = FH_DI_GetStatus_DI60; // Set the function pointer address with the related function address
429 #endif
430 #ifdef FH_DI61
431 FH_DI_GetStatus_FuncPtr[60] = FH_DI_GetStatus_DI61; // Set the function pointer address with the related function address
432 #endif
433 #ifdef FH_DI62
434 FH_DI_GetStatus_FuncPtr[61] = FH_DI_GetStatus_DI62; // Set the function pointer address with the related function address
435 #endif
436 #ifdef FH_DI63
437 FH_DI_GetStatus_FuncPtr[62] = FH_DI_GetStatus_DI63; // Set the function pointer address with the related function address
438 #endif
439 #ifdef FH_DI64
440 FH_DI_GetStatus_FuncPtr[63] = FH_DI_GetStatus_DI64; // Set the function pointer address with the related function address
441 #endif
442}
443
444#endif