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_CHANGE_CALL_NOT_USED
26 /**************************************************************************/
27 /* */
28 /* FUNCTION RELEASE */
29 /* */
30 /* _txe_timer_change 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 application timer change */
39 /* function call. */
40 /* */
41 /* INPUT */
42 /* */
43 /* timer_ptr Pointer to timer control block */
44 /* initial_ticks Initial expiration ticks */
45 /* reschedule_ticks Reschedule ticks */
46 /* */
47 /* OUTPUT */
48 /* */
49 /* TX_TIMER_ERROR Invalid application timer pointer */
50 /* TX_TICK_ERROR Invalid initial tick value of 0 */
51 /* TX_CALLER_ERROR Invalid caller of this function */
52 /* status Actual completion status */
53 /* */
54 /* CALLS */
55 /* */
56 /* _txm_module_kernel_call_dispatcher */
57 /* */
58 /* CALLED BY */
59 /* */
60 /* Module application code */
61 /* */
62 /* RELEASE HISTORY */
63 /* */
64 /* DATE NAME DESCRIPTION */
65 /* */
66 /* 09-30-2020 Scott Larson Initial Version 6.1 */
67 /* 01-31-2022 Scott Larson Modified comments and added */
68 /* CALL_NOT_USED option, */
69 /* resulting in version 6.1.10 */
70 /* */
71 /**************************************************************************/
_txe_timer_change(TX_TIMER * timer_ptr,ULONG initial_ticks,ULONG reschedule_ticks)72 UINT _txe_timer_change(TX_TIMER *timer_ptr, ULONG initial_ticks, ULONG reschedule_ticks)
73 {
74
75 UINT return_value;
76
77 /* Call module manager dispatcher. */
78 return_value = (UINT) (_txm_module_kernel_call_dispatcher)(TXM_TIMER_CHANGE_CALL, (ALIGN_TYPE) timer_ptr, (ALIGN_TYPE) initial_ticks, (ALIGN_TYPE) reschedule_ticks);
79
80 /* Return value to the caller. */
81 return(return_value);
82 }
83 #endif
84