Main Page   Modules   Alphabetical List   Data Structures   File List   Data Fields   Globals  

IXP425 Timer Control (IxTimerCtrl) API

The public API for the IXP425 Timer Control Component. More...

Defines

#define IX_TIMERCTRL_NO_FREE_TIMERS
 Timer schedule return code.

#define IX_TIMERCTRL_PARAM_ERROR
 Timer schedule return code.


Typedefs

typedef void(* IxTimerCtrlTimerCallback )(void *userParam)
 A typedef for a pointer to a timer callback function.


Enumerations

enum  IxTimerCtrlPurpose {
  IxTimerCtrlAdslPurpose,
  IxTimerCtrlMaxPurpose
}
 List used to identify the users of timers. More...


Functions

IX_STATUS ixTimerCtrlSchedule (IxTimerCtrlTimerCallback func, void *userParam, IxTimerCtrlPurpose purpose, UINT32 relativeTime, unsigned *timerId)
 Schedules a callback function to be called after a period of "time". The callback function should not block or run for more than 100ms. This function.

IX_STATUS ixTimerCtrlScheduleRepeating (IxTimerCtrlTimerCallback func, void *param, IxTimerCtrlPurpose purpose, UINT32 interval, unsigned *timerId)
 Schedules a callback function to be called after a period of "time". The callback function should not block or run for more than 100ms.

IX_STATUS ixTimerCtrlCancel (unsigned id)
 Cancels a scheduled callback.

IX_STATUS ixTimerCtrlInit (void)
 Initialise the Timer Control Component.

void ixTimerCtrlShow (void)
 Display the status of the Timer Control Component.


Detailed Description

The public API for the IXP425 Timer Control Component.


Define Documentation

#define IX_TIMERCTRL_NO_FREE_TIMERS
 

Timer schedule return code.

Indicates that the request to start a timer failed because all available timer resources are used.

Definition at line 84 of file IxTimerCtrl.h.

#define IX_TIMERCTRL_PARAM_ERROR
 

Timer schedule return code.

Indicates that the request to start a timer failed because the client has supplied invalid parameters.

Definition at line 97 of file IxTimerCtrl.h.


Typedef Documentation

typedef void(* IxTimerCtrlTimerCallback)(void *userParam)
 

A typedef for a pointer to a timer callback function.

void * - This parameter is supplied by the client when the timer is started and passed back to the client in the callback.

Note:
in general timer callback functions should not block or take longer than 100ms. This constraint is required to ensure that higher priority callbacks are not held up. All callbacks are called from the same thread. This thread is a shared resource. The parameter passed is provided when the timer is scheduled.

Definition at line 117 of file IxTimerCtrl.h.


Enumeration Type Documentation

enum IxTimerCtrlPurpose
 

List used to identify the users of timers.

Note:
The order in this list indicates priority. Components appearing higher in the list will be given priority over components lower in the list. When adding components, please insert at an appropriate position for priority ( i.e values should be less than IxTimerCtrlMaxPurpose ) .

Definition at line 129 of file IxTimerCtrl.h.


Function Documentation

ixTimerCtrlCancel unsigned  id  ) 
 

Cancels a scheduled callback.

Parameters:
id - the id of the callback to be cancelled.
Returns:
  • IX_SUCCESS - The timer was successfully stopped.
  • IX_FAIL - The id parameter did not corrrespond to any running timer..
Note:
This function is re-entrant. The function accesses a list of running timers and may suspend the calling thread if this list is being accesed by another thread.

ixTimerCtrlInit void   ) 
 

Initialise the Timer Control Component.

Returns:
  • IX_SUCCESS - The timer control component initialized successfully.
  • IX_FAIL - The timer control component initialization failed, or the component was already initialized.
Note:
This must be done before any other API function is called. This function should be called once only and is not re-entrant.

ixTimerCtrlSchedule IxTimerCtrlTimerCallback  func,
void *  userParam,
IxTimerCtrlPurpose  purpose,
UINT32  relativeTime,
unsigned *  timerId
 

Schedules a callback function to be called after a period of "time". The callback function should not block or run for more than 100ms. This function.

Parameters:
func (in)- the callback function to be called.
userParam (in) - a parameter to send to the callback function, can be NULL.
purpose (in) - the purpose of the callback, internally this component will decide the priority of callbacks with different purpose.
relativeTime (in) - time relative to now in milliseconds after which the callback will be called. The time must be greater than the duration of one OS tick.
*timerId (out) - An id for the callback scheduled. This id can be used to cancel the callback.
Returns:
  • IX_SUCCESS - The timer was started successfully.
  • IX_TIMERCTRL_NO_FREE_TIMERS - The timer was not started because the maximum number of running timers has been exceeded.
  • IX_TIMERCTRL_PARAM_ERROR - The timer was not started because the client has supplied a NULL callback func, or the requested timeout is less than one OS tick.
Note:
This function is re-entrant. The function accesses a list of running timers and may suspend the calling thread if this list is being accesed by another thread.

ixTimerCtrlScheduleRepeating IxTimerCtrlTimerCallback  func,
void *  param,
IxTimerCtrlPurpose  purpose,
UINT32  interval,
unsigned *  timerId
 

Schedules a callback function to be called after a period of "time". The callback function should not block or run for more than 100ms.

Parameters:
func (in) - the callback function to be called.
userParam (in) - a parameter to send to the callback function, can be NULL.
purpose (in) - the purpose of the callback, internally this component will decide the priority of callbacks with different purpose.
interval - the interval in milliseconds between calls to func.
timerId (out) - An id for the callback scheduled. This id can be used to cancel the callback.
Returns:
  • IX_SUCCESS - The timer was started successfully.
  • IX_TIMERCTRL_NO_FREE_TIMERS - The timer was not started because the maximum number of running timers has been exceeded.
  • IX_TIMERCTRL_PARAM_ERROR - The timer was not started because the client has supplied a NULL callback func, or the requested timeout is less than one OS tick.
Note:
This function is re-entrant. The function accesses a list of running timers and may suspend the calling thread if this list is being accesed by another thread.

ixTimerCtrlShow void   ) 
 

Display the status of the Timer Control Component.

Returns:
void
Note:
Displays a list of running timers. This function is not re-entrant. This function does not suspend the calling thread.

Automatically generated from sources. © Intel Corp. 2003