@CHIP-RTOS C Library V2.06 - RTOS API
RTX_Install_TimerP
Install a timer callback procedure
that will be periodically executed by the kernel. int RTX_Install_TimerP ( unsigned int far *timerID,
RTX_TIMER_CALLBACK proc,
unsigned long lParam,
unsigned long name,
long interval ); Parameters
timerID
- Output parameter, pointer to location
to receive new timer ID.
proc
- Far vector to timer callback procedure.
lParam
- Any 32 bit value you would like to see
again on each entry into the timer procedure.
name
- Provisional 4 character timer name (little
endian order), not of any use in current implementation.
interval
- Milliseconds interval between calls
to timer procedure.
Return Value
- 0 on success else
error code.
Comments
- The RTX_TIMER_CALLBACK prototype has the form:
void huge RTX_TIMER_CALLBACK(
unsigned int timer_id,
unsigned long lParam )
The timer callback procedure's input parameters may be ignored and
the function declared with void parameters. The timer_id
parameter is a copy of the timer ID output by this function. The
lParam
input parameter is a copy of the lParam
parameter you supplied to RTX_Install_TimerP
.
You must call either the RTX_Start_Timer,
RTX_Timer_Delay or
RTX_Timer_Delay_RTI
API function to get the kernel to start calling your new timer procedure.
Important:
Timer procedures are executed on the stack
of the kernel task at a high priority, so they should be as short as
possible. Avoid calling time consuming functions.
See Also
RTOS API
- This library function invokes a RTOS software interrupt.
Refer to this RTOS API function's
documentation
for more details.
Supported since or modified in @CHIP-RTOS version-
SC12 | SC13 | SC11 | SC1x3 |
-
V1.00 | V1.00 | V1.00 | V0.90 |
This API List
List of C Libraries
@CHIP-RTOS Main Index
End of document
|