1.22.27.7 TMRx_PeriodGet Function

C

/* x = TMR instance number */
uint16_t TMRx_PeriodGet(void);

Summary

Reads the period value of given timer.

Description

This function reads the value of period of a given timer.

Precondition

TMRx_Initialize() function must have been called first.

Parameters

None.

Returns

The timer's period value.

Example

uint16_t period;

TMR2_Initialize();
period = TMR2_PeriodGet();

Remarks

If timer is operating on 32 bit mode then return value should be uint32_t type.