Low-Level Timer Driver (llTimer)
D-3
Hardware Abstraction Layer (HAL)
D.2 Low-Level Timer Driver (llTimer)
D.2.1 Synopsis
The stack code requires a very basic simple time function. It consists of two
parts: a function API, which can be called from the stack to get the current time,
and a “scheduler” which sends timer event notifications every 500ms.
D.2.2 Function Overview
Application Functions:
_llTimerOpen()
Initialize Timer Environment
_llTimerClose()
Shutdown Timer Environment
_llTimerServiceCheck()
Check for timer activity
Kernel Layer Functions:
llTimerGetTime()
Get the Current Time
llTimerGetStartTime()
Get the Initial Startup Time
D.2.3 Low-Level Timer API Functions
The following functions are required.
Initialize Timer Environment
_llTimerOpen
Syntax
void _llTimerOpen( UINT32 ctime );
Return Value
nothing
Description
This function is called to initialize the timer environment, and to set the initial
time. The value of ctime is the number of seconds elapsed from a known refer-
ence. An initial value of zero is also acceptable. The stack software is only con-
cerned with relative time. Some modest case should be taken when setting this
value since the stack does not cope with the timer value wrapping. This occurs
every 136 years, or in 2116 if time is based off of Jan 1, 1980.
Shutdown Timer Environment
_llTimerClose
Syntax
void _llTimerClose();
Return Value
nothing
Description
This function is called when shutting down the system to shutdown and clean-
up the timer environment.