Partager via


OALTimerInit (Compact 2013)

10/16/2014

This function initializes the system timer. It is typically called from OEMInit.

Syntax

BOOL OALTimerInit(
  UINT32 msecPerSysTick,
  UINT32 countsPerMSec,
  UINT32 margin
);

Parameters

  • msecPerSysTick
    [in] Defines the system-tick period. For variable tick periods, set msecPerSysTick to the maximum period supported by the hardware. Your implementation should check and fix the maximum period if it is larger than what the hardware supports. This function allows the use of -1 as a parameter.
  • countsPerMSec
    [in] Timer input clock frequency. The value is equal to the frequency divided by 1000.
  • margin
    [in] Specifies the safe time range, in ticks, in which the timer can be modified without errors. This value is used in the timer manipulation routines OALTimerRecharge and OALTimerUpdate.

Return Value

TRUE indicates success.

FALSE indicates failure.

Requirements

Header

oal_timer.h

Library

Developer Implemented

See Also

Reference

Timer Functions