1.8.22.5 1.25.23.5 1.26.20.5 1.27.23.5 1.28.25.5 1.34.23.5 1.35.16.5 1.36.18.5 1.41.21.5 1.42.20.5 TCx_CHy_TimerPeriodGet Function
C
/* x = TC instance number, y= channel number */ /* 16 bit timer */ uint16_t TCx_CHy_TimerPeriodGet ( void ); /* 32 bit timer */ uint32_t TCx_CHy_TimerPeriodGet ( void );
Summary
Reads the period value of given timer channel
Description
This function reads the value of period of given timer channel.
Precondition
TCx_CHy_TimerInitialize function must have been called first for the given channel.
Parameters
None
Returns
The timer's period value. Type of the return value is different based on the timer bit width.
Example
16 bit timer
uint16_t period; TC0_CH1_TimerInitialize(); period = TC0_CH1_TimerPeriodGet();
32 bit timer
uint32_t period; TC0_CH1_TimerInitialize(); period = TC0_CH1_TimerPeriodGet();
Remarks
None