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.
- Timer Handler (SYS Timer Handle)
- Timer ID
- Callback function
- Callback parameter
The PAL Timer module provides the following API interface to use the timing functions.
S. No. | Function | Description |
---|---|---|
1 | PAL_Init | Initialization of PAL |
2 | PAL_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 |
8 | PAL_GetRandomNumber | Random number generation |
9 | PAL_GetTrxAntennaGain | Gets the antenna gain from the information block of the device support library |
10 | PAL_GetTrxTransmitPowerMax | Gets the transceiver's maximum transmit power in dBm |