Files
threadx/common_modules/module_lib/src/txm_timer_info_get.c
2020-08-07 16:56:45 -07:00

89 lines
5.6 KiB
C

/**************************************************************************/
/* */
/* 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. */
/* */
/**************************************************************************/
/**************************************************************************/
/**************************************************************************/
/** */
/** ThreadX Component */
/** */
/** Module */
/** */
/**************************************************************************/
/**************************************************************************/
#define TXM_MODULE
#include "txm_module.h"
/**************************************************************************/
/* */
/* FUNCTION RELEASE */
/* */
/* _txe_timer_info_get PORTABLE C */
/* 6.0.1 */
/* AUTHOR */
/* */
/* Scott Larson, Microsoft Corporation */
/* */
/* DESCRIPTION */
/* */
/* This function checks for errors in the timer information get */
/* service. */
/* */
/* INPUT */
/* */
/* timer_ptr Pointer to timer control block */
/* name Destination for the timer name */
/* active Destination for active flag */
/* remaining_ticks Destination for remaining ticks */
/* before expiration */
/* reschedule_ticks Destination for reschedule ticks */
/* next_timer Destination for next timer on the */
/* created list */
/* */
/* OUTPUT */
/* */
/* TX_TIMER_ERROR Invalid timer pointer */
/* status Completion status */
/* */
/* CALLS */
/* */
/* _txm_module_kernel_call_dispatcher */
/* */
/* CALLED BY */
/* */
/* Module application code */
/* */
/* RELEASE HISTORY */
/* */
/* DATE NAME DESCRIPTION */
/* */
/* 06-30-2020 Scott Larson Initial Version 6.0.1 */
/* */
/**************************************************************************/
UINT _txe_timer_info_get(TX_TIMER *timer_ptr, CHAR **name, UINT *active, ULONG *remaining_ticks, ULONG *reschedule_ticks, TX_TIMER **next_timer)
{
UINT return_value;
ALIGN_TYPE extra_parameters[4];
extra_parameters[0] = (ALIGN_TYPE) active;
extra_parameters[1] = (ALIGN_TYPE) remaining_ticks;
extra_parameters[2] = (ALIGN_TYPE) reschedule_ticks;
extra_parameters[3] = (ALIGN_TYPE) next_timer;
/* Call module manager dispatcher. */
return_value = (UINT) (_txm_module_kernel_call_dispatcher)(TXM_TIMER_INFO_GET_CALL, (ALIGN_TYPE) timer_ptr, (ALIGN_TYPE) name, (ALIGN_TYPE) extra_parameters);
/* Return value to the caller. */
return(return_value);
}