1.10.15.8 1.11.16.8 1.12.16.8 1.13.15.8 1.16.12.8 1.17.12.8 1.18.12.8 1.19.12.8 1.20.12.8 1.21.13.8 1.22.17.8 1.23.16.8 1.24.14.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.