1.2.15.22 1.3.17.22 1.5.16.22 1.32.18.22 PDECx_COUNTERCompare0Get Function

C

uint16_t PDECx_COUNTERCompare0Get ( void ) // x is instance of the peripheral and it is applicable only for devices having multiple instances of the peripheral.

Summary

Reads Compare 0 register value

Description

This function reads Compare 0 (CC0) register value. This can be period value of the counter if CTRLA.PEREN bit is set.

Precondition

PDECx_COUNTERInitialize function must have been called first for the given channel.

Parameters

None.

Returns

Returns Compare 0 register value.

Example

uint16_t value;
PDEC_COUNTERInitialize();
PDEC_COUNTERStart();
value = PDEC_COUNTERCompare0Get();

Remarks

None.