1.5.16.20 PDECx_COUNTERCompare0Set Function

C

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

Summary

Configures Compare 0 register value

Description

This function configures 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

Param Description
compare0 Value to be set in Compare 0 register

Returns

true - If Compare 0 register set false - If Compare 0 register is not set

Example

PDEC_COUNTERInitialize();
PDEC_COUNTERStart();
PDEC_COUNTERCompare0Set(0x100);

Remarks

None.