1 /**************************************************************************/
2 /* */
3 /* Copyright (c) Microsoft Corporation. All rights reserved. */
4 /* */
5 /* This software is licensed under the Microsoft Software License */
6 /* Terms for Microsoft Azure RTOS. Full text of the license can be */
7 /* found in the LICENSE file at https://aka.ms/AzureRTOS_EULA */
8 /* and in the root directory of this software. */
9 /* */
10 /**************************************************************************/
11
12
13 /**************************************************************************/
14 /**************************************************************************/
15 /** */
16 /** ThreadX Component */
17 /** */
18 /** Module */
19 /** */
20 /**************************************************************************/
21 /**************************************************************************/
22
23 #define TXM_MODULE
24 #include "txm_module.h"
25 #ifndef TXM_TIMER_INFO_GET_CALL_NOT_USED
26 /**************************************************************************/
27 /* */
28 /* FUNCTION RELEASE */
29 /* */
30 /* _txe_timer_info_get PORTABLE C */
31 /* 6.1.10 */
32 /* AUTHOR */
33 /* */
34 /* Scott Larson, Microsoft Corporation */
35 /* */
36 /* DESCRIPTION */
37 /* */
38 /* This function checks for errors in the timer information get */
39 /* service. */
40 /* */
41 /* INPUT */
42 /* */
43 /* timer_ptr Pointer to timer control block */
44 /* name Destination for the timer name */
45 /* active Destination for active flag */
46 /* remaining_ticks Destination for remaining ticks */
47 /* before expiration */
48 /* reschedule_ticks Destination for reschedule ticks */
49 /* next_timer Destination for next timer on the */
50 /* created list */
51 /* */
52 /* OUTPUT */
53 /* */
54 /* TX_TIMER_ERROR Invalid timer pointer */
55 /* status Completion status */
56 /* */
57 /* CALLS */
58 /* */
59 /* _txm_module_kernel_call_dispatcher */
60 /* */
61 /* CALLED BY */
62 /* */
63 /* Module application code */
64 /* */
65 /* RELEASE HISTORY */
66 /* */
67 /* DATE NAME DESCRIPTION */
68 /* */
69 /* 09-30-2020 Scott Larson Initial Version 6.1 */
70 /* 01-31-2022 Scott Larson Modified comments and added */
71 /* CALL_NOT_USED option, */
72 /* resulting in version 6.1.10 */
73 /* */
74 /**************************************************************************/
_txe_timer_info_get(TX_TIMER * timer_ptr,CHAR ** name,UINT * active,ULONG * remaining_ticks,ULONG * reschedule_ticks,TX_TIMER ** next_timer)75 UINT _txe_timer_info_get(TX_TIMER *timer_ptr, CHAR **name, UINT *active, ULONG *remaining_ticks, ULONG *reschedule_ticks, TX_TIMER **next_timer)
76 {
77
78 UINT return_value;
79 ALIGN_TYPE extra_parameters[4];
80
81 extra_parameters[0] = (ALIGN_TYPE) active;
82 extra_parameters[1] = (ALIGN_TYPE) remaining_ticks;
83 extra_parameters[2] = (ALIGN_TYPE) reschedule_ticks;
84 extra_parameters[3] = (ALIGN_TYPE) next_timer;
85
86 /* Call module manager dispatcher. */
87 return_value = (UINT) (_txm_module_kernel_call_dispatcher)(TXM_TIMER_INFO_GET_CALL, (ALIGN_TYPE) timer_ptr, (ALIGN_TYPE) name, (ALIGN_TYPE) extra_parameters);
88
89 /* Return value to the caller. */
90 return(return_value);
91 }
92 #endif
93