1.19.12.8 OCMPx_CompareSecondaryValueGet Function

C

/* x = OCMP instance number */

uint32_t OCMPx_CompareSecondaryValueGet (void)

Summary

Reads secondary compare register. Based on OC32 bit, compare value will be 16-bit or 32-bit. Refer the generated header file for the exact function signature.

Description

This function reads the value of the secondary compare register. This is used in dual compare mode and PWM modes.

Precondition

OCMPx_Initialize() function must have been called first.

Parameters

void

Returns

uint32_t - value of the secondary compare register

Example

uint32_t compare;
OCMP1_Initialize();
OCMP1_Enable();
compare = OCMP1_CompareSecondaryValueGet();

Remarks

Based on OC32 bit, compare value will be 16-bit or 32-bit. Refer the generated header file for the exact function signature.