3.1 PAL Timer

The Timer module provides the physical device implementation for software timers. The PAL Timer module in turn use the SYS_TIME driver available in Harmony 3.

The PAL Timer module implements the timer array to hold the following details of each software timer.

  1. Timer Handler (SYS Timer Handle)
  2. Timer ID
  3. Callback function
  4. Callback parameter

The PAL Timer module provides the following API interface to use the timing functions.

Table 3-1. PAL Timer APIs
S. No.FunctionDescription
1PAL_InitInitialization of PAL
2PAL_TimerGetId Gets the timer Id
3 PAL_TimerStart This function starts a regular timer and installs the corresponding callback function handle the timeout event
4 PAL_TimerStop Stops the running timer
5 PAL_GetCurrentTime Gets the current time
6 PAL_TimerIsRunning Returns the timer status
7 PAL_TimerDelay Routine to introduce blocking delay
8PAL_GetRandomNumberRandom number generation
9PAL_GetTrxAntennaGainGets the antenna gain from the information block of the device support library
10PAL_GetTrxTransmitPowerMaxGets the transceiver's maximum transmit power in dBm