Jump to main content

##

# 2.80.21 PDECx_COUNTERCompare1Set Function

## C

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

## Summary

Configures Compare 1 register value

## Description

This function configures Compare 1 (CC1) register value.

## Precondition

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

## Parameters

Param | Description
--- | ---
compare1 | Value to be set in Compare 1 register

## Returns

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

## Example

    PDEC_COUNTERInitialize();
    PDEC_COUNTERStart();
    PDEC_COUNTERCompare1Set(0x100);

## Remarks

None.